@rivetkit/engine-api-full 0.0.0-sqlite-sync-3-0-1-final.5663d2f → 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
@@ -580,18 +580,79 @@ module.exports = __toCommonJS(src_exports);
580
580
  // src/api/index.ts
581
581
  var api_exports = {};
582
582
  __export(api_exports, {
583
+ AuthOperationKind: () => AuthOperationKind,
584
+ AuthTokenResource: () => AuthTokenResource,
585
+ CrashPolicy: () => CrashPolicy,
586
+ HealthStatus: () => HealthStatus,
587
+ RunnerConfigVariant: () => RunnerConfigVariant,
583
588
  authTokens: () => authTokens_exports,
584
589
  datacenters: () => datacenters_exports,
590
+ envoys: () => envoys_exports,
591
+ health: () => health_exports,
585
592
  metadata: () => metadata_exports,
586
- namespaces: () => namespaces_exports2,
587
- pools: () => pools_exports
593
+ namespaces: () => namespaces_exports,
594
+ runners: () => runners_exports
588
595
  });
589
596
 
597
+ // src/api/types/AuthOperationKind.ts
598
+ var AuthOperationKind = {
599
+ Read: "read",
600
+ Update: "update",
601
+ List: "list",
602
+ Create: "create",
603
+ Delete: "delete"
604
+ };
605
+
606
+ // src/api/types/AuthTokenResource.ts
607
+ var AuthTokenResource = {
608
+ Namespace: "namespace",
609
+ Actor: "actor",
610
+ Runner: "runner",
611
+ RunnerConfig: "runner_config",
612
+ Datacenter: "datacenter",
613
+ ActorGateway: "actor_gateway",
614
+ ActorKv: "actor_kv"
615
+ };
616
+
617
+ // src/api/types/CrashPolicy.ts
618
+ var CrashPolicy = {
619
+ Restart: "restart",
620
+ Sleep: "sleep",
621
+ Destroy: "destroy"
622
+ };
623
+
624
+ // src/api/types/HealthStatus.ts
625
+ var HealthStatus = {
626
+ Ok: "ok",
627
+ Error: "error"
628
+ };
629
+
630
+ // src/api/types/RunnerConfigVariant.ts
631
+ var RunnerConfigVariant = {
632
+ Serverless: "serverless",
633
+ Normal: "normal"
634
+ };
635
+
590
636
  // src/api/resources/authTokens/index.ts
591
637
  var authTokens_exports = {};
592
- __export(authTokens_exports, {
593
- AuthTokens: () => AuthTokens
594
- });
638
+
639
+ // src/api/resources/datacenters/index.ts
640
+ var datacenters_exports = {};
641
+
642
+ // src/api/resources/envoys/index.ts
643
+ var envoys_exports = {};
644
+
645
+ // src/api/resources/health/index.ts
646
+ var health_exports = {};
647
+
648
+ // src/api/resources/metadata/index.ts
649
+ var metadata_exports = {};
650
+
651
+ // src/api/resources/namespaces/index.ts
652
+ var namespaces_exports = {};
653
+
654
+ // src/api/resources/runners/index.ts
655
+ var runners_exports = {};
595
656
 
596
657
  // src/core/json.ts
