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