@rivetkit/engine-api-full 0.0.0-sqlite-sync-3x-release.a00b07f → 0.0.0-sqlite-query-metrics-v2.f5d3605

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 -326
  2. package/dist/browser/cjs/serialization.js +379 -93
  3. package/dist/browser/esm/index.js +1081 -326
  4. package/dist/browser/esm/serialization.js +379 -93
  5. package/dist/node/cjs/index.js +1081 -326
  6. package/dist/node/cjs/serialization.js +421 -103
  7. package/dist/node/esm/index.js +1081 -326
  8. package/dist/node/esm/serialization.js +379 -93
  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 -18
  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 -16
  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,75 +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(),
2658
+ // src/serialization/types/Runner.ts
2659
+ var Runner = schemas_exports.object({
2500
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()),
2501
2665
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2502
- connected: schemas_exports.boolean(),
2503
- 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()
2504
2675
  });
2505
2676
 
2506
- // src/serialization/types/Pool.ts
2507
- var Pool = schemas_exports.object({
2508
- name: schemas_exports.string(),
2509
- drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2510
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2511
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2512
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2513
- 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()
2514
2755
  });
2515
2756
 
2516
- // src/serialization/types/PoolResponse.ts
2517
- var PoolResponse = schemas_exports.object({
2518
- pool: Pool
2757
+ // src/serialization/types/RunnerConfigKindServerless.ts
2758
+ var RunnerConfigKindServerless = schemas_exports.object({
2759
+ serverless: RunnerConfigKindServerlessServerless
2519
2760
  });
2520
2761
 
2521
- // src/serialization/types/PoolsDeleteResponse.ts
2522
- var PoolsDeleteResponse = schemas_exports.object({});
2762
+ // src/serialization/types/RunnerConfigKind.ts
2763
+ var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2523
2764
 
2524
- // src/serialization/types/PoolsListNodesResponse.ts
2525
- var PoolsListNodesResponse = schemas_exports.object({
2526
- 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()),
2527
2841
  pagination: Pagination
2528
2842
  });
2529
2843
 
2530
- // src/serialization/types/PoolsListResponse.ts
2531
- var PoolsListResponse = schemas_exports.object({
2844
+ // src/serialization/types/RunnersListResponse.ts
2845
+ var RunnersListResponse = schemas_exports.object({
2532
2846
  pagination: Pagination,
2533
- pools: schemas_exports.list(Pool)
2847
+ runners: schemas_exports.list(Runner)
2534
2848
  });
2535
2849
 
2536
2850
  // src/serialization/client/requests/ActorsCreateRequest.ts
2537
2851
  var ActorsCreateRequest = schemas_exports.object({
2852
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2853
+ datacenter: schemas_exports.string().optional(),
2538
2854
  input: schemas_exports.string().optional(),
2539
2855
  key: schemas_exports.string().optional(),
2540
2856
  name: schemas_exports.string(),
2541
- pool: schemas_exports.string().optional()
2857
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2542
2858
  });
2543
2859
 
2544
2860
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2545
2861
  var ActorsGetOrCreateRequest = schemas_exports.object({
2862
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2863
+ datacenter: schemas_exports.string().optional(),
2546
2864
  input: schemas_exports.string().optional(),
2547
- key: schemas_exports.string().optional(),
2865
+ key: schemas_exports.string(),
2548
2866
  name: schemas_exports.string(),
2549
- 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()
2550
2893
  });
2551
2894
 
2552
2895
  // src/serialization/resources/namespaces/index.ts
2553
- var namespaces_exports = {};
2554
- __export(namespaces_exports, {
2896
+ var namespaces_exports2 = {};
2897
+ __export(namespaces_exports2, {
2555
2898
  NamespacesCreateRequest: () => NamespacesCreateRequest
2556
2899
  });
2557
2900
 
2558
2901
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2559
2902
  var NamespacesCreateRequest = schemas_exports.object({
2903
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2560
2904
  name: schemas_exports.string()
2561
2905
  });
2562
2906
 
2907
+ // src/Client.ts
2908
+ var import_url_join8 = __toESM(require("url-join"));
2909
+
2563
2910
  // src/errors/RivetError.ts
2564
2911
  var RivetError = class _RivetError extends Error {
2565
2912
  statusCode;
@@ -2602,10 +2949,25 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2602
2949
  };
2603
2950
 
2604
2951
  // src/api/resources/authTokens/client/Client.ts
2952
+ var import_url_join = __toESM(require("url-join"));
2605
2953
  var AuthTokens = class {
2606
2954
  constructor(_options) {
2607
2955
  this._options = _options;
2608
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
+ */
2609
2971
  async create(request, requestOptions) {
2610
2972
  const _response = await (this._options.fetcher ?? fetcher)({
2611
2973
  url: (0, import_url_join.default)(
@@ -2622,12 +2984,7 @@ var AuthTokens = class {
2622
2984
  },
2623
2985
  contentType: "application/json",
2624
2986
  requestType: "json",
2625
- body: {
2626
- namespace: request.namespace,
2627
- duration: request.duration,
2628
- subject: request.subject,
2629
- grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2630
- },
2987
+ body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2631
2988
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2632
2989
  maxRetries: requestOptions?.maxRetries,
2633
2990
  abortSignal: requestOptions?.abortSignal
@@ -2661,6 +3018,12 @@ var AuthTokens = class {
2661
3018
  });
2662
3019
  }
2663
3020
  }
3021
+ /**
3022
+ * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
3023
+ *
3024
+ * @example
3025
+ * await client.authTokens.inspect()
3026
+ */
2664
3027
  async inspect(requestOptions) {
2665
3028
  const _response = await (this._options.fetcher ?? fetcher)({
2666
3029
  url: (0, import_url_join.default)(
@@ -2715,21 +3078,6 @@ var AuthTokens = class {
2715
3078
  }
2716
3079
  };
2717
3080
 
2718
- // src/api/resources/datacenters/index.ts
2719
- var datacenters_exports = {};
2720
-
2721
- // src/api/resources/metadata/index.ts
2722
- var metadata_exports = {};
2723
-
2724
- // src/api/resources/namespaces/index.ts
2725
- var namespaces_exports2 = {};
2726
-
2727
- // src/api/resources/pools/index.ts
2728
- var pools_exports = {};
2729
-
2730
- // src/Client.ts
2731
- var import_url_join6 = __toESM(require("url-join"));
2732
-
2733
3081
  // src/api/resources/datacenters/client/Client.ts
2734
3082
  var import_url_join2 = __toESM(require("url-join"));
2735
3083
  var Datacenters = class {
@@ -2796,23 +3144,45 @@ var Datacenters = class {
2796
3144
  }
2797
3145
  };
2798
3146
 
2799
- // src/api/resources/metadata/client/Client.ts
3147
+ // src/api/resources/envoys/client/Client.ts
2800
3148
  var import_url_join3 = __toESM(require("url-join"));
2801
- var Metadata = class {
3149
+ var Envoys = class {
2802
3150
  constructor(_options) {
2803
3151
  this._options = _options;
2804
3152
  }
2805
3153
  /**
2806
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3154
+ * @param {Rivet.EnvoysListRequest} request
3155
+ * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2807
3156
  *
2808
3157
  * @example
2809
- * await client.metadata.get()
3158
+ * await client.envoys.list({
3159
+ * namespace: "namespace"
3160
+ * })
2810
3161
  */
2811
- 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
+ }
2812
3182
  const _response = await (this._options.fetcher ?? fetcher)({
2813
3183
  url: (0, import_url_join3.default)(
2814
3184
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2815
- "metadata"
3185
+ "envoys"
2816
3186
  ),
2817
3187
  method: "GET",
2818
3188
  headers: {
@@ -2823,13 +3193,14 @@ var Metadata = class {
2823
3193
  ...requestOptions?.headers
2824
3194
  },
2825
3195
  contentType: "application/json",
3196
+ queryParameters: _queryParams,
2826
3197
  requestType: "json",
2827
3198
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2828
3199
  maxRetries: requestOptions?.maxRetries,
2829
3200
  abortSignal: requestOptions?.abortSignal
2830
3201
  });
2831
3202
  if (_response.ok) {
2832
- return MetadataGetResponse.parseOrThrow(_response.body, {
3203
+ return EnvoysListResponse.parseOrThrow(_response.body, {
2833
3204
  unrecognizedObjectKeys: "passthrough",
2834
3205
  allowUnrecognizedUnionMembers: true,
2835
3206
  allowUnrecognizedEnumValues: true,
@@ -2850,7 +3221,7 @@ var Metadata = class {
2850
3221
  body: _response.error.rawBody
2851
3222
  });
2852
3223
  case "timeout":
2853
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3224
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2854
3225
  case "unknown":
2855
3226
  throw new RivetError({
2856
3227
  message: _response.error.errorMessage
@@ -2862,35 +3233,23 @@ var Metadata = class {
2862
3233
  }
2863
3234
  };
2864
3235
 
2865
- // src/api/resources/namespaces/client/Client.ts
3236
+ // src/api/resources/health/client/Client.ts
2866
3237
  var import_url_join4 = __toESM(require("url-join"));
2867
- var Namespaces = class {
3238
+ var Health = class {
2868
3239
  constructor(_options) {
2869
3240
  this._options = _options;
2870
3241
  }
2871
3242
  /**
2872
- * @param {Rivet.NamespacesListRequest} request
2873
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3243
+ * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2874
3244
  *
2875
3245
  * @example
2876
- * await client.namespaces.list()
3246
+ * await client.health.fanout()
2877
3247
  */
2878
- async list(request = {}, requestOptions) {
2879
- const { limit, cursor, name } = request;
2880
- const _queryParams = {};
2881
- if (limit != null) {
2882
- _queryParams["limit"] = limit.toString();
2883
- }
2884
- if (cursor != null) {
2885
- _queryParams["cursor"] = cursor;
2886
- }
2887
- if (name != null) {
2888
- _queryParams["name"] = name;
2889
- }
3248
+ async fanout(requestOptions) {
2890
3249
  const _response = await (this._options.fetcher ?? fetcher)({
2891
3250
  url: (0, import_url_join4.default)(
2892
3251
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2893
- "namespaces"
3252
+ "health/fanout"
2894
3253
  ),
2895
3254
  method: "GET",
2896
3255
  headers: {
@@ -2901,14 +3260,13 @@ var Namespaces = class {
2901
3260
  ...requestOptions?.headers
2902
3261
  },
2903
3262
  contentType: "application/json",
2904
- queryParameters: _queryParams,
2905
3263
  requestType: "json",
2906
3264
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2907
3265
  maxRetries: requestOptions?.maxRetries,
2908
3266
  abortSignal: requestOptions?.abortSignal
2909
3267
  });
2910
3268
  if (_response.ok) {
2911
- return NamespaceListResponse.parseOrThrow(_response.body, {
3269
+ return HealthFanoutResponse.parseOrThrow(_response.body, {
2912
3270
  unrecognizedObjectKeys: "passthrough",
2913
3271
  allowUnrecognizedUnionMembers: true,
2914
3272
  allowUnrecognizedEnumValues: true,
@@ -2929,29 +3287,37 @@ var Namespaces = class {
2929
3287
  body: _response.error.rawBody
2930
3288
  });
2931
3289
  case "timeout":
2932
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3290
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2933
3291
  case "unknown":
2934
3292
  throw new RivetError({
2935
3293
  message: _response.error.errorMessage
2936
3294
  });
2937
3295
  }
2938
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
+ }
2939
3308
  /**
2940
- * @param {Rivet.NamespacesCreateRequest} request
2941
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3309
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2942
3310
  *
2943
3311
  * @example
2944
- * await client.namespaces.create({
2945
- * name: "name"
2946
- * })
3312
+ * await client.metadata.get()
2947
3313
  */
2948
- async create(request, requestOptions) {
3314
+ async get(requestOptions) {
2949
3315
  const _response = await (this._options.fetcher ?? fetcher)({
2950
- url: (0, import_url_join4.default)(
3316
+ url: (0, import_url_join5.default)(
2951
3317
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2952
- "namespaces"
3318
+ "metadata"
2953
3319
  ),
2954
- method: "POST",
3320
+ method: "GET",
2955
3321
  headers: {
2956
3322
  Authorization: await this._getAuthorizationHeader(),
2957
3323
  "X-Fern-Language": "JavaScript",
@@ -2961,13 +3327,12 @@ var Namespaces = class {
2961
3327
  },
2962
3328
  contentType: "application/json",
2963
3329
  requestType: "json",
2964
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2965
3330
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2966
3331
  maxRetries: requestOptions?.maxRetries,
2967
3332
  abortSignal: requestOptions?.abortSignal
2968
3333
  });
2969
3334
  if (_response.ok) {
2970
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3335
+ return MetadataGetResponse.parseOrThrow(_response.body, {
2971
3336
  unrecognizedObjectKeys: "passthrough",
2972
3337
  allowUnrecognizedUnionMembers: true,
2973
3338
  allowUnrecognizedEnumValues: true,
@@ -2988,7 +3353,7 @@ var Namespaces = class {
2988
3353
  body: _response.error.rawBody
2989
3354
  });
2990
3355
  case "timeout":
2991
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3356
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2992
3357
  case "unknown":
2993
3358
  throw new RivetError({
2994
3359
  message: _response.error.errorMessage
@@ -3000,40 +3365,49 @@ var Namespaces = class {
3000
3365
  }
3001
3366
  };
3002
3367
 
3003
- // src/api/resources/pools/client/Client.ts
3004
- var import_url_join5 = __toESM(require("url-join"));
3005
- var Pools = class {
3368
+ // src/api/resources/namespaces/client/Client.ts
3369
+ var import_url_join6 = __toESM(require("url-join"));
3370
+ var Namespaces = class {
3006
3371
  constructor(_options) {
3007
3372
  this._options = _options;
3008
3373
  }
3009
3374
  /**
3010
- * Lists the namespace's pools by name. Changes apply on each node's next connection.
3011
- *
3012
- * @param {Rivet.PoolsListRequest} request
3013
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3375
+ * @param {Rivet.NamespacesListRequest} request
3376
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3014
3377
  *
3015
3378
  * @example
3016
- * await client.pools.list({
3017
- * namespace: "namespace"
3018
- * })
3379
+ * await client.namespaces.list()
3019
3380
  */
3020
- async list(request, requestOptions) {
3021
- const { namespace, limit, cursor } = request;
3381
+ async list(request = {}, requestOptions) {
3382
+ const { limit, cursor, name, namespaceIds, namespaceId } = request;
3022
3383
  const _queryParams = {};
3023
- if (namespace != null)
3024
- _queryParams["namespace"] = namespace;
3025
3384
  if (limit != null) {
3026
3385
  _queryParams["limit"] = limit.toString();
3027
3386
  }
3028
3387
  if (cursor != null) {
3029
3388
  _queryParams["cursor"] = cursor;
3030
3389
  }
3031
- const _response = await (this._options.fetcher ?? fetcher)({
3032
- url: (0, import_url_join5.default)(
3033
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3034
- "pools"
3035
- ),
3036
- 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",
3037
3411
  headers: {
3038
3412
  Authorization: await this._getAuthorizationHeader(),
3039
3413
  "X-Fern-Language": "JavaScript",
@@ -3049,7 +3423,7 @@ var Pools = class {
3049
3423
  abortSignal: requestOptions?.abortSignal
3050
3424
  });
3051
3425
  if (_response.ok) {
3052
- return PoolsListResponse.parseOrThrow(_response.body, {
3426
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3053
3427
  unrecognizedObjectKeys: "passthrough",
3054
3428
  allowUnrecognizedUnionMembers: true,
3055
3429
  allowUnrecognizedEnumValues: true,
@@ -3070,7 +3444,7 @@ var Pools = class {
3070
3444
  body: _response.error.rawBody
3071
3445
  });
3072
3446
  case "timeout":
3073
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3447
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3074
3448
  case "unknown":
3075
3449
  throw new RivetError({
3076
3450
  message: _response.error.errorMessage
@@ -3078,34 +3452,22 @@ var Pools = class {
3078
3452
  }
3079
3453
  }
3080
3454
  /**
3081
- * Lists the live nodes of a pool in node key order.
3082
- *
3083
- * @param {string} pool
3084
- * @param {Rivet.PoolsListNodesRequest} request
3085
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3455
+ * @param {Rivet.NamespacesCreateRequest} request
3456
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3086
3457
  *
3087
3458
  * @example
3088
- * await client.pools.listNodes("pool", {
3089
- * namespace: "namespace"
3459
+ * await client.namespaces.create({
3460
+ * displayName: "display_name",
3461
+ * name: "name"
3090
3462
  * })
3091
3463
  */
3092
- async listNodes(pool, request, requestOptions) {
3093
- const { namespace, limit, cursor } = request;
3094
- const _queryParams = {};
3095
- if (namespace != null)
3096
- _queryParams["namespace"] = namespace;
3097
- if (limit != null) {
3098
- _queryParams["limit"] = limit.toString();
3099
- }
3100
- if (cursor != null) {
3101
- _queryParams["cursor"] = cursor;
3102
- }
3464
+ async create(request, requestOptions) {
3103
3465
  const _response = await (this._options.fetcher ?? fetcher)({
3104
- url: (0, import_url_join5.default)(
3466
+ url: (0, import_url_join6.default)(
3105
3467
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3106
- `pools/${encodeURIComponent(pool)}/nodes`
3468
+ "namespaces"
3107
3469
  ),
3108
- method: "GET",
3470
+ method: "POST",
3109
3471
  headers: {
3110
3472
  Authorization: await this._getAuthorizationHeader(),
3111
3473
  "X-Fern-Language": "JavaScript",
@@ -3114,14 +3476,14 @@ var Pools = class {
3114
3476
  ...requestOptions?.headers
3115
3477
  },
3116
3478
  contentType: "application/json",
3117
- queryParameters: _queryParams,
3118
3479
  requestType: "json",
3480
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3119
3481
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3120
3482
  maxRetries: requestOptions?.maxRetries,
3121
3483
  abortSignal: requestOptions?.abortSignal
3122
3484
  });
3123
3485
  if (_response.ok) {
3124
- return PoolsListNodesResponse.parseOrThrow(_response.body, {
3486
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3125
3487
  unrecognizedObjectKeys: "passthrough",
3126
3488
  allowUnrecognizedUnionMembers: true,
3127
3489
  allowUnrecognizedEnumValues: true,
@@ -3142,21 +3504,65 @@ var Pools = class {
3142
3504
  body: _response.error.rawBody
3143
3505
  });
3144
3506
  case "timeout":
3145
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3507
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3146
3508
  case "unknown":
3147
3509
  throw new RivetError({
3148
3510
  message: _response.error.errorMessage
3149
3511
  });
3150
3512
  }
3151
3513
  }
3152
- 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;
3153
3536
  const _queryParams = {};
3154
- if (request.namespace != null)
3155
- _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
+ }
3156
3562
  const _response = await (this._options.fetcher ?? fetcher)({
3157
- url: (0, import_url_join5.default)(
3563
+ url: (0, import_url_join7.default)(
3158
3564
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3159
- `pools/${encodeURIComponent(name)}`
3565
+ "runners"
3160
3566
  ),
3161
3567
  method: "GET",
3162
3568
  headers: {
@@ -3174,7 +3580,7 @@ var Pools = class {
3174
3580
  abortSignal: requestOptions?.abortSignal
3175
3581
  });
3176
3582
  if (_response.ok) {
3177
- return PoolResponse.parseOrThrow(_response.body, {
3583
+ return RunnersListResponse.parseOrThrow(_response.body, {
3178
3584
  unrecognizedObjectKeys: "passthrough",
3179
3585
  allowUnrecognizedUnionMembers: true,
3180
3586
  allowUnrecognizedEnumValues: true,
@@ -3195,23 +3601,43 @@ var Pools = class {
3195
3601
  body: _response.error.rawBody
3196
3602
  });
3197
3603
  case "timeout":
3198
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3604
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3199
3605
  case "unknown":
3200
3606
  throw new RivetError({
3201
3607
  message: _response.error.errorMessage
3202
3608
  });
3203
3609
  }
3204
3610
  }
3205
- 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;
3206
3627
  const _queryParams = {};
3207
- if (request.namespace != null)
3208
- _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
+ }
3209
3635
  const _response = await (this._options.fetcher ?? fetcher)({
3210
- url: (0, import_url_join5.default)(
3636
+ url: (0, import_url_join7.default)(
3211
3637
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3212
- `pools/${encodeURIComponent(name)}`
3638
+ "runners/names"
3213
3639
  ),
3214
- method: "PUT",
3640
+ method: "GET",
3215
3641
  headers: {
3216
3642
  Authorization: await this._getAuthorizationHeader(),
3217
3643
  "X-Fern-Language": "JavaScript",
@@ -3222,19 +3648,12 @@ var Pools = class {
3222
3648
  contentType: "application/json",
3223
3649
  queryParameters: _queryParams,
3224
3650
  requestType: "json",
3225
- body: {
3226
- drain_on_version_upgrade: request.drainOnVersionUpgrade,
3227
- actor_eviction_delay: request.actorEvictionDelay,
3228
- actor_eviction_period: request.actorEvictionPeriod,
3229
- actor_eviction_rate: request.actorEvictionRate,
3230
- metadata: request.metadata
3231
- },
3232
3651
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3233
3652
  maxRetries: requestOptions?.maxRetries,
3234
3653
  abortSignal: requestOptions?.abortSignal
3235
3654
  });
3236
3655
  if (_response.ok) {
3237
- return PoolResponse.parseOrThrow(_response.body, {
3656
+ return RunnersListNamesResponse.parseOrThrow(_response.body, {
3238
3657
  unrecognizedObjectKeys: "passthrough",
3239
3658
  allowUnrecognizedUnionMembers: true,
3240
3659
  allowUnrecognizedEnumValues: true,
@@ -3255,54 +3674,7 @@ var Pools = class {
3255
3674
  body: _response.error.rawBody
3256
3675
  });
3257
3676
  case "timeout":
3258
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3259
- case "unknown":
3260
- throw new RivetError({
3261
- message: _response.error.errorMessage
3262
- });
3263
- }
3264
- }
3265
- async delete(name, request = {}, requestOptions) {
3266
- const _queryParams = {};
3267
- if (request.namespace != null)
3268
- _queryParams["namespace"] = request.namespace;
3269
- const _response = await (this._options.fetcher ?? fetcher)({
3270
- url: (0, import_url_join5.default)(
3271
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3272
- `pools/${encodeURIComponent(name)}`
3273
- ),
3274
- method: "DELETE",
3275
- headers: {
3276
- Authorization: await this._getAuthorizationHeader(),
3277
- "X-Fern-Language": "JavaScript",
3278
- "X-Fern-Runtime": RUNTIME.type,
3279
- "X-Fern-Runtime-Version": RUNTIME.version,
3280
- ...requestOptions?.headers
3281
- },
3282
- contentType: "application/json",
3283
- queryParameters: _queryParams,
3284
- requestType: "json",
3285
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3286
- maxRetries: requestOptions?.maxRetries,
3287
- abortSignal: requestOptions?.abortSignal
3288
- });
3289
- if (_response.ok) {
3290
- return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3291
- }
3292
- if (_response.error.reason === "status-code") {
3293
- throw new RivetError({
3294
- statusCode: _response.error.statusCode,
3295
- body: _response.error.body
3296
- });
3297
- }
3298
- switch (_response.error.reason) {
3299
- case "non-json":
3300
- throw new RivetError({
3301
- statusCode: _response.error.statusCode,
3302
- body: _response.error.rawBody
3303
- });
3304
- case "timeout":
3305
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3677
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3306
3678
  case "unknown":
3307
3679
  throw new RivetError({
3308
3680
  message: _response.error.errorMessage
@@ -3321,23 +3693,31 @@ var RivetClient = class {
3321
3693
  }
3322
3694
  _authTokens;
3323
3695
  _datacenters;
3696
+ _envoys;
3697
+ _health;
3324
3698
  _metadata;
3325
3699
  _namespaces;
3326
- _pools;
3700
+ _runners;
3327
3701
  get authTokens() {
3328
3702
  return this._authTokens ??= new AuthTokens(this._options);
3329
3703
  }
3330
3704
  get datacenters() {
3331
3705
  return this._datacenters ??= new Datacenters(this._options);
3332
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
+ }
3333
3713
  get metadata() {
3334
3714
  return this._metadata ??= new Metadata(this._options);
3335
3715
  }
3336
3716
  get namespaces() {
3337
3717
  return this._namespaces ??= new Namespaces(this._options);
3338
3718
  }
3339
- get pools() {
3340
- return this._pools ??= new Pools(this._options);
3719
+ get runners() {
3720
+ return this._runners ??= new Runners(this._options);
3341
3721
  }
3342
3722
  /**
3343
3723
  * **If key is some & `include_destroyed` is false**
@@ -3374,8 +3754,7 @@ var RivetClient = class {
3374
3754
  async actorsList(request, requestOptions) {
3375
3755
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3376
3756
  const _queryParams = {};
3377
- if (namespace != null)
3378
- _queryParams["namespace"] = namespace;
3757
+ _queryParams["namespace"] = namespace;
3379
3758
  if (name != null) {
3380
3759
  _queryParams["name"] = name;
3381
3760
  }
@@ -3385,8 +3764,15 @@ var RivetClient = class {
3385
3764
  if (actorIds != null) {
3386
3765
  _queryParams["actor_ids"] = actorIds;
3387
3766
  }
3388
- if (actorId != null)
3389
- _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
+ }
3390
3776
  if (includeDestroyed != null) {
3391
3777
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3392
3778
  }
@@ -3397,7 +3783,7 @@ var RivetClient = class {
3397
3783
  _queryParams["cursor"] = cursor;
3398
3784
  }
3399
3785
  const _response = await (this._options.fetcher ?? fetcher)({
3400
- url: (0, import_url_join6.default)(
3786
+ url: (0, import_url_join8.default)(
3401
3787
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3402
3788
  "actors"
3403
3789
  ),
@@ -3469,17 +3855,17 @@ var RivetClient = class {
3469
3855
  * @example
3470
3856
  * await client.actorsCreate({
3471
3857
  * namespace: "namespace",
3858
+ * crashPolicy: "restart",
3472
3859
  * name: "name",
3473
- * pool: "pool"
3860
+ * runnerNameSelector: "runner_name_selector"
3474
3861
  * })
3475
3862
  */
3476
3863
  async actorsCreate(request, requestOptions) {
3477
3864
  const { namespace, ..._body } = request;
3478
3865
  const _queryParams = {};
3479
- if (namespace != null)
3480
- _queryParams["namespace"] = namespace;
3866
+ _queryParams["namespace"] = namespace;
3481
3867
  const _response = await (this._options.fetcher ?? fetcher)({
3482
- url: (0, import_url_join6.default)(
3868
+ url: (0, import_url_join8.default)(
3483
3869
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3484
3870
  "actors"
3485
3871
  ),
@@ -3561,18 +3947,18 @@ var RivetClient = class {
3561
3947
  * @example
3562
3948
  * await client.actorsGetOrCreate({
3563
3949
  * namespace: "namespace",
3950
+ * crashPolicy: "restart",
3564
3951
  * key: "key",
3565
3952
  * name: "name",
3566
- * pool: "pool"
3953
+ * runnerNameSelector: "runner_name_selector"
3567
3954
  * })
3568
3955
  */
3569
3956
  async actorsGetOrCreate(request, requestOptions) {
3570
3957
  const { namespace, ..._body } = request;
3571
3958
  const _queryParams = {};
3572
- if (namespace != null)
3573
- _queryParams["namespace"] = namespace;
3959
+ _queryParams["namespace"] = namespace;
3574
3960
  const _response = await (this._options.fetcher ?? fetcher)({
3575
- url: (0, import_url_join6.default)(
3961
+ url: (0, import_url_join8.default)(
3576
3962
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3577
3963
  "actors"
3578
3964
  ),
@@ -3638,8 +4024,7 @@ var RivetClient = class {
3638
4024
  async actorsListNames(request, requestOptions) {
3639
4025
  const { namespace, limit, cursor } = request;
3640
4026
  const _queryParams = {};
3641
- if (namespace != null)
3642
- _queryParams["namespace"] = namespace;
4027
+ _queryParams["namespace"] = namespace;
3643
4028
  if (limit != null) {
3644
4029
  _queryParams["limit"] = limit.toString();
3645
4030
  }
@@ -3647,7 +4032,7 @@ var RivetClient = class {
3647
4032
  _queryParams["cursor"] = cursor;
3648
4033
  }
3649
4034
  const _response = await (this._options.fetcher ?? fetcher)({
3650
- url: (0, import_url_join6.default)(
4035
+ url: (0, import_url_join8.default)(
3651
4036
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3652
4037
  "actors/names"
3653
4038
  ),
@@ -3710,18 +4095,16 @@ var RivetClient = class {
3710
4095
  * namespace: "namespace"
3711
4096
  * })
3712
4097
  */
3713
- /** Returns one actor by ID. */
3714
- async actorsGet(actorId, request, requestOptions) {
4098
+ async actorsDelete(actorId, request, requestOptions) {
3715
4099
  const { namespace } = request;
3716
4100
  const _queryParams = {};
3717
- if (namespace != null)
3718
- _queryParams["namespace"] = namespace;
4101
+ _queryParams["namespace"] = namespace;
3719
4102
  const _response = await (this._options.fetcher ?? fetcher)({
3720
- url: (0, import_url_join6.default)(
4103
+ url: (0, import_url_join8.default)(
3721
4104
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3722
4105
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3723
4106
  ),
3724
- method: "GET",
4107
+ method: "DELETE",
3725
4108
  headers: {
3726
4109
  Authorization: await this._getAuthorizationHeader(),
3727
4110
  "X-Fern-Language": "JavaScript",
@@ -3737,7 +4120,7 @@ var RivetClient = class {
3737
4120
  abortSignal: requestOptions?.abortSignal
3738
4121
  });
3739
4122
  if (_response.ok) {
3740
- return ActorsGetResponse.parseOrThrow(_response.body, {
4123
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
3741
4124
  unrecognizedObjectKeys: "passthrough",
3742
4125
  allowUnrecognizedUnionMembers: true,
3743
4126
  allowUnrecognizedEnumValues: true,
@@ -3758,24 +4141,34 @@ var RivetClient = class {
3758
4141
  body: _response.error.rawBody
3759
4142
  });
3760
4143
  case "timeout":
3761
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4144
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3762
4145
  case "unknown":
3763
4146
  throw new RivetError({
3764
4147
  message: _response.error.errorMessage
3765
4148
  });
3766
4149
  }
3767
4150
  }
3768
- 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) {
3769
4163
  const { namespace } = request;
3770
4164
  const _queryParams = {};
3771
- if (namespace != null)
3772
- _queryParams["namespace"] = namespace;
4165
+ _queryParams["namespace"] = namespace;
3773
4166
  const _response = await (this._options.fetcher ?? fetcher)({
3774
- url: (0, import_url_join6.default)(
4167
+ url: (0, import_url_join8.default)(
3775
4168
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3776
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4169
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3777
4170
  ),
3778
- method: "DELETE",
4171
+ method: "GET",
3779
4172
  headers: {
3780
4173
  Authorization: await this._getAuthorizationHeader(),
3781
4174
  "X-Fern-Language": "JavaScript",
@@ -3791,7 +4184,7 @@ var RivetClient = class {
3791
4184
  abortSignal: requestOptions?.abortSignal
3792
4185
  });
3793
4186
  if (_response.ok) {
3794
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
4187
+ return ActorsKvGetResponse.parseOrThrow(_response.body, {
3795
4188
  unrecognizedObjectKeys: "passthrough",
3796
4189
  allowUnrecognizedUnionMembers: true,
3797
4190
  allowUnrecognizedEnumValues: true,
@@ -3812,7 +4205,9 @@ var RivetClient = class {
3812
4205
  body: _response.error.rawBody
3813
4206
  });
3814
4207
  case "timeout":
3815
- 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
+ );
3816
4211
  case "unknown":
3817
4212
  throw new RivetError({
3818
4213
  message: _response.error.errorMessage
@@ -3827,15 +4222,17 @@ var RivetClient = class {
3827
4222
  * @example
3828
4223
  * await client.actorsReschedule("actor_id", {
3829
4224
  * namespace: "namespace",
4225
+ * body: {
4226
+ * "key": "value"
4227
+ * }
3830
4228
  * })
3831
4229
  */
3832
4230
  async actorsReschedule(actorId, request, requestOptions) {
3833
- const { namespace } = request;
4231
+ const { namespace, body: _body } = request;
3834
4232
  const _queryParams = {};
3835
- if (namespace != null)
3836
- _queryParams["namespace"] = namespace;
4233
+ _queryParams["namespace"] = namespace;
3837
4234
  const _response = await (this._options.fetcher ?? fetcher)({
3838
- url: (0, import_url_join6.default)(
4235
+ url: (0, import_url_join8.default)(
3839
4236
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3840
4237
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
3841
4238
  ),
@@ -3850,6 +4247,7 @@ var RivetClient = class {
3850
4247
  contentType: "application/json",
3851
4248
  queryParameters: _queryParams,
3852
4249
  requestType: "json",
4250
+ body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3853
4251
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3854
4252
  maxRetries: requestOptions?.maxRetries,
3855
4253
  abortSignal: requestOptions?.abortSignal
@@ -3891,15 +4289,17 @@ var RivetClient = class {
3891
4289
  * @example
3892
4290
  * await client.actorsSleep("actor_id", {
3893
4291
  * namespace: "namespace",
4292
+ * body: {
4293
+ * "key": "value"
4294
+ * }
3894
4295
  * })
3895
4296
  */
3896
4297
  async actorsSleep(actorId, request, requestOptions) {
3897
- const { namespace } = request;
4298
+ const { namespace, body: _body } = request;
3898
4299
  const _queryParams = {};
3899
- if (namespace != null)
3900
- _queryParams["namespace"] = namespace;
4300
+ _queryParams["namespace"] = namespace;
3901
4301
  const _response = await (this._options.fetcher ?? fetcher)({
3902
- url: (0, import_url_join6.default)(
4302
+ url: (0, import_url_join8.default)(
3903
4303
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3904
4304
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
3905
4305
  ),
@@ -3914,6 +4314,7 @@ var RivetClient = class {
3914
4314
  contentType: "application/json",
3915
4315
  queryParameters: _queryParams,
3916
4316
  requestType: "json",
4317
+ body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3917
4318
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3918
4319
  maxRetries: requestOptions?.maxRetries,
3919
4320
  abortSignal: requestOptions?.abortSignal
@@ -3947,6 +4348,360 @@ var RivetClient = class {
3947
4348
  });
3948
4349
  }
3949
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
+ }
3950
4705
  async _getAuthorizationHeader() {
3951
4706
  return `Bearer ${await Supplier.get(this._options.token)}`;
3952
4707
  }