597
658
  var toJson = (value, replacer, space) => {
@@ -2305,9 +2366,6 @@ function transformAndValidateUnion({
2305
2366
  };
2306
2367
  }
2307
2368
 
2308
- // src/api/resources/authTokens/client/Client.ts
2309
- var import_url_join = __toESM(require("url-join"));
2310
-
2311
2369
  // src/serialization/index.ts
2312
2370
  var serialization_exports = {};
2313
2371
  __export(serialization_exports, {
@@ -2318,53 +2376,91 @@ __export(serialization_exports, {
2318
2376
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2319
2377
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2320
2378
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2321
- ActorsGetResponse: () => ActorsGetResponse,
2379
+ ActorsKvGetResponse: () => ActorsKvGetResponse,
2322
2380
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2323
2381
  ActorsListResponse: () => ActorsListResponse,
2382
+ ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2324
2383
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2384
+ ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2325
2385
  ActorsSleepResponse: () => ActorsSleepResponse,
2326
- AuthOperationKind: () => AuthOperationKind,
2327
- AuthResourceKind: () => AuthResourceKind,
2328
- AuthTargetScope: () => AuthTargetScope,
2386
+ AuthOperationKind: () => AuthOperationKind2,
2387
+ AuthTokenCreateRequest: () => AuthTokenCreateRequest,
2329
2388
  AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2330
2389
  AuthTokenGrant: () => AuthTokenGrant,
2331
2390
  AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2391
+ AuthTokenResource: () => AuthTokenResource2,
2392
+ AuthTokenTargetScope: () => AuthTokenTargetScope,
2393
+ AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
2394
+ CrashPolicy: () => CrashPolicy2,
2332
2395
  Datacenter: () => Datacenter,
2396
+ DatacenterHealth: () => DatacenterHealth,
2333
2397
  DatacentersListResponse: () => DatacentersListResponse,
2334
- ErrorResponse: () => ErrorResponse,
2398
+ Envoy: () => Envoy,
2399
+ EnvoysListResponse: () => EnvoysListResponse,
2400
+ HealthFanoutResponse: () => HealthFanoutResponse,
2401
+ HealthResponse: () => HealthResponse,
2402
+ HealthStatus: () => HealthStatus2,
2335
2403
  MetadataGetResponse: () => MetadataGetResponse,
2336
2404
  Namespace: () => Namespace,
2337
2405
  NamespaceListResponse: () => NamespaceListResponse,
2338
2406
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2339
2407
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2340
- Node: () => Node,
2341
2408
  Pagination: () => Pagination,
2342
- Pool: () => Pool,
2343
- PoolResponse: () => PoolResponse,
2344
- PoolsDeleteResponse: () => PoolsDeleteResponse,
2345
- PoolsListNodesResponse: () => PoolsListNodesResponse,
2346
- PoolsListResponse: () => PoolsListResponse,
2347
2409
  RivetId: () => RivetId,
2348
- namespaces: () => namespaces_exports
2410
+ Runner: () => Runner,
2411
+ RunnerConfig: () => RunnerConfig,
2412
+ RunnerConfigKind: () => RunnerConfigKind,
2413
+ RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2414
+ RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
2415
+ RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2416
+ RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2417
+ RunnerConfigNormal: () => RunnerConfigNormal,
2418
+ RunnerConfigResponse: () => RunnerConfigResponse,
2419
+ RunnerConfigServerless: () => RunnerConfigServerless,
2420
+ RunnerConfigVariant: () => RunnerConfigVariant2,
2421
+ RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2422
+ RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2423
+ RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2424
+ RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2425
+ RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2426
+ RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2427
+ RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2428
+ RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2429
+ RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2430
+ RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2431
+ RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2432
+ RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2433
+ RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2434
+ RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2435
+ RunnersListNamesResponse: () => RunnersListNamesResponse,
2436
+ RunnersListResponse: () => RunnersListResponse,
2437
+ authTokens: () => authTokens_exports2,
2438
+ namespaces: () => namespaces_exports2
2349
2439
  });
2350
2440
 
2351
2441
  // src/serialization/types/RivetId.ts
2352
2442
  var RivetId = schemas_exports.string();
2353
2443
 
2444
+ // src/serialization/types/CrashPolicy.ts
2445
+ var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2446
+
2354
2447
  // src/serialization/types/Actor.ts
2355
2448
  var Actor = schemas_exports.object({
2356
2449
  actorId: schemas_exports.property("actor_id", RivetId),
2357
- name: schemas_exports.string(),
2358
- key: schemas_exports.string(),
2359
- namespace: schemas_exports.string(),
2360
- pool: schemas_exports.string(),
2450
+ connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2451
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2361
2452
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2362
- startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
2363
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
2364
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
2365
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
2366
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
2367
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
2453
+ datacenter: schemas_exports.string(),
2454
+ destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2455
+ error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2456
+ key: schemas_exports.string().optional(),
2457
+ name: schemas_exports.string(),
2458
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2459
+ pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2460
+ rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2461
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2462
+ sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2463
+ startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
2368
2464
  });
2369
2465
 
2370
2466
  // src/serialization/types/ActorName.ts
@@ -2374,12 +2470,11 @@ var ActorName = schemas_exports.object({
2374
2470
 
2375
2471
  // src/serialization/types/ActorsCreateResponse.ts
2376
2472
  var ActorsCreateResponse = schemas_exports.object({
2377
- actor: Actor,
2378
- created: schemas_exports.boolean()
2473
+ actor: Actor
2379
2474
  });
2380
2475
 
2381
2476
  // src/serialization/types/ActorsDeleteResponse.ts
2382
- var ActorsDeleteResponse = schemas_exports.object({});
2477
+ var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2383
2478
 
2384
2479
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2385
2480
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2387,19 +2482,21 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2387
2482
  created: schemas_exports.boolean()
2388
2483
  });
2389
2484
 
2390
- // src/serialization/types/ActorsGetResponse.ts
2391
- var ActorsGetResponse = schemas_exports.object({
2392
- actor: Actor
2393
- });
2394
-
2395
- // src/serialization/types/ActorsListNamesResponse.ts
2396
- var ActorsListNamesResponse = schemas_exports.object({
2397
- names: schemas_exports.record(schemas_exports.string(), ActorName)
2485
+ // src/serialization/types/ActorsKvGetResponse.ts
2486
+ var ActorsKvGetResponse = schemas_exports.object({
2487
+ updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2488
+ value: schemas_exports.string()
2398
2489
  });
2399
2490
 
2400
2491
  // src/serialization/types/Pagination.ts
2401
2492
  var Pagination = schemas_exports.object({
2402
- cursor: schemas_exports.string().nullable()
2493
+ cursor: schemas_exports.string().optional()
2494
+ });
2495
+
2496
+ // src/serialization/types/ActorsListNamesResponse.ts
2497
+ var ActorsListNamesResponse = schemas_exports.object({
2498
+ names: schemas_exports.record(schemas_exports.string(), ActorName),
2499
+ pagination: Pagination
2403
2500
  });
2404
2501
 
2405
2502
  // src/serialization/types/ActorsListResponse.ts
@@ -2408,76 +2505,143 @@ var ActorsListResponse = schemas_exports.object({
2408
2505
  pagination: Pagination
2409
2506
  });
2410
2507
 
2508
+ // src/serialization/types/ActorsRescheduleRequestBody.ts
2509
+ var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2510
+
2411
2511
  // src/serialization/types/ActorsRescheduleResponse.ts
2412
- var ActorsRescheduleResponse = schemas_exports.object({});
2512
+ var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2513
+
2514
+ // src/serialization/types/ActorsSleepRequestBody.ts
2515
+ var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2413
2516
 
2414
2517
  // src/serialization/types/ActorsSleepResponse.ts
2415
- var ActorsSleepResponse = schemas_exports.object({});
2518
+ var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2416
2519
 
2417
2520
  // src/serialization/types/AuthOperationKind.ts
2418
- var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2419
-
2420
- // src/serialization/types/AuthResourceKind.ts
2421
- var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
2422
-
2423
- // src/serialization/types/AuthTargetScope.ts
2424
- var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
2425
- id: RivetId
2426
- })]);
2521
+ var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2427
2522
 
2428
2523
  // src/serialization/types/AuthTokenCreateResponse.ts
2429
2524
  var AuthTokenCreateResponse = schemas_exports.object({
2430
- token: schemas_exports.string(),
2525
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2431
2526
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2432
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2527
+ token: schemas_exports.string()
2528
+ });
2529
+
2530
+ // src/serialization/types/AuthTokenResource.ts
2531
+ var AuthTokenResource2 = schemas_exports.enum_([
2532
+ "namespace",
2533
+ "actor",
2534
+ "runner",
2535
+ "runner_config",
2536
+ "datacenter",
2537
+ "actor_gateway",
2538
+ "actor_kv"
2539
+ ]);
2540
+
2541
+ // src/serialization/types/AuthTokenTargetScopeId.ts
2542
+ var AuthTokenTargetScopeId = schemas_exports.object({
2543
+ id: RivetId
2433
2544
  });
2434
2545
 
2546
+ // src/serialization/types/AuthTokenTargetScope.ts
2547
+ var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
2548
+
2435
2549
  // src/serialization/types/AuthTokenGrant.ts
2436
2550
  var AuthTokenGrant = schemas_exports.object({
2437
- resource: AuthResourceKind,
2438
- target: AuthTargetScope,
2439
- operations: schemas_exports.list(AuthOperationKind)
2551
+ operations: schemas_exports.list(AuthOperationKind2),
2552
+ resource: AuthTokenResource2,
2553
+ target: AuthTokenTargetScope
2440
2554
  });
2441
2555
 
2442
2556
  // src/serialization/types/AuthTokenInspectResponse.ts
2443
2557
  var AuthTokenInspectResponse = schemas_exports.object({
2444
- namespace: schemas_exports.string(),
2445
- subject: schemas_exports.string().nullable(),
2558
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2446
2559
  grants: schemas_exports.list(AuthTokenGrant),
2447
2560
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2448
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2561
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2562
+ subject: schemas_exports.string().optional()
2449
2563
  });
2450
2564
 
2451
2565
  // src/serialization/types/Datacenter.ts
2452
2566
  var Datacenter = schemas_exports.object({
2453
- name: schemas_exports.string()
2567
+ label: schemas_exports.number(),
2568
+ name: schemas_exports.string(),
2569
+ url: schemas_exports.string()
2570
+ });
2571
+
2572
+ // src/serialization/types/HealthResponse.ts
2573
+ var HealthResponse = schemas_exports.object({
2574
+ runtime: schemas_exports.string(),
2575
+ status: schemas_exports.string(),
2576
+ version: schemas_exports.string()
2577
+ });
2578
+
2579
+ // src/serialization/types/HealthStatus.ts
2580
+ var HealthStatus2 = schemas_exports.enum_(["ok", "error"]);
2581
+
2582
+ // src/serialization/types/DatacenterHealth.ts
2583
+ var DatacenterHealth = schemas_exports.object({
2584
+ datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2585
+ datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2586
+ error: schemas_exports.string().optional(),
2587
+ response: HealthResponse.optional(),
2588
+ rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2589
+ status: HealthStatus2
2454
2590
  });
2455
2591
 
2456
2592
  // src/serialization/types/DatacentersListResponse.ts
2457
2593
  var DatacentersListResponse = schemas_exports.object({
2458
- datacenters: schemas_exports.list(Datacenter)
2594
+ datacenters: schemas_exports.list(Datacenter),
2595
+ pagination: Pagination
2459
2596
  });
2460
2597
 
2461
- // src/serialization/types/ErrorResponse.ts
2462
- var ErrorResponse = schemas_exports.object({
2463
- group: schemas_exports.string(),
2464
- code: schemas_exports.string(),
2465
- message: schemas_exports.string(),
2466
- metadata: schemas_exports.unknown().optional()
2598
+ // src/serialization/types/Envoy.ts
2599
+ var Envoy = schemas_exports.object({
2600
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2601
+ datacenter: schemas_exports.string(),
2602
+ envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2603
+ lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2604
+ lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2605
+ lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2606
+ metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2607
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2608
+ poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2609
+ slots: schemas_exports.number(),
2610
+ stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2611
+ version: schemas_exports.number()
2612
+ });
2613
+
2614
+ // src/serialization/types/EnvoysListResponse.ts
2615
+ var EnvoysListResponse = schemas_exports.object({
2616
+ envoys: schemas_exports.list(Envoy),
2617
+ pagination: Pagination
2618
+ });
2619
+
2620
+ // src/serialization/types/HealthFanoutResponse.ts
2621
+ var HealthFanoutResponse = schemas_exports.object({
2622
+ datacenters: schemas_exports.list(DatacenterHealth)
2467
2623
  });
2468
2624
 
2469
2625
  // src/serialization/types/MetadataGetResponse.ts
2470
2626
  var MetadataGetResponse = schemas_exports.object({
2471
- runtime: schemas_exports.stringLiteral("engine"),
2472
- version: schemas_exports.string(),
2473
- envoyProtocolVersion: schemas_exports.number(),
2474
- actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
2627
+ buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2628
+ cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2629
+ cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2630
+ envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
2631
+ epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
2632
+ gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2633
+ runtime: schemas_exports.string(),
2634
+ rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2635
+ rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2636
+ version: schemas_exports.string()
2475
2637
  });
2476
2638
 
2477
2639
  // src/serialization/types/Namespace.ts
2478
2640
  var Namespace = schemas_exports.object({
2641
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2642
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2479
2643
  name: schemas_exports.string(),
2480
- createTs: schemas_exports.property("create_ts", schemas_exports.number())
2644
+ namespaceId: schemas_exports.property("namespace_id", RivetId)
2481
2645
  });
2482
2646
 
2483
2647
  // src/serialization/types/NamespaceListResponse.ts
@@ -2491,76 +2655,258 @@ var NamespacesCreateResponse = schemas_exports.object({
2491
2655
  namespace: Namespace
2492
2656
  });
2493
2657
 
2494
- // src/serialization/types/Node.ts
2495
- var Node = schemas_exports.object({
2496
- key: schemas_exports.string(),
2497
- pool: schemas_exports.string(),
2498
- namespace: schemas_exports.string(),
2499
- datacenter: schemas_exports.string(),
2500
- version: schemas_exports.number(),
2658
+ // src/serialization/types/Runner.ts
2659
+ var Runner = schemas_exports.object({
2501
2660
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2661
+ datacenter: schemas_exports.string(),
2662
+ drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2663
+ key: schemas_exports.string(),
2664
+ lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2502
2665
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2503
- connected: schemas_exports.boolean(),
2504
- stopping: schemas_exports.boolean()
2666
+ lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2667
+ metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2668
+ name: schemas_exports.string(),
2669
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2670
+ remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2671
+ runnerId: schemas_exports.property("runner_id", RivetId),
2672
+ stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2673
+ totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2674
+ version: schemas_exports.number()
2505
2675
  });
2506
2676
 
2507
- // src/serialization/types/Pool.ts
2508
- var Pool = schemas_exports.object({
2509
- name: schemas_exports.string(),
2510
- drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2511
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2512
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2513
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2514
- metadata: schemas_exports.unknown()
2677
+ // src/serialization/types/RunnerConfigNormal.ts
2678
+ var RunnerConfigNormal = schemas_exports.object({
2679
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2680
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2681
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2682
+ drainOnVersionUpgrade: schemas_exports.property(
2683
+ "drain_on_version_upgrade",
2684
+ schemas_exports.boolean().optional()
2685
+ )
2686
+ });
2687
+
2688
+ // src/serialization/types/RunnerConfigServerless.ts
2689
+ var RunnerConfigServerless = schemas_exports.object({
2690
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2691
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2692
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2693
+ drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2694
+ drainOnVersionUpgrade: schemas_exports.property(
2695
+ "drain_on_version_upgrade",
2696
+ schemas_exports.boolean().optional()
2697
+ ),
2698
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2699
+ maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2700
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2701
+ metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2702
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2703
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2704
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2705
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2706
+ url: schemas_exports.string()
2707
+ });
2708
+
2709
+ // src/serialization/types/RunnerConfig.ts
2710
+ var RunnerConfig = schemas_exports.object({
2711
+ normal: RunnerConfigNormal.optional(),
2712
+ serverless: RunnerConfigServerless.optional(),
2713
+ drainOnVersionUpgrade: schemas_exports.property(
2714
+ "drain_on_version_upgrade",
2715
+ schemas_exports.boolean().optional()
2716
+ ),
2717
+ metadata: schemas_exports.unknown().optional()
2718
+ });
2719
+
2720
+ // src/serialization/types/RunnerConfigKindNormalNormal.ts
2721
+ var RunnerConfigKindNormalNormal = schemas_exports.object({
2722
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2723
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2724
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2725
+ drainOnVersionUpgrade: schemas_exports.property(
2726
+ "drain_on_version_upgrade",
2727
+ schemas_exports.boolean().optional()
2728
+ )
2729
+ });
2730
+
2731
+ // src/serialization/types/RunnerConfigKindNormal.ts
2732
+ var RunnerConfigKindNormal = schemas_exports.object({
2733
+ normal: RunnerConfigKindNormalNormal
2734
+ });
2735
+
2736
+ // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2737
+ var RunnerConfigKindServerlessServerless = schemas_exports.object({
2738
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2739
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2740
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2741
+ drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2742
+ drainOnVersionUpgrade: schemas_exports.property(
2743
+ "drain_on_version_upgrade",
2744
+ schemas_exports.boolean().optional()
2745
+ ),
2746
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2747
+ maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2748
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2749
+ metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2750
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2751
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2752
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2753
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2754
+ url: schemas_exports.string()
2515
2755
  });
2516
2756
 
2517
- // src/serialization/types/PoolResponse.ts
2518
- var PoolResponse = schemas_exports.object({
2519
- pool: Pool
2757
+ // src/serialization/types/RunnerConfigKindServerless.ts
2758
+ var RunnerConfigKindServerless = schemas_exports.object({
2759
+ serverless: RunnerConfigKindServerlessServerless
2520
2760
  });
2521
2761
 
2522
- // src/serialization/types/PoolsDeleteResponse.ts
2523
- var PoolsDeleteResponse = schemas_exports.object({});
2762
+ // src/serialization/types/RunnerConfigKind.ts
2763
+ var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2524
2764
 
2525
- // src/serialization/types/PoolsListNodesResponse.ts
2526
- var PoolsListNodesResponse = schemas_exports.object({
2527
- nodes: schemas_exports.list(Node),
2765
+ // src/serialization/types/RunnerConfigResponse.ts
2766
+ var RunnerConfigResponse = schemas_exports.object({
2767
+ protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2768
+ runnerPoolError: schemas_exports.property(
2769
+ "runner_pool_error",
2770
+ schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2771
+ )
2772
+ }).extend(RunnerConfig);
2773
+
2774
+ // src/serialization/types/RunnerConfigVariant.ts
2775
+ var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2776
+
2777
+ // src/serialization/types/RunnerConfigsDeleteResponse.ts
2778
+ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2779
+
2780
+ // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2781
+ var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2782
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2783
+ });
2784
+
2785
+ // src/serialization/types/RunnerConfigsListResponse.ts
2786
+ var RunnerConfigsListResponse = schemas_exports.object({
2787
+ pagination: Pagination,
2788
+ runnerConfigs: schemas_exports.property(
2789
+ "runner_configs",
2790
+ schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2791
+ )
2792
+ });
2793
+
2794
+ // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2795
+ var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2796
+
2797
+ // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2798
+ var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2799
+
2800
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2801
+ var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2802
+ version: schemas_exports.string()
2803
+ });
2804
+
2805
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2806
+ var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2807
+ success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2808
+ });
2809
+
2810
+ // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2811
+ var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2812
+ details: schemas_exports.string().optional(),
2813
+ message: schemas_exports.string(),
2814
+ metadata: schemas_exports.unknown().optional()
2815
+ });
2816
+
2817
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2818
+ var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2819
+ error: RunnerConfigsServerlessMetadataError
2820
+ });
2821
+
2822
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2823
+ var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2824
+ failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2825
+ });
2826
+
2827
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2828
+ var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2829
+ RunnerConfigsServerlessHealthCheckResponseSuccess,
2830
+ RunnerConfigsServerlessHealthCheckResponseFailure
2831
+ ]);
2832
+
2833
+ // src/serialization/types/RunnerConfigsUpsertResponse.ts
2834
+ var RunnerConfigsUpsertResponse = schemas_exports.object({
2835
+ endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2836
+ });
2837
+
2838
+ // src/serialization/types/RunnersListNamesResponse.ts
2839
+ var RunnersListNamesResponse = schemas_exports.object({
2840
+ names: schemas_exports.list(schemas_exports.string()),
2528
2841
  pagination: Pagination
2529
2842
  });
2530
2843
 
2531
- // src/serialization/types/PoolsListResponse.ts
2532
- var PoolsListResponse = schemas_exports.object({
2844
+ // src/serialization/types/RunnersListResponse.ts
2845
+ var RunnersListResponse = schemas_exports.object({
2533
2846
  pagination: Pagination,
2534
- pools: schemas_exports.list(Pool)
2847
+ runners: schemas_exports.list(Runner)
2535
2848
  });
2536
2849
 
2537
2850
  // src/serialization/client/requests/ActorsCreateRequest.ts
2538
2851
  var ActorsCreateRequest = schemas_exports.object({
2852
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2853
+ datacenter: schemas_exports.string().optional(),
2539
2854
  input: schemas_exports.string().optional(),
2540
2855
  key: schemas_exports.string().optional(),
2541
2856
  name: schemas_exports.string(),
2542
- pool: schemas_exports.string().optional()
2857
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2543
2858
  });
2544
2859
 
2545
2860
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2546
2861
  var ActorsGetOrCreateRequest = schemas_exports.object({
2862
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2863
+ datacenter: schemas_exports.string().optional(),
2547
2864
  input: schemas_exports.string().optional(),
2548
- key: schemas_exports.string().optional(),
2865
+ key: schemas_exports.string(),
2549
2866
  name: schemas_exports.string(),
2550
- pool: schemas_exports.string().optional()
2867
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2868
+ });
2869
+
2870
+ // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2871
+ var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2872
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2873
+ url: schemas_exports.string()
2874
+ });
2875
+
2876
+ // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2877
+ var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2878
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2879
+ });
2880
+
2881
+ // src/serialization/resources/authTokens/index.ts
2882
+ var authTokens_exports2 = {};
2883
+ __export(authTokens_exports2, {
2884
+ AuthTokenCreateRequest: () => AuthTokenCreateRequest
2885
+ });
2886
+
2887
+ // src/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.ts
2888
+ var AuthTokenCreateRequest = schemas_exports.object({
2889
+ duration: schemas_exports.number().optional(),
2890
+ grants: schemas_exports.list(AuthTokenGrant),
2891
+ namespace: schemas_exports.string(),
2892
+ subject: schemas_exports.string().optional()
2551
2893
  });
2552
2894
 
2553
2895
  // src/serialization/resources/namespaces/index.ts
2554
- var namespaces_exports = {};
2555
- __export(namespaces_exports, {
2896
+ var namespaces_exports2 = {};
2897
+ __export(namespaces_exports2, {
2556
2898
  NamespacesCreateRequest: () => NamespacesCreateRequest
2557
2899
  });
2558
2900
 
2559
2901
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2560
2902
  var NamespacesCreateRequest = schemas_exports.object({
2903
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2561
2904
  name: schemas_exports.string()
2562
2905
  });
2563
2906
 
2907
+ // src/Client.ts
2908
+ var import_url_join8 = __toESM(require("url-join"));
2909
+
2564
2910
  // src/errors/RivetError.ts
2565
2911
  var RivetError = class _RivetError extends Error {
2566
2912
  statusCode;
@@ -2603,10 +2949,25 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2603
2949
  };
2604
2950
 
2605
2951
  // src/api/resources/authTokens/client/Client.ts
2952
+ var import_url_join = __toESM(require("url-join"));
2606
2953
  var AuthTokens = class {
2607
2954
  constructor(_options) {
2608
2955
  this._options = _options;
2609
2956
  }
2957
+ /**
2958
+ * @param {Rivet.AuthTokenCreateRequest} request
2959
+ * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2960
+ *
2961
+ * @example
2962
+ * await client.authTokens.create({
2963
+ * grants: [{
2964
+ * operations: ["read"],
2965
+ * resource: "namespace",
2966
+ * target: "any"
2967
+ * }],
2968
+ * namespace: "namespace"
2969
+ * })
2970
+ */
2610
2971
  async create(request, requestOptions) {
2611
2972
  const _response = await (this._options.fetcher ?? fetcher)({
2612
2973
  url: (0, import_url_join.default)(
@@ -2623,12 +2984,7 @@ var AuthTokens = class {
2623
2984
  },
2624
2985
  contentType: "application/json",
2625
2986
  requestType: "json",
2626
- body: {
2627
- namespace: request.namespace,
2628
- duration: request.duration,
2629
- subject: request.subject,
2630
- grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2631
- },
2987
+ body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2632
2988
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2633
2989
  maxRetries: requestOptions?.maxRetries,
2634
2990
  abortSignal: requestOptions?.abortSignal
@@ -2662,6 +3018,12 @@ var AuthTokens = class {
2662
3018
  });
2663
3019
  }
2664
3020
  }
3021
+ /**
3022
+ * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
3023
+ *
3024
+ * @example
3025
+ * await client.authTokens.inspect()
3026
+ */
2665
3027
  async inspect(requestOptions) {
2666
3028
  const _response = await (this._options.fetcher ?? fetcher)({
2667
3029
  url: (0, import_url_join.default)(
@@ -2716,21 +3078,6 @@ var AuthTokens = class {
2716
3078
  }
2717
3079
  };
2718
3080
 
2719
- // src/api/resources/datacenters/index.ts
2720
- var datacenters_exports = {};
2721
-
2722
- // src/api/resources/metadata/index.ts
2723
- var metadata_exports = {};
2724
-
2725
- // src/api/resources/namespaces/index.ts
2726
- var namespaces_exports2 = {};
2727
-
2728
- // src/api/resources/pools/index.ts
2729
- var pools_exports = {};
2730
-
2731
- // src/Client.ts
2732
- var import_url_join6 = __toESM(require("url-join"));
2733
-
2734
3081
  // src/api/resources/datacenters/client/Client.ts
2735
3082
  var import_url_join2 = __toESM(require("url-join"));
2736
3083
  var Datacenters = class {
@@ -2797,23 +3144,45 @@ var Datacenters = class {
2797
3144
  }
2798
3145
  };
2799
3146
 
2800
- // src/api/resources/metadata/client/Client.ts
3147
+ // src/api/resources/envoys/client/Client.ts
2801
3148
  var import_url_join3 = __toESM(require("url-join"));
2802
- var Metadata = class {
3149
+ var Envoys = class {
2803
3150
  constructor(_options) {
2804
3151
  this._options = _options;
2805
3152
  }
2806
3153
  /**
2807
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3154
+ * @param {Rivet.EnvoysListRequest} request
3155
+ * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2808
3156
  *
2809
3157
  * @example
2810
- * await client.metadata.get()
3158
+ * await client.envoys.list({
3159
+ * namespace: "namespace"
3160
+ * })
2811
3161
  */
2812
- async get(requestOptions) {
3162
+ async list(request, requestOptions) {
3163
+ const { namespace, name, envoyKey, limit, cursor } = request;
3164
+ const _queryParams = {};
3165
+ _queryParams["namespace"] = namespace;
3166
+ if (name != null) {
3167
+ _queryParams["name"] = name;
3168
+ }
3169
+ if (envoyKey != null) {
3170
+ if (Array.isArray(envoyKey)) {
3171
+ _queryParams["envoy_key"] = envoyKey.map((item) => item);
3172
+ } else {
3173
+ _queryParams["envoy_key"] = envoyKey;
3174
+ }
3175
+ }
3176
+ if (limit != null) {
3177
+ _queryParams["limit"] = limit.toString();
3178
+ }
3179
+ if (cursor != null) {
3180
+ _queryParams["cursor"] = cursor;
3181
+ }
2813
3182
  const _response = await (this._options.fetcher ?? fetcher)({
2814
3183
  url: (0, import_url_join3.default)(
2815
3184
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2816
- "metadata"
3185
+ "envoys"
2817
3186
  ),
2818
3187
  method: "GET",
2819
3188
  headers: {
@@ -2824,13 +3193,14 @@ var Metadata = class {
2824
3193
  ...requestOptions?.headers
2825
3194
  },
2826
3195
  contentType: "application/json",
3196
+ queryParameters: _queryParams,
2827
3197
  requestType: "json",
2828
3198
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2829
3199
  maxRetries: requestOptions?.maxRetries,
2830
3200
  abortSignal: requestOptions?.abortSignal
2831
3201
  });
2832
3202
  if (_response.ok) {
2833
- return MetadataGetResponse.parseOrThrow(_response.body, {
3203
+ return EnvoysListResponse.parseOrThrow(_response.body, {
2834
3204
  unrecognizedObjectKeys: "passthrough",
2835
3205
  allowUnrecognizedUnionMembers: true,
2836
3206
  allowUnrecognizedEnumValues: true,
@@ -2851,7 +3221,7 @@ var Metadata = class {
2851
3221
  body: _response.error.rawBody
2852
3222
  });
2853
3223
  case "timeout":
2854
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3224
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2855
3225
  case "unknown":
2856
3226
  throw new RivetError({
2857
3227
  message: _response.error.errorMessage
@@ -2863,35 +3233,23 @@ var Metadata = class {
2863
3233
  }
2864
3234
  };
2865
3235
 
2866
- // src/api/resources/namespaces/client/Client.ts
3236
+ // src/api/resources/health/client/Client.ts
2867
3237
  var import_url_join4 = __toESM(require("url-join"));
2868
- var Namespaces = class {
3238
+ var Health = class {
2869
3239
  constructor(_options) {
2870
3240
  this._options = _options;
2871
3241
  }
2872
3242
  /**
2873
- * @param {Rivet.NamespacesListRequest} request
2874
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3243
+ * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2875
3244
  *
2876
3245
  * @example
2877
- * await client.namespaces.list()
3246
+ * await client.health.fanout()
2878
3247
  */
2879
- async list(request = {}, requestOptions) {
2880
- const { limit, cursor, name } = request;
2881
- const _queryParams = {};
2882
- if (limit != null) {
2883
- _queryParams["limit"] = limit.toString();
2884
- }
2885
- if (cursor != null) {
2886
- _queryParams["cursor"] = cursor;
2887
- }
2888
- if (name != null) {
2889
- _queryParams["name"] = name;
2890
- }
3248
+ async fanout(requestOptions) {
2891
3249
  const _response = await (this._options.fetcher ?? fetcher)({
2892
3250
  url: (0, import_url_join4.default)(
2893
3251
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2894
- "namespaces"
3252
+ "health/fanout"
2895
3253
  ),
2896
3254
  method: "GET",
2897
3255
  headers: {
@@ -2902,14 +3260,13 @@ var Namespaces = class {
2902
3260
  ...requestOptions?.headers
2903
3261
  },
2904
3262
  contentType: "application/json",
2905
- queryParameters: _queryParams,
2906
3263
  requestType: "json",
2907
3264
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2908
3265
  maxRetries: requestOptions?.maxRetries,
2909
3266
  abortSignal: requestOptions?.abortSignal
2910
3267
  });
2911
3268
  if (_response.ok) {
2912
- return NamespaceListResponse.parseOrThrow(_response.body, {
3269
+ return HealthFanoutResponse.parseOrThrow(_response.body, {
2913
3270
  unrecognizedObjectKeys: "passthrough",
2914
3271
  allowUnrecognizedUnionMembers: true,
2915
3272
  allowUnrecognizedEnumValues: true,
@@ -2930,29 +3287,37 @@ var Namespaces = class {
2930
3287
  body: _response.error.rawBody
2931
3288
  });
2932
3289
  case "timeout":
2933
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3290
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2934
3291
  case "unknown":
2935
3292
  throw new RivetError({
2936
3293
  message: _response.error.errorMessage
2937
3294
  });
2938
3295
  }
2939
3296
  }
3297
+ async _getAuthorizationHeader() {
3298
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3299
+ }
3300
+ };
3301
+
3302
+ // src/api/resources/metadata/client/Client.ts
3303
+ var import_url_join5 = __toESM(require("url-join"));
3304
+ var Metadata = class {
3305
+ constructor(_options) {
3306
+ this._options = _options;
3307
+ }
2940
3308
  /**
2941
- * @param {Rivet.NamespacesCreateRequest} request
2942
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3309
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2943
3310
  *
2944
3311
  * @example
2945
- * await client.namespaces.create({
2946
- * name: "name"
2947
- * })
3312
+ * await client.metadata.get()
2948
3313
  */
2949
- async create(request, requestOptions) {
3314
+ async get(requestOptions) {
2950
3315
  const _response = await (this._options.fetcher ?? fetcher)({
2951
- url: (0, import_url_join4.default)(
3316
+ url: (0, import_url_join5.default)(
2952
3317
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2953
- "namespaces"
3318
+ "metadata"
2954
3319
  ),
2955
- method: "POST",
3320
+ method: "GET",
2956
3321
  headers: {
2957
3322
  Authorization: await this._getAuthorizationHeader(),
2958
3323
  "X-Fern-Language": "JavaScript",
@@ -2962,13 +3327,12 @@ var Namespaces = class {
2962
3327
  },
2963
3328
  contentType: "application/json",
2964
3329
  requestType: "json",
2965
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2966
3330
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2967
3331
  maxRetries: requestOptions?.maxRetries,
2968
3332
  abortSignal: requestOptions?.abortSignal
2969
3333
  });
2970
3334
  if (_response.ok) {
2971
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3335
+ return MetadataGetResponse.parseOrThrow(_response.body, {
2972
3336
  unrecognizedObjectKeys: "passthrough",
2973
3337
  allowUnrecognizedUnionMembers: true,
2974
3338
  allowUnrecognizedEnumValues: true,
@@ -2989,7 +3353,7 @@ var Namespaces = class {
2989
3353
  body: _response.error.rawBody
2990
3354
  });
2991
3355
  case "timeout":
2992
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3356
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2993
3357
  case "unknown":
2994
3358
  throw new RivetError({
2995
3359
  message: _response.error.errorMessage
@@ -3001,40 +3365,49 @@ var Namespaces = class {
3001
3365
  }
3002
3366
  };
3003
3367
 
3004
- // src/api/resources/pools/client/Client.ts
3005
- var import_url_join5 = __toESM(require("url-join"));
3006
- var Pools = class {
3368
+ // src/api/resources/namespaces/client/Client.ts
3369
+ var import_url_join6 = __toESM(require("url-join"));
3370
+ var Namespaces = class {
3007
3371
  constructor(_options) {
3008
3372
  this._options = _options;
3009
3373
  }
3010
3374
  /**
3011
- * Lists the namespace's pools by name. Changes apply on each node's next connection.
3012
- *
3013
- * @param {Rivet.PoolsListRequest} request
3014
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3375
+ * @param {Rivet.NamespacesListRequest} request
3376
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3015
3377
  *
3016
3378
  * @example
3017
- * await client.pools.list({
3018
- * namespace: "namespace"
3019
- * })
3379
+ * await client.namespaces.list()
3020
3380
  */
3021
- async list(request, requestOptions) {
3022
- const { namespace, limit, cursor } = request;
3381
+ async list(request = {}, requestOptions) {
3382
+ const { limit, cursor, name, namespaceIds, namespaceId } = request;
3023
3383
  const _queryParams = {};
3024
- if (namespace != null)
3025
- _queryParams["namespace"] = namespace;
3026
3384
  if (limit != null) {
3027
3385
  _queryParams["limit"] = limit.toString();
3028
3386
  }
3029
3387
  if (cursor != null) {
3030
3388
  _queryParams["cursor"] = cursor;
3031
3389
  }
3032
- const _response = await (this._options.fetcher ?? fetcher)({
3033
- url: (0, import_url_join5.default)(
3034
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3035
- "pools"
3036
- ),
3037
- method: "GET",
3390
+ if (name != null) {
3391
+ _queryParams["name"] = name;
3392
+ }
3393
+ if (namespaceIds != null) {
3394
+ _queryParams["namespace_ids"] = namespaceIds;
3395
+ }
3396
+ if (namespaceId != null) {
3397
+ if (Array.isArray(namespaceId)) {
3398
+ _queryParams["namespace_id"] = namespaceId.map(
3399
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3400
+ );
3401
+ } else {
3402
+ _queryParams["namespace_id"] = namespaceId;
3403
+ }
3404
+ }
3405
+ const _response = await (this._options.fetcher ?? fetcher)({
3406
+ url: (0, import_url_join6.default)(
3407
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3408
+ "namespaces"
3409
+ ),
3410
+ method: "GET",
3038
3411
  headers: {
3039
3412
  Authorization: await this._getAuthorizationHeader(),
3040
3413
  "X-Fern-Language": "JavaScript",
@@ -3050,7 +3423,7 @@ var Pools = class {
3050
3423
  abortSignal: requestOptions?.abortSignal
3051
3424
  });
3052
3425
  if (_response.ok) {
3053
- return PoolsListResponse.parseOrThrow(_response.body, {
3426
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3054
3427
  unrecognizedObjectKeys: "passthrough",
3055
3428
  allowUnrecognizedUnionMembers: true,
3056
3429
  allowUnrecognizedEnumValues: true,
@@ -3071,7 +3444,7 @@ var Pools = class {
3071
3444
  body: _response.error.rawBody
3072
3445
  });
3073
3446
  case "timeout":
3074
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3447
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3075
3448
  case "unknown":
3076
3449
  throw new RivetError({
3077
3450
  message: _response.error.errorMessage
@@ -3079,34 +3452,22 @@ var Pools = class {
3079
3452
  }
3080
3453
  }
3081
3454
  /**
3082
- * Lists the live nodes of a pool in node key order.
3083
- *
3084
- * @param {string} pool
3085
- * @param {Rivet.PoolsListNodesRequest} request
3086
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3455
+ * @param {Rivet.NamespacesCreateRequest} request
3456
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3087
3457
  *
3088
3458
  * @example
3089
- * await client.pools.listNodes("pool", {
3090
- * namespace: "namespace"
3459
+ * await client.namespaces.create({
3460
+ * displayName: "display_name",
3461
+ * name: "name"
3091
3462
  * })
3092
3463
  */
3093
- async listNodes(pool, request, requestOptions) {
3094
- const { namespace, limit, cursor } = request;
3095
- const _queryParams = {};
3096
- if (namespace != null)
3097
- _queryParams["namespace"] = namespace;
3098
- if (limit != null) {
3099
- _queryParams["limit"] = limit.toString();
3100
- }
3101
- if (cursor != null) {
3102
- _queryParams["cursor"] = cursor;
3103
- }
3464
+ async create(request, requestOptions) {
3104
3465
  const _response = await (this._options.fetcher ?? fetcher)({
3105
- url: (0, import_url_join5.default)(
3466
+ url: (0, import_url_join6.default)(
3106
3467
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3107
- `pools/${encodeURIComponent(pool)}/nodes`
3468
+ "namespaces"
3108
3469
  ),
3109
- method: "GET",
3470
+ method: "POST",
3110
3471
  headers: {
3111
3472
  Authorization: await this._getAuthorizationHeader(),
3112
3473
  "X-Fern-Language": "JavaScript",
@@ -3115,14 +3476,14 @@ var Pools = class {
3115
3476
  ...requestOptions?.headers
3116
3477
  },
3117
3478
  contentType: "application/json",
3118
- queryParameters: _queryParams,
3119
3479
  requestType: "json",
3480
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3120
3481
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3121
3482
  maxRetries: requestOptions?.maxRetries,
3122
3483
  abortSignal: requestOptions?.abortSignal
3123
3484
  });
3124
3485
  if (_response.ok) {
3125
- return PoolsListNodesResponse.parseOrThrow(_response.body, {
3486
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3126
3487
  unrecognizedObjectKeys: "passthrough",
3127
3488
  allowUnrecognizedUnionMembers: true,
3128
3489
  allowUnrecognizedEnumValues: true,
@@ -3143,21 +3504,65 @@ var Pools = class {
3143
3504
  body: _response.error.rawBody
3144
3505
  });
3145
3506
  case "timeout":
3146
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3507
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3147
3508
  case "unknown":
3148
3509
  throw new RivetError({
3149
3510
  message: _response.error.errorMessage
3150
3511
  });
3151
3512
  }
3152
3513
  }
3153
- async get(name, request = {}, requestOptions) {
3514
+ async _getAuthorizationHeader() {
3515
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3516
+ }
3517
+ };
3518
+
3519
+ // src/api/resources/runners/client/Client.ts
3520
+ var import_url_join7 = __toESM(require("url-join"));
3521
+ var Runners = class {
3522
+ constructor(_options) {
3523
+ this._options = _options;
3524
+ }
3525
+ /**
3526
+ * @param {Rivet.RunnersListRequest} request
3527
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3528
+ *
3529
+ * @example
3530
+ * await client.runners.list({
3531
+ * namespace: "namespace"
3532
+ * })
3533
+ */
3534
+ async list(request, requestOptions) {
3535
+ const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3154
3536
  const _queryParams = {};
3155
- if (request.namespace != null)
3156
- _queryParams["namespace"] = request.namespace;
3537
+ _queryParams["namespace"] = namespace;
3538
+ if (name != null) {
3539
+ _queryParams["name"] = name;
3540
+ }
3541
+ if (runnerIds != null) {
3542
+ _queryParams["runner_ids"] = runnerIds;
3543
+ }
3544
+ if (runnerId != null) {
3545
+ if (Array.isArray(runnerId)) {
3546
+ _queryParams["runner_id"] = runnerId.map(
3547
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3548
+ );
3549
+ } else {
3550
+ _queryParams["runner_id"] = runnerId;
3551
+ }
3552
+ }
3553
+ if (includeStopped != null) {
3554
+ _queryParams["include_stopped"] = includeStopped.toString();
3555
+ }
3556
+ if (limit != null) {
3557
+ _queryParams["limit"] = limit.toString();
3558
+ }
3559
+ if (cursor != null) {
3560
+ _queryParams["cursor"] = cursor;
3561
+ }
3157
3562
  const _response = await (this._options.fetcher ?? fetcher)({
3158
- url: (0, import_url_join5.default)(
3563
+ url: (0, import_url_join7.default)(
3159
3564
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3160
- `pools/${encodeURIComponent(name)}`
3565
+ "runners"
3161
3566
  ),
3162
3567
  method: "GET",
3163
3568
  headers: {
@@ -3175,7 +3580,7 @@ var Pools = class {
3175
3580
  abortSignal: requestOptions?.abortSignal
3176
3581
  });
3177
3582
  if (_response.ok) {
3178
- return PoolResponse.parseOrThrow(_response.body, {
3583
+ return RunnersListResponse.parseOrThrow(_response.body, {
3179
3584
  unrecognizedObjectKeys: "passthrough",
3180
3585
  allowUnrecognizedUnionMembers: true,
3181
3586
  allowUnrecognizedEnumValues: true,
@@ -3196,23 +3601,43 @@ var Pools = class {
3196
3601
  body: _response.error.rawBody
3197
3602
  });
3198
3603
  case "timeout":
3199
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3604
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3200
3605
  case "unknown":
3201
3606
  throw new RivetError({
3202
3607
  message: _response.error.errorMessage
3203
3608
  });
3204
3609
  }
3205
3610
  }
3206
- async upsert(name, request, requestOptions) {
3611
+ /**
3612
+ * 2 round trips:
3613
+ *
3614
+ * - GET /runners/names (fanout)
3615
+ * - [api-peer] namespace::ops::resolve_for_name_global
3616
+ *
3617
+ * @param {Rivet.RunnersListNamesRequest} request
3618
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3619
+ *
3620
+ * @example
3621
+ * await client.runners.listNames({
3622
+ * namespace: "namespace"
3623
+ * })
3624
+ */
3625
+ async listNames(request, requestOptions) {
3626
+ const { namespace, limit, cursor } = request;
3207
3627
  const _queryParams = {};
3208
- if (request.namespace != null)
3209
- _queryParams["namespace"] = request.namespace;
3628
+ _queryParams["namespace"] = namespace;
3629
+ if (limit != null) {
3630
+ _queryParams["limit"] = limit.toString();
3631
+ }
3632
+ if (cursor != null) {
3633
+ _queryParams["cursor"] = cursor;
3634
+ }
3210
3635
  const _response = await (this._options.fetcher ?? fetcher)({
3211
- url: (0, import_url_join5.default)(
3636
+ url: (0, import_url_join7.default)(
3212
3637
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3213
- `pools/${encodeURIComponent(name)}`
3638
+ "runners/names"
3214
3639
  ),
3215
- method: "PUT",
3640
+ method: "GET",
3216
3641
  headers: {
3217
3642
  Authorization: await this._getAuthorizationHeader(),
3218
3643
  "X-Fern-Language": "JavaScript",
@@ -3223,19 +3648,12 @@ var Pools = class {
3223
3648
  contentType: "application/json",
3224
3649
  queryParameters: _queryParams,
3225
3650
  requestType: "json",
3226
- body: {
3227
- drain_on_version_upgrade: request.drainOnVersionUpgrade,
3228
- actor_eviction_delay: request.actorEvictionDelay,
3229
- actor_eviction_period: request.actorEvictionPeriod,
3230
- actor_eviction_rate: request.actorEvictionRate,
3231
- metadata: request.metadata
3232
- },
3233
3651
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3234
3652
  maxRetries: requestOptions?.maxRetries,
3235
3653
  abortSignal: requestOptions?.abortSignal
3236
3654
  });
3237
3655
  if (_response.ok) {
3238
- return PoolResponse.parseOrThrow(_response.body, {
3656
+ return RunnersListNamesResponse.parseOrThrow(_response.body, {
3239
3657
  unrecognizedObjectKeys: "passthrough",
3240
3658
  allowUnrecognizedUnionMembers: true,
3241
3659
  allowUnrecognizedEnumValues: true,
@@ -3256,54 +3674,7 @@ var Pools = class {
3256
3674
  body: _response.error.rawBody
3257
3675
  });
3258
3676
  case "timeout":
3259
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3260
- case "unknown":
3261
- throw new RivetError({
3262
- message: _response.error.errorMessage
3263
- });
3264
- }
3265
- }
3266
- async delete(name, request = {}, requestOptions) {
3267
- const _queryParams = {};
3268
- if (request.namespace != null)
3269
- _queryParams["namespace"] = request.namespace;
3270
- const _response = await (this._options.fetcher ?? fetcher)({
3271
- url: (0, import_url_join5.default)(
3272
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3273
- `pools/${encodeURIComponent(name)}`
3274
- ),
3275
- method: "DELETE",
3276
- headers: {
3277
- Authorization: await this._getAuthorizationHeader(),
3278
- "X-Fern-Language": "JavaScript",
3279
- "X-Fern-Runtime": RUNTIME.type,
3280
- "X-Fern-Runtime-Version": RUNTIME.version,
3281
- ...requestOptions?.headers
3282
- },
3283
- contentType: "application/json",
3284
- queryParameters: _queryParams,
3285
- requestType: "json",
3286
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3287
- maxRetries: requestOptions?.maxRetries,
3288
- abortSignal: requestOptions?.abortSignal
3289
- });
3290
- if (_response.ok) {
3291
- return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3292
- }
3293
- if (_response.error.reason === "status-code") {
3294
- throw new RivetError({
3295
- statusCode: _response.error.statusCode,
3296
- body: _response.error.body
3297
- });
3298
- }
3299
- switch (_response.error.reason) {
3300
- case "non-json":
3301
- throw new RivetError({
3302
- statusCode: _response.error.statusCode,
3303
- body: _response.error.rawBody
3304
- });
3305
- case "timeout":
3306
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3677
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3307
3678
  case "unknown":
3308
3679
  throw new RivetError({
3309
3680
  message: _response.error.errorMessage
@@ -3322,23 +3693,31 @@ var RivetClient = class {
3322
3693
  }
3323
3694
  _authTokens;
3324
3695
  _datacenters;
3696
+ _envoys;
3697
+ _health;
3325
3698
  _metadata;
3326
3699
  _namespaces;
3327
- _pools;
3700
+ _runners;
3328
3701
  get authTokens() {
3329
3702
  return this._authTokens ??= new AuthTokens(this._options);
3330
3703
  }
3331
3704
  get datacenters() {
3332
3705
  return this._datacenters ??= new Datacenters(this._options);
3333
3706
  }
3707
+ get envoys() {
3708
+ return this._envoys ??= new Envoys(this._options);
3709
+ }
3710
+ get health() {
3711
+ return this._health ??= new Health(this._options);
3712
+ }
3334
3713
  get metadata() {
3335
3714
  return this._metadata ??= new Metadata(this._options);
3336
3715
  }
3337
3716
  get namespaces() {
3338
3717
  return this._namespaces ??= new Namespaces(this._options);
3339
3718
  }
3340
- get pools() {
3341
- return this._pools ??= new Pools(this._options);
3719
+ get runners() {
3720
+ return this._runners ??= new Runners(this._options);
3342
3721
  }
3343
3722
  /**
3344
3723
  * **If key is some & `include_destroyed` is false**
@@ -3375,8 +3754,7 @@ var RivetClient = class {
3375
3754
  async actorsList(request, requestOptions) {
3376
3755
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3377
3756
  const _queryParams = {};
3378
- if (namespace != null)
3379
- _queryParams["namespace"] = namespace;
3757
+ _queryParams["namespace"] = namespace;
3380
3758
  if (name != null) {
3381
3759
  _queryParams["name"] = name;
3382
3760
  }
@@ -3386,8 +3764,15 @@ var RivetClient = class {
3386
3764
  if (actorIds != null) {
3387
3765
  _queryParams["actor_ids"] = actorIds;
3388
3766
  }
3389
- if (actorId != null)
3390
- _queryParams["actor_id"] = actorId;
3767
+ if (actorId != null) {
3768
+ if (Array.isArray(actorId)) {
3769
+ _queryParams["actor_id"] = actorId.map(
3770
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3771
+ );
3772
+ } else {
3773
+ _queryParams["actor_id"] = actorId;
3774
+ }
3775
+ }
3391
3776
  if (includeDestroyed != null) {
3392
3777
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3393
3778
  }
@@ -3398,7 +3783,7 @@ var RivetClient = class {
3398
3783
  _queryParams["cursor"] = cursor;
3399
3784
  }
3400
3785
  const _response = await (this._options.fetcher ?? fetcher)({
3401
- url: (0, import_url_join6.default)(
3786
+ url: (0, import_url_join8.default)(
3402
3787
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3403
3788
  "actors"
3404
3789
  ),
@@ -3470,17 +3855,17 @@ var RivetClient = class {
3470
3855
  * @example
3471
3856
  * await client.actorsCreate({
3472
3857
  * namespace: "namespace",
3858
+ * crashPolicy: "restart",
3473
3859
  * name: "name",
3474
- * pool: "pool"
3860
+ * runnerNameSelector: "runner_name_selector"
3475
3861
  * })
3476
3862
  */
3477
3863
  async actorsCreate(request, requestOptions) {
3478
3864
  const { namespace, ..._body } = request;
3479
3865
  const _queryParams = {};
3480
- if (namespace != null)
3481
- _queryParams["namespace"] = namespace;
3866
+ _queryParams["namespace"] = namespace;
3482
3867
  const _response = await (this._options.fetcher ?? fetcher)({
3483
- url: (0, import_url_join6.default)(
3868
+ url: (0, import_url_join8.default)(
3484
3869
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3485
3870
  "actors"
3486
3871
  ),
@@ -3562,18 +3947,18 @@ var RivetClient = class {
3562
3947
  * @example
3563
3948
  * await client.actorsGetOrCreate({
3564
3949
  * namespace: "namespace",
3950
+ * crashPolicy: "restart",
3565
3951
  * key: "key",
3566
3952
  * name: "name",
3567
- * pool: "pool"
3953
+ * runnerNameSelector: "runner_name_selector"
3568
3954
  * })
3569
3955
  */
3570
3956
  async actorsGetOrCreate(request, requestOptions) {
3571
3957
  const { namespace, ..._body } = request;
3572
3958
  const _queryParams = {};
3573
- if (namespace != null)
3574
- _queryParams["namespace"] = namespace;
3959
+ _queryParams["namespace"] = namespace;
3575
3960
  const _response = await (this._options.fetcher ?? fetcher)({
3576
- url: (0, import_url_join6.default)(
3961
+ url: (0, import_url_join8.default)(
3577
3962
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3578
3963
  "actors"
3579
3964
  ),
@@ -3639,8 +4024,7 @@ var RivetClient = class {
3639
4024
  async actorsListNames(request, requestOptions) {
3640
4025
  const { namespace, limit, cursor } = request;
3641
4026
  const _queryParams = {};
3642
- if (namespace != null)
3643
- _queryParams["namespace"] = namespace;
4027
+ _queryParams["namespace"] = namespace;
3644
4028
  if (limit != null) {
3645
4029
  _queryParams["limit"] = limit.toString();
3646
4030
  }
@@ -3648,7 +4032,7 @@ var RivetClient = class {
3648
4032
  _queryParams["cursor"] = cursor;
3649
4033
  }
3650
4034
  const _response = await (this._options.fetcher ?? fetcher)({
3651
- url: (0, import_url_join6.default)(
4035
+ url: (0, import_url_join8.default)(
3652
4036
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3653
4037
  "actors/names"
3654
4038
  ),
@@ -3711,18 +4095,16 @@ var RivetClient = class {
3711
4095
  * namespace: "namespace"
3712
4096
  * })
3713
4097
  */
3714
- /** Returns one actor by ID. */
3715
- async actorsGet(actorId, request, requestOptions) {
4098
+ async actorsDelete(actorId, request, requestOptions) {
3716
4099
  const { namespace } = request;
3717
4100
  const _queryParams = {};
3718
- if (namespace != null)
3719
- _queryParams["namespace"] = namespace;
4101
+ _queryParams["namespace"] = namespace;
3720
4102
  const _response = await (this._options.fetcher ?? fetcher)({
3721
- url: (0, import_url_join6.default)(
4103
+ url: (0, import_url_join8.default)(
3722
4104
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3723
4105
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3724
4106
  ),
3725
- method: "GET",
4107
+ method: "DELETE",
3726
4108
  headers: {
3727
4109
  Authorization: await this._getAuthorizationHeader(),
3728
4110
  "X-Fern-Language": "JavaScript",
@@ -3738,7 +4120,7 @@ var RivetClient = class {
3738
4120
  abortSignal: requestOptions?.abortSignal
3739
4121
  });
3740
4122
  if (_response.ok) {
3741
- return ActorsGetResponse.parseOrThrow(_response.body, {
4123
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
3742
4124
  unrecognizedObjectKeys: "passthrough",
3743
4125
  allowUnrecognizedUnionMembers: true,
3744
4126
  allowUnrecognizedEnumValues: true,
@@ -3759,24 +4141,34 @@ var RivetClient = class {
3759
4141
  body: _response.error.rawBody
3760
4142
  });
3761
4143
  case "timeout":
3762
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4144
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3763
4145
  case "unknown":
3764
4146
  throw new RivetError({
3765
4147
  message: _response.error.errorMessage
3766
4148
  });
3767
4149
  }
3768
4150
  }
3769
- async actorsDelete(actorId, request, requestOptions) {
4151
+ /**
4152
+ * @param {Rivet.RivetId} actorId
4153
+ * @param {string} key
4154
+ * @param {Rivet.ActorsKvGetRequest} request
4155
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4156
+ *
4157
+ * @example
4158
+ * await client.actorsKvGet("actor_id", "key", {
4159
+ * namespace: "namespace"
4160
+ * })
4161
+ */
4162
+ async actorsKvGet(actorId, key, request, requestOptions) {
3770
4163
  const { namespace } = request;
3771
4164
  const _queryParams = {};
3772
- if (namespace != null)
3773
- _queryParams["namespace"] = namespace;
4165
+ _queryParams["namespace"] = namespace;
3774
4166
  const _response = await (this._options.fetcher ?? fetcher)({
3775
- url: (0, import_url_join6.default)(
4167
+ url: (0, import_url_join8.default)(
3776
4168
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3777
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4169
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3778
4170
  ),
3779
- method: "DELETE",
4171
+ method: "GET",
3780
4172
  headers: {
3781
4173
  Authorization: await this._getAuthorizationHeader(),
3782
4174
  "X-Fern-Language": "JavaScript",
@@ -3792,7 +4184,7 @@ var RivetClient = class {
3792
4184
  abortSignal: requestOptions?.abortSignal
3793
4185
  });
3794
4186
  if (_response.ok) {
3795
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
4187
+ return ActorsKvGetResponse.parseOrThrow(_response.body, {
3796
4188
  unrecognizedObjectKeys: "passthrough",
3797
4189
  allowUnrecognizedUnionMembers: true,
3798
4190
  allowUnrecognizedEnumValues: true,
@@ -3813,7 +4205,9 @@ var RivetClient = class {
3813
4205
  body: _response.error.rawBody
3814
4206
  });
3815
4207
  case "timeout":
3816
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4208
+ throw new RivetTimeoutError(
4209
+ "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4210
+ );
3817
4211
  case "unknown":
3818
4212
  throw new RivetError({
3819
4213
  message: _response.error.errorMessage
@@ -3828,15 +4222,17 @@ var RivetClient = class {
3828
4222
  * @example
3829
4223
  * await client.actorsReschedule("actor_id", {
3830
4224
  * namespace: "namespace",
4225
+ * body: {
4226
+ * "key": "value"
4227
+ * }
3831
4228
  * })
3832
4229
  */
3833
4230
  async actorsReschedule(actorId, request, requestOptions) {
3834
- const { namespace } = request;
4231
+ const { namespace, body: _body } = request;
3835
4232
  const _queryParams = {};
3836
- if (namespace != null)
3837
- _queryParams["namespace"] = namespace;
4233
+ _queryParams["namespace"] = namespace;
3838
4234
  const _response = await (this._options.fetcher ?? fetcher)({
3839
- url: (0, import_url_join6.default)(
4235
+ url: (0, import_url_join8.default)(
3840
4236
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3841
4237
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
3842
4238
  ),
@@ -3851,6 +4247,7 @@ var RivetClient = class {
3851
4247
  contentType: "application/json",
3852
4248
  queryParameters: _queryParams,
3853
4249
  requestType: "json",
4250
+ body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3854
4251
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3855
4252
  maxRetries: requestOptions?.maxRetries,
3856
4253
  abortSignal: requestOptions?.abortSignal
@@ -3892,15 +4289,17 @@ var RivetClient = class {
3892
4289
  * @example
3893
4290
  * await client.actorsSleep("actor_id", {
3894
4291
  * namespace: "namespace",
4292
+ * body: {
4293
+ * "key": "value"
4294
+ * }
3895
4295
  * })
3896
4296
  */
3897
4297
  async actorsSleep(actorId, request, requestOptions) {
3898
- const { namespace } = request;
4298
+ const { namespace, body: _body } = request;
3899
4299
  const _queryParams = {};
3900
- if (namespace != null)
3901
- _queryParams["namespace"] = namespace;
4300
+ _queryParams["namespace"] = namespace;
3902
4301
  const _response = await (this._options.fetcher ?? fetcher)({
3903
- url: (0, import_url_join6.default)(
4302
+ url: (0, import_url_join8.default)(
3904
4303
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3905
4304
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
3906
4305
  ),
@@ -3915,6 +4314,7 @@ var RivetClient = class {
3915
4314
  contentType: "application/json",
3916
4315
  queryParameters: _queryParams,
3917
4316
  requestType: "json",
4317
+ body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3918
4318
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3919
4319
  maxRetries: requestOptions?.maxRetries,
3920
4320
  abortSignal: requestOptions?.abortSignal
@@ -3948,6 +4348,360 @@ var RivetClient = class {
3948
4348
  });
3949
4349
  }
3950
4350
  }
4351
+ /**
4352
+ * @param {Rivet.RunnerConfigsListRequest} request
4353
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4354
+ *
4355
+ * @example
4356
+ * await client.runnerConfigsList({
4357
+ * namespace: "namespace"
4358
+ * })
4359
+ */
4360
+ async runnerConfigsList(request, requestOptions) {
4361
+ const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
4362
+ const _queryParams = {};
4363
+ _queryParams["namespace"] = namespace;
4364
+ if (limit != null) {
4365
+ _queryParams["limit"] = limit.toString();
4366
+ }
4367
+ if (cursor != null) {
4368
+ _queryParams["cursor"] = cursor;
4369
+ }
4370
+ if (variant != null) {
4371
+ _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4372
+ unrecognizedObjectKeys: "strip"
4373
+ });
4374
+ }
4375
+ if (runnerNames != null) {
4376
+ _queryParams["runner_names"] = runnerNames;
4377
+ }
4378
+ if (runnerName != null) {
4379
+ if (Array.isArray(runnerName)) {
4380
+ _queryParams["runner_name"] = runnerName.map((item) => item);
4381
+ } else {
4382
+ _queryParams["runner_name"] = runnerName;
4383
+ }
4384
+ }
4385
+ const _response = await (this._options.fetcher ?? fetcher)({
4386
+ url: (0, import_url_join8.default)(
4387
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4388
+ "runner-configs"
4389
+ ),
4390
+ method: "GET",
4391
+ headers: {
4392
+ Authorization: await this._getAuthorizationHeader(),
4393
+ "X-Fern-Language": "JavaScript",
4394
+ "X-Fern-Runtime": RUNTIME.type,
4395
+ "X-Fern-Runtime-Version": RUNTIME.version,
4396
+ ...requestOptions?.headers
4397
+ },
4398
+ contentType: "application/json",
4399
+ queryParameters: _queryParams,
4400
+ requestType: "json",
4401
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4402
+ maxRetries: requestOptions?.maxRetries,
4403
+ abortSignal: requestOptions?.abortSignal
4404
+ });
4405
+ if (_response.ok) {
4406
+ return RunnerConfigsListResponse.parseOrThrow(_response.body, {
4407
+ unrecognizedObjectKeys: "passthrough",
4408
+ allowUnrecognizedUnionMembers: true,
4409
+ allowUnrecognizedEnumValues: true,
4410
+ skipValidation: true,
4411
+ breadcrumbsPrefix: ["response"]
4412
+ });
4413
+ }
4414
+ if (_response.error.reason === "status-code") {
4415
+ throw new RivetError({
4416
+ statusCode: _response.error.statusCode,
4417
+ body: _response.error.body
4418
+ });
4419
+ }
4420
+ switch (_response.error.reason) {
4421
+ case "non-json":
4422
+ throw new RivetError({
4423
+ statusCode: _response.error.statusCode,
4424
+ body: _response.error.rawBody
4425
+ });
4426
+ case "timeout":
4427
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
4428
+ case "unknown":
4429
+ throw new RivetError({
4430
+ message: _response.error.errorMessage
4431
+ });
4432
+ }
4433
+ }
4434
+ /**
4435
+ * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4436
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4437
+ *
4438
+ * @example
4439
+ * await client.runnerConfigsServerlessHealthCheck({
4440
+ * namespace: "namespace",
4441
+ * url: "url"
4442
+ * })
4443
+ */
4444
+ async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4445
+ const { namespace, ..._body } = request;
4446
+ const _queryParams = {};
4447
+ _queryParams["namespace"] = namespace;
4448
+ const _response = await (this._options.fetcher ?? fetcher)({
4449
+ url: (0, import_url_join8.default)(
4450
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4451
+ "runner-configs/serverless-health-check"
4452
+ ),
4453
+ method: "POST",
4454
+ headers: {
4455
+ Authorization: await this._getAuthorizationHeader(),
4456
+ "X-Fern-Language": "JavaScript",
4457
+ "X-Fern-Runtime": RUNTIME.type,
4458
+ "X-Fern-Runtime-Version": RUNTIME.version,
4459
+ ...requestOptions?.headers
4460
+ },
4461
+ contentType: "application/json",
4462
+ queryParameters: _queryParams,
4463
+ requestType: "json",
4464
+ body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4465
+ unrecognizedObjectKeys: "strip"
4466
+ }),
4467
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4468
+ maxRetries: requestOptions?.maxRetries,
4469
+ abortSignal: requestOptions?.abortSignal
4470
+ });
4471
+ if (_response.ok) {
4472
+ return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
4473
+ unrecognizedObjectKeys: "passthrough",
4474
+ allowUnrecognizedUnionMembers: true,
4475
+ allowUnrecognizedEnumValues: true,
4476
+ skipValidation: true,
4477
+ breadcrumbsPrefix: ["response"]
4478
+ });
4479
+ }
4480
+ if (_response.error.reason === "status-code") {
4481
+ throw new RivetError({
4482
+ statusCode: _response.error.statusCode,
4483
+ body: _response.error.body
4484
+ });
4485
+ }
4486
+ switch (_response.error.reason) {
4487
+ case "non-json":
4488
+ throw new RivetError({
4489
+ statusCode: _response.error.statusCode,
4490
+ body: _response.error.rawBody
4491
+ });
4492
+ case "timeout":
4493
+ throw new RivetTimeoutError(
4494
+ "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4495
+ );
4496
+ case "unknown":
4497
+ throw new RivetError({
4498
+ message: _response.error.errorMessage
4499
+ });
4500
+ }
4501
+ }
4502
+ /**
4503
+ * @param {string} runnerName
4504
+ * @param {Rivet.RunnerConfigsUpsertRequestBody} request
4505
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4506
+ *
4507
+ * @example
4508
+ * await client.runnerConfigsUpsert("runner_name", {
4509
+ * namespace: "namespace",
4510
+ * datacenters: {
4511
+ * "key": {}
4512
+ * }
4513
+ * })
4514
+ */
4515
+ async runnerConfigsUpsert(runnerName, request, requestOptions) {
4516
+ const { namespace, ..._body } = request;
4517
+ const _queryParams = {};
4518
+ _queryParams["namespace"] = namespace;
4519
+ const _response = await (this._options.fetcher ?? fetcher)({
4520
+ url: (0, import_url_join8.default)(
4521
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4522
+ `runner-configs/${encodeURIComponent(runnerName)}`
4523
+ ),
4524
+ method: "PUT",
4525
+ headers: {
4526
+ Authorization: await this._getAuthorizationHeader(),
4527
+ "X-Fern-Language": "JavaScript",
4528
+ "X-Fern-Runtime": RUNTIME.type,
4529
+ "X-Fern-Runtime-Version": RUNTIME.version,
4530
+ ...requestOptions?.headers
4531
+ },
4532
+ contentType: "application/json",
4533
+ queryParameters: _queryParams,
4534
+ requestType: "json",
4535
+ body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4536
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4537
+ maxRetries: requestOptions?.maxRetries,
4538
+ abortSignal: requestOptions?.abortSignal
4539
+ });
4540
+ if (_response.ok) {
4541
+ return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
4542
+ unrecognizedObjectKeys: "passthrough",
4543
+ allowUnrecognizedUnionMembers: true,
4544
+ allowUnrecognizedEnumValues: true,
4545
+ skipValidation: true,
4546
+ breadcrumbsPrefix: ["response"]
4547
+ });
4548
+ }
4549
+ if (_response.error.reason === "status-code") {
4550
+ throw new RivetError({
4551
+ statusCode: _response.error.statusCode,
4552
+ body: _response.error.body
4553
+ });
4554
+ }
4555
+ switch (_response.error.reason) {
4556
+ case "non-json":
4557
+ throw new RivetError({
4558
+ statusCode: _response.error.statusCode,
4559
+ body: _response.error.rawBody
4560
+ });
4561
+ case "timeout":
4562
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
4563
+ case "unknown":
4564
+ throw new RivetError({
4565
+ message: _response.error.errorMessage
4566
+ });
4567
+ }
4568
+ }
4569
+ /**
4570
+ * @param {string} runnerName
4571
+ * @param {Rivet.RunnerConfigsDeleteRequest} request
4572
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4573
+ *
4574
+ * @example
4575
+ * await client.runnerConfigsDelete("runner_name", {
4576
+ * namespace: "namespace"
4577
+ * })
4578
+ */
4579
+ async runnerConfigsDelete(runnerName, request, requestOptions) {
4580
+ const { namespace } = request;
4581
+ const _queryParams = {};
4582
+ _queryParams["namespace"] = namespace;
4583
+ const _response = await (this._options.fetcher ?? fetcher)({
4584
+ url: (0, import_url_join8.default)(
4585
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4586
+ `runner-configs/${encodeURIComponent(runnerName)}`
4587
+ ),
4588
+ method: "DELETE",
4589
+ headers: {
4590
+ Authorization: await this._getAuthorizationHeader(),
4591
+ "X-Fern-Language": "JavaScript",
4592
+ "X-Fern-Runtime": RUNTIME.type,
4593
+ "X-Fern-Runtime-Version": RUNTIME.version,
4594
+ ...requestOptions?.headers
4595
+ },
4596
+ contentType: "application/json",
4597
+ queryParameters: _queryParams,
4598
+ requestType: "json",
4599
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4600
+ maxRetries: requestOptions?.maxRetries,
4601
+ abortSignal: requestOptions?.abortSignal
4602
+ });
4603
+ if (_response.ok) {
4604
+ return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4605
+ unrecognizedObjectKeys: "passthrough",
4606
+ allowUnrecognizedUnionMembers: true,
4607
+ allowUnrecognizedEnumValues: true,
4608
+ skipValidation: true,
4609
+ breadcrumbsPrefix: ["response"]
4610
+ });
4611
+ }
4612
+ if (_response.error.reason === "status-code") {
4613
+ throw new RivetError({
4614
+ statusCode: _response.error.statusCode,
4615
+ body: _response.error.body
4616
+ });
4617
+ }
4618
+ switch (_response.error.reason) {
4619
+ case "non-json":
4620
+ throw new RivetError({
4621
+ statusCode: _response.error.statusCode,
4622
+ body: _response.error.rawBody
4623
+ });
4624
+ case "timeout":
4625
+ throw new RivetTimeoutError(
4626
+ "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4627
+ );
4628
+ case "unknown":
4629
+ throw new RivetError({
4630
+ message: _response.error.errorMessage
4631
+ });
4632
+ }
4633
+ }
4634
+ /**
4635
+ * @param {string} runnerName
4636
+ * @param {Rivet.RunnerConfigsRefreshMetadataRequest} request
4637
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4638
+ *
4639
+ * @example
4640
+ * await client.runnerConfigsRefreshMetadata("runner_name", {
4641
+ * namespace: "namespace",
4642
+ * body: {
4643
+ * "key": "value"
4644
+ * }
4645
+ * })
4646
+ */
4647
+ async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4648
+ const { namespace, body: _body } = request;
4649
+ const _queryParams = {};
4650
+ _queryParams["namespace"] = namespace;
4651
+ const _response = await (this._options.fetcher ?? fetcher)({
4652
+ url: (0, import_url_join8.default)(
4653
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4654
+ `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4655
+ ),
4656
+ method: "POST",
4657
+ headers: {
4658
+ Authorization: await this._getAuthorizationHeader(),
4659
+ "X-Fern-Language": "JavaScript",
4660
+ "X-Fern-Runtime": RUNTIME.type,
4661
+ "X-Fern-Runtime-Version": RUNTIME.version,
4662
+ ...requestOptions?.headers
4663
+ },
4664
+ contentType: "application/json",
4665
+ queryParameters: _queryParams,
4666
+ requestType: "json",
4667
+ body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4668
+ unrecognizedObjectKeys: "strip"
4669
+ }),
4670
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4671
+ maxRetries: requestOptions?.maxRetries,
4672
+ abortSignal: requestOptions?.abortSignal
4673
+ });
4674
+ if (_response.ok) {
4675
+ return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4676
+ unrecognizedObjectKeys: "passthrough",
4677
+ allowUnrecognizedUnionMembers: true,
4678
+ allowUnrecognizedEnumValues: true,
4679
+ skipValidation: true,
4680
+ breadcrumbsPrefix: ["response"]
4681
+ });
4682
+ }
4683
+ if (_response.error.reason === "status-code") {
4684
+ throw new RivetError({
4685
+ statusCode: _response.error.statusCode,
4686
+ body: _response.error.body
4687
+ });
4688
+ }
4689
+ switch (_response.error.reason) {
4690
+ case "non-json":
4691
+ throw new RivetError({
4692
+ statusCode: _response.error.statusCode,
4693
+ body: _response.error.rawBody
4694
+ });
4695
+ case "timeout":
4696
+ throw new RivetTimeoutError(
4697
+ "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4698
+ );
4699
+ case "unknown":
4700
+ throw new RivetError({
4701
+ message: _response.error.errorMessage
4702
+ });
4703
+ }
4704
+ }
3951
4705
  async _getAuthorizationHeader() {
3952
4706
  return `Bearer ${await Supplier.get(this._options.token)}`;
3953
4707
  }