@rivetkit/engine-api-full 0.0.0-sqlite-query-metrics-v2.f5d3605 → 0.0.0-sqlite-query-metrics-v3.1dff84f

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 +323 -1077
  2. package/dist/browser/cjs/serialization.js +94 -379
  3. package/dist/browser/esm/index.js +323 -1077
  4. package/dist/browser/esm/serialization.js +94 -379
  5. package/dist/node/cjs/index.js +323 -1077
  6. package/dist/node/cjs/serialization.js +104 -421
  7. package/dist/node/esm/index.js +323 -1077
  8. package/dist/node/esm/serialization.js +94 -379
  9. package/package.json +2 -1
  10. package/types/Client.d.ts +7 -91
  11. package/types/api/client/requests/ActorsCreateRequest.d.ts +3 -7
  12. package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
  13. package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +4 -8
  14. package/types/api/client/requests/ActorsGetRequest.d.ts +3 -0
  15. package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
  16. package/types/api/client/requests/ActorsListRequest.d.ts +2 -5
  17. package/types/api/client/requests/ActorsRescheduleRequest.d.ts +1 -5
  18. package/types/api/client/requests/ActorsSleepRequest.d.ts +1 -5
  19. package/types/api/client/requests/index.d.ts +1 -6
  20. package/types/api/resources/authTokens/client/Client.d.ts +0 -20
  21. package/types/api/resources/authTokens/client/index.d.ts +1 -0
  22. package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +5 -1
  23. package/types/api/resources/index.d.ts +2 -5
  24. package/types/api/resources/namespaces/client/Client.d.ts +0 -1
  25. package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -2
  26. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +0 -6
  27. package/types/api/resources/pools/client/Client.d.ts +57 -0
  28. package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +3 -0
  29. package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +3 -0
  30. package/types/api/resources/{runners/client/requests/RunnersListNamesRequest.d.ts → pools/client/requests/PoolsListNodesRequest.d.ts} +2 -2
  31. package/types/api/resources/{envoys/client/requests/EnvoysListRequest.d.ts → pools/client/requests/PoolsListRequest.d.ts} +2 -4
  32. package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +8 -0
  33. package/types/api/resources/pools/client/requests/index.d.ts +5 -0
  34. package/types/api/types/Actor.d.ts +21 -27
  35. package/types/api/types/ActorName.d.ts +1 -3
  36. package/types/api/types/ActorsCreateResponse.d.ts +2 -3
  37. package/types/api/types/ActorsDeleteResponse.d.ts +1 -4
  38. package/types/api/types/ActorsGetOrCreateResponse.d.ts +1 -3
  39. package/types/api/types/ActorsGetResponse.d.ts +4 -0
  40. package/types/api/types/ActorsListNamesResponse.d.ts +1 -4
  41. package/types/api/types/ActorsListResponse.d.ts +1 -4
  42. package/types/api/types/ActorsRescheduleResponse.d.ts +1 -4
  43. package/types/api/types/ActorsSleepResponse.d.ts +1 -4
  44. package/types/api/types/AuthOperationKind.d.ts +0 -10
  45. package/types/api/types/AuthResourceKind.d.ts +1 -0
  46. package/types/api/types/AuthTargetScope.d.ts +4 -0
  47. package/types/api/types/AuthTokenCreateResponse.d.ts +5 -5
  48. package/types/api/types/AuthTokenGrant.d.ts +4 -6
  49. package/types/api/types/AuthTokenInspectResponse.d.ts +9 -7
  50. package/types/api/types/Datacenter.d.ts +1 -5
  51. package/types/api/types/DatacentersListResponse.d.ts +1 -5
  52. package/types/api/types/ErrorResponse.d.ts +10 -0
  53. package/types/api/types/MetadataGetResponse.d.ts +8 -12
  54. package/types/api/types/Namespace.d.ts +3 -7
  55. package/types/api/types/NamespaceListResponse.d.ts +1 -4
  56. package/types/api/types/NamespacesCreateResponse.d.ts +0 -3
  57. package/types/api/types/Node.d.ts +20 -0
  58. package/types/api/types/Pagination.d.ts +2 -4
  59. package/types/api/types/Pool.d.ts +14 -0
  60. package/types/api/types/PoolResponse.d.ts +4 -0
  61. package/types/api/types/PoolsDeleteResponse.d.ts +1 -0
  62. package/types/api/types/PoolsListNodesResponse.d.ts +5 -0
  63. package/types/api/types/PoolsListResponse.d.ts +5 -0
  64. package/types/api/types/RivetId.d.ts +0 -3
  65. package/types/api/types/index.d.ts +10 -38
  66. package/types/serialization/client/requests/ActorsCreateRequest.d.ts +1 -4
  67. package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +2 -5
  68. package/types/serialization/client/requests/index.d.ts +0 -2
  69. package/types/serialization/resources/index.d.ts +0 -2
  70. package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -1
  71. package/types/serialization/types/Actor.d.ts +10 -17
  72. package/types/serialization/types/ActorName.d.ts +0 -3
  73. package/types/serialization/types/ActorsCreateResponse.d.ts +1 -3
  74. package/types/serialization/types/ActorsDeleteResponse.d.ts +1 -4
  75. package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +0 -3
  76. package/types/serialization/types/ActorsGetResponse.d.ts +10 -0
  77. package/types/serialization/types/ActorsListNamesResponse.d.ts +0 -5
  78. package/types/serialization/types/ActorsListResponse.d.ts +1 -4
  79. package/types/serialization/types/ActorsRescheduleResponse.d.ts +1 -4
  80. package/types/serialization/types/ActorsSleepResponse.d.ts +1 -4
  81. package/types/serialization/types/AuthOperationKind.d.ts +0 -3
  82. package/types/serialization/types/AuthResourceKind.d.ts +7 -0
  83. package/types/serialization/types/AuthTargetScope.d.ts +10 -0
  84. package/types/serialization/types/AuthTokenCreateResponse.d.ts +2 -5
  85. package/types/serialization/types/AuthTokenGrant.d.ts +5 -8
  86. package/types/serialization/types/AuthTokenInspectResponse.d.ts +4 -8
  87. package/types/serialization/types/Datacenter.d.ts +0 -5
  88. package/types/serialization/types/DatacentersListResponse.d.ts +1 -6
  89. package/types/serialization/types/ErrorResponse.d.ts +12 -0
  90. package/types/serialization/types/MetadataGetResponse.d.ts +4 -12
  91. package/types/serialization/types/Namespace.d.ts +1 -7
  92. package/types/serialization/types/NamespaceListResponse.d.ts +1 -4
  93. package/types/serialization/types/NamespacesCreateResponse.d.ts +0 -3
  94. package/types/serialization/types/Node.d.ts +17 -0
  95. package/types/serialization/types/Pagination.d.ts +1 -4
  96. package/types/serialization/types/Pool.d.ts +14 -0
  97. package/types/serialization/types/PoolResponse.d.ts +10 -0
  98. package/types/serialization/types/PoolsDeleteResponse.d.ts +7 -0
  99. package/types/serialization/types/PoolsListNodesResponse.d.ts +12 -0
  100. package/types/serialization/types/PoolsListResponse.d.ts +12 -0
  101. package/types/serialization/types/RivetId.d.ts +0 -3
  102. package/types/serialization/types/index.d.ts +10 -38
  103. package/types/api/client/requests/ActorsKvGetRequest.d.ts +0 -12
  104. package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +0 -12
  105. package/types/api/client/requests/RunnerConfigsListRequest.d.ts +0 -21
  106. package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +0 -17
  107. package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -15
  108. package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -17
  109. package/types/api/resources/envoys/client/Client.d.ts +0 -39
  110. package/types/api/resources/envoys/client/requests/index.d.ts +0 -1
  111. package/types/api/resources/health/client/Client.d.ts +0 -36
  112. package/types/api/resources/health/client/index.d.ts +0 -1
  113. package/types/api/resources/health/index.d.ts +0 -1
  114. package/types/api/resources/runners/client/Client.d.ts +0 -54
  115. package/types/api/resources/runners/client/index.d.ts +0 -1
  116. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +0 -22
  117. package/types/api/resources/runners/client/requests/index.d.ts +0 -2
  118. package/types/api/resources/runners/index.d.ts +0 -1
  119. package/types/api/types/ActorsKvGetResponse.d.ts +0 -7
  120. package/types/api/types/ActorsRescheduleRequestBody.d.ts +0 -4
  121. package/types/api/types/ActorsSleepRequestBody.d.ts +0 -4
  122. package/types/api/types/AuthTokenResource.d.ts +0 -13
  123. package/types/api/types/AuthTokenTargetScope.d.ts +0 -5
  124. package/types/api/types/AuthTokenTargetScopeId.d.ts +0 -7
  125. package/types/api/types/CrashPolicy.d.ts +0 -9
  126. package/types/api/types/DatacenterHealth.d.ts +0 -12
  127. package/types/api/types/Envoy.d.ts +0 -18
  128. package/types/api/types/EnvoysListResponse.d.ts +0 -8
  129. package/types/api/types/HealthFanoutResponse.d.ts +0 -7
  130. package/types/api/types/HealthResponse.d.ts +0 -8
  131. package/types/api/types/HealthStatus.d.ts +0 -8
  132. package/types/api/types/Runner.d.ts +0 -21
  133. package/types/api/types/RunnerConfig.d.ts +0 -11
  134. package/types/api/types/RunnerConfigKind.d.ts +0 -5
  135. package/types/api/types/RunnerConfigKindNormal.d.ts +0 -7
  136. package/types/api/types/RunnerConfigKindNormalNormal.d.ts +0 -12
  137. package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
  138. package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -29
  139. package/types/api/types/RunnerConfigNormal.d.ts +0 -12
  140. package/types/api/types/RunnerConfigResponse.d.ts +0 -8
  141. package/types/api/types/RunnerConfigServerless.d.ts +0 -29
  142. package/types/api/types/RunnerConfigVariant.d.ts +0 -8
  143. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +0 -4
  144. package/types/api/types/RunnerConfigsListResponse.d.ts +0 -8
  145. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -7
  146. package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -4
  147. package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -4
  148. package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -5
  149. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -7
  150. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -7
  151. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -7
  152. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -6
  153. package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +0 -16
  154. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +0 -6
  155. package/types/api/types/RunnersListNamesResponse.d.ts +0 -8
  156. package/types/api/types/RunnersListResponse.d.ts +0 -8
  157. package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -13
  158. package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -13
  159. package/types/serialization/resources/authTokens/client/index.d.ts +0 -1
  160. package/types/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +0 -16
  161. package/types/serialization/resources/authTokens/client/requests/index.d.ts +0 -1
  162. package/types/serialization/resources/authTokens/index.d.ts +0 -1
  163. package/types/serialization/types/ActorsKvGetResponse.d.ts +0 -13
  164. package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +0 -10
  165. package/types/serialization/types/ActorsSleepRequestBody.d.ts +0 -10
  166. package/types/serialization/types/AuthTokenResource.d.ts +0 -10
  167. package/types/serialization/types/AuthTokenTargetScope.d.ts +0 -11
  168. package/types/serialization/types/AuthTokenTargetScopeId.d.ts +0 -13
  169. package/types/serialization/types/CrashPolicy.d.ts +0 -10
  170. package/types/serialization/types/DatacenterHealth.d.ts +0 -19
  171. package/types/serialization/types/Envoy.d.ts +0 -24
  172. package/types/serialization/types/EnvoysListResponse.d.ts +0 -15
  173. package/types/serialization/types/HealthFanoutResponse.d.ts +0 -13
  174. package/types/serialization/types/HealthResponse.d.ts +0 -14
  175. package/types/serialization/types/HealthStatus.d.ts +0 -10
  176. package/types/serialization/types/Runner.d.ts +0 -27
  177. package/types/serialization/types/RunnerConfig.d.ts +0 -17
  178. package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
  179. package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -13
  180. package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +0 -15
  181. package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
  182. package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -25
  183. package/types/serialization/types/RunnerConfigNormal.d.ts +0 -15
  184. package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
  185. package/types/serialization/types/RunnerConfigServerless.d.ts +0 -25
  186. package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
  187. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
  188. package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
  189. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
  190. package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
  191. package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
  192. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
  193. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
  194. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
  195. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
  196. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
  197. package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
  198. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
  199. package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
  200. package/types/serialization/types/RunnersListResponse.d.ts +0 -15
  201. /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
  202. /package/types/api/resources/{envoys → pools}/index.d.ts +0 -0
@@ -584,79 +584,18 @@ 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,
592
587
  authTokens: () => authTokens_exports,
593
588
  datacenters: () => datacenters_exports,
594
- envoys: () => envoys_exports,
595
- health: () => health_exports,
596
589
  metadata: () => metadata_exports,
597
- namespaces: () => namespaces_exports,
598
- runners: () => runners_exports
590
+ namespaces: () => namespaces_exports2,
591
+ pools: () => pools_exports
599
592
  });
600
593
 
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
-
640
594
  // src/api/resources/authTokens/index.ts
641
595
  var authTokens_exports = {};
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 = {};
596
+ __export(authTokens_exports, {
597
+ AuthTokens: () => AuthTokens
598
+ });
660
599
 
661
600
  // src/core/json.ts
662
601
  var toJson = (value, replacer, space) => {
@@ -2371,6 +2310,9 @@ function transformAndValidateUnion({
2371
2310
  };
2372
2311
  }
2373
2312
 
2313
+ // src/api/resources/authTokens/client/Client.ts
2314
+ var import_url_join = __toESM(require("url-join"));
2315
+
2374
2316
  // src/serialization/index.ts
2375
2317
  var serialization_exports = {};
2376
2318
  __export(serialization_exports, {
@@ -2381,91 +2323,53 @@ __export(serialization_exports, {
2381
2323
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2382
2324
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2383
2325
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2384
- ActorsKvGetResponse: () => ActorsKvGetResponse,
2326
+ ActorsGetResponse: () => ActorsGetResponse,
2385
2327
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2386
2328
  ActorsListResponse: () => ActorsListResponse,
2387
- ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2388
2329
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2389
- ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2390
2330
  ActorsSleepResponse: () => ActorsSleepResponse,
2391
- AuthOperationKind: () => AuthOperationKind2,
2392
- AuthTokenCreateRequest: () => AuthTokenCreateRequest,
2331
+ AuthOperationKind: () => AuthOperationKind,
2332
+ AuthResourceKind: () => AuthResourceKind,
2333
+ AuthTargetScope: () => AuthTargetScope,
2393
2334
  AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2394
2335
  AuthTokenGrant: () => AuthTokenGrant,
2395
2336
  AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2396
- AuthTokenResource: () => AuthTokenResource2,
2397
- AuthTokenTargetScope: () => AuthTokenTargetScope,
2398
- AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
2399
- CrashPolicy: () => CrashPolicy2,
2400
2337
  Datacenter: () => Datacenter,
2401
- DatacenterHealth: () => DatacenterHealth,
2402
2338
  DatacentersListResponse: () => DatacentersListResponse,
2403
- Envoy: () => Envoy,
2404
- EnvoysListResponse: () => EnvoysListResponse,
2405
- HealthFanoutResponse: () => HealthFanoutResponse,
2406
- HealthResponse: () => HealthResponse,
2407
- HealthStatus: () => HealthStatus2,
2339
+ ErrorResponse: () => ErrorResponse,
2408
2340
  MetadataGetResponse: () => MetadataGetResponse,
2409
2341
  Namespace: () => Namespace,
2410
2342
  NamespaceListResponse: () => NamespaceListResponse,
2411
2343
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2412
2344
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2345
+ Node: () => Node,
2413
2346
  Pagination: () => Pagination,
2347
+ Pool: () => Pool,
2348
+ PoolResponse: () => PoolResponse,
2349
+ PoolsDeleteResponse: () => PoolsDeleteResponse,
2350
+ PoolsListNodesResponse: () => PoolsListNodesResponse,
2351
+ PoolsListResponse: () => PoolsListResponse,
2414
2352
  RivetId: () => RivetId,
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
2353
+ namespaces: () => namespaces_exports
2444
2354
  });
2445
2355
 
2446
2356
  // src/serialization/types/RivetId.ts
2447
2357
  var RivetId = schemas_exports.string();
2448
2358
 
2449
- // src/serialization/types/CrashPolicy.ts
2450
- var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2451
-
2452
2359
  // src/serialization/types/Actor.ts
2453
2360
  var Actor = schemas_exports.object({
2454
2361
  actorId: schemas_exports.property("actor_id", RivetId),
2455
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2456
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2457
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
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
2362
  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())
2363
+ key: schemas_exports.string(),
2364
+ namespace: schemas_exports.string(),
2365
+ pool: schemas_exports.string(),
2366
+ 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())
2469
2373
  });
2470
2374
 
2471
2375
  // src/serialization/types/ActorName.ts
@@ -2475,11 +2379,12 @@ var ActorName = schemas_exports.object({
2475
2379
 
2476
2380
  // src/serialization/types/ActorsCreateResponse.ts
2477
2381
  var ActorsCreateResponse = schemas_exports.object({
2478
- actor: Actor
2382
+ actor: Actor,
2383
+ created: schemas_exports.boolean()
2479
2384
  });
2480
2385
 
2481
2386
  // src/serialization/types/ActorsDeleteResponse.ts
2482
- var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2387
+ var ActorsDeleteResponse = schemas_exports.object({});
2483
2388
 
2484
2389
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2485
2390
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2487,21 +2392,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2487
2392
  created: schemas_exports.boolean()
2488
2393
  });
2489
2394
 
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()
2494
- });
2495
-
2496
- // src/serialization/types/Pagination.ts
2497
- var Pagination = schemas_exports.object({
2498
- cursor: schemas_exports.string().optional()
2395
+ // src/serialization/types/ActorsGetResponse.ts
2396
+ var ActorsGetResponse = schemas_exports.object({
2397
+ actor: Actor
2499
2398
  });
2500
2399
 
2501
2400
  // src/serialization/types/ActorsListNamesResponse.ts
2502
2401
  var ActorsListNamesResponse = schemas_exports.object({
2503
- names: schemas_exports.record(schemas_exports.string(), ActorName),
2504
- pagination: Pagination
2402
+ names: schemas_exports.record(schemas_exports.string(), ActorName)
2403
+ });
2404
+
2405
+ // src/serialization/types/Pagination.ts
2406
+ var Pagination = schemas_exports.object({
2407
+ cursor: schemas_exports.string().nullable()
2505
2408
  });
2506
2409
 
2507
2410
  // src/serialization/types/ActorsListResponse.ts
@@ -2510,143 +2413,76 @@ var ActorsListResponse = schemas_exports.object({
2510
2413
  pagination: Pagination
2511
2414
  });
2512
2415
 
2513
- // src/serialization/types/ActorsRescheduleRequestBody.ts
2514
- var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2515
-
2516
2416
  // src/serialization/types/ActorsRescheduleResponse.ts
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());
2417
+ var ActorsRescheduleResponse = schemas_exports.object({});
2521
2418
 
2522
2419
  // src/serialization/types/ActorsSleepResponse.ts
2523
- var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2420
+ var ActorsSleepResponse = schemas_exports.object({});
2524
2421
 
2525
2422
  // src/serialization/types/AuthOperationKind.ts
2526
- var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
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
+ })]);
2527
2432
 
2528
2433
  // src/serialization/types/AuthTokenCreateResponse.ts
2529
2434
  var AuthTokenCreateResponse = schemas_exports.object({
2530
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2435
+ token: schemas_exports.string(),
2531
2436
  issuedTs: schemas_exports.property("issued_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
2437
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2549
2438
  });
2550
2439
 
2551
- // src/serialization/types/AuthTokenTargetScope.ts
2552
- var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
2553
-
2554
2440
  // src/serialization/types/AuthTokenGrant.ts
2555
2441
  var AuthTokenGrant = schemas_exports.object({
2556
- operations: schemas_exports.list(AuthOperationKind2),
2557
- resource: AuthTokenResource2,
2558
- target: AuthTokenTargetScope
2442
+ resource: AuthResourceKind,
2443
+ target: AuthTargetScope,
2444
+ operations: schemas_exports.list(AuthOperationKind)
2559
2445
  });
2560
2446
 
2561
2447
  // src/serialization/types/AuthTokenInspectResponse.ts
2562
2448
  var AuthTokenInspectResponse = schemas_exports.object({
2563
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2449
+ namespace: schemas_exports.string(),
2450
+ subject: schemas_exports.string().nullable(),
2564
2451
  grants: schemas_exports.list(AuthTokenGrant),
2565
2452
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2566
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2567
- subject: schemas_exports.string().optional()
2453
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2568
2454
  });
2569
2455
 
2570
2456
  // src/serialization/types/Datacenter.ts
2571
2457
  var Datacenter = schemas_exports.object({
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
2458
+ name: schemas_exports.string()
2595
2459
  });
2596
2460
 
2597
2461
  // src/serialization/types/DatacentersListResponse.ts
2598
2462
  var DatacentersListResponse = schemas_exports.object({
2599
- datacenters: schemas_exports.list(Datacenter),
2600
- pagination: Pagination
2601
- });
2602
-
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()
2463
+ datacenters: schemas_exports.list(Datacenter)
2617
2464
  });
2618
2465
 
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)
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()
2628
2472
  });
2629
2473
 
2630
2474
  // src/serialization/types/MetadataGetResponse.ts
2631
2475
  var MetadataGetResponse = schemas_exports.object({
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()
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()
2642
2480
  });
2643
2481
 
2644
2482
  // src/serialization/types/Namespace.ts
2645
2483
  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()),
2648
2484
  name: schemas_exports.string(),
2649
- namespaceId: schemas_exports.property("namespace_id", RivetId)
2485
+ createTs: schemas_exports.property("create_ts", schemas_exports.number())
2650
2486
  });
2651
2487
 
2652
2488
  // src/serialization/types/NamespaceListResponse.ts
@@ -2660,258 +2496,76 @@ var NamespacesCreateResponse = schemas_exports.object({
2660
2496
  namespace: Namespace
2661
2497
  });
2662
2498
 
2663
- // src/serialization/types/Runner.ts
2664
- var Runner = schemas_exports.object({
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()),
2499
+ // src/serialization/types/Node.ts
2500
+ var Node = schemas_exports.object({
2668
2501
  key: schemas_exports.string(),
2669
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2502
+ pool: schemas_exports.string(),
2503
+ namespace: schemas_exports.string(),
2504
+ datacenter: schemas_exports.string(),
2505
+ version: schemas_exports.number(),
2506
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2670
2507
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
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()
2680
- });
2681
-
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()
2760
- });
2761
-
2762
- // src/serialization/types/RunnerConfigKindServerless.ts
2763
- var RunnerConfigKindServerless = schemas_exports.object({
2764
- serverless: RunnerConfigKindServerlessServerless
2765
- });
2766
-
2767
- // src/serialization/types/RunnerConfigKind.ts
2768
- var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2769
-
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()
2508
+ connected: schemas_exports.boolean(),
2509
+ stopping: schemas_exports.boolean()
2808
2510
  });
2809
2511
 
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
2512
+ // src/serialization/types/Pool.ts
2513
+ var Pool = schemas_exports.object({
2514
+ name: schemas_exports.string(),
2515
+ drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2516
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2517
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2518
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2519
+ metadata: schemas_exports.unknown()
2825
2520
  });
2826
2521
 
2827
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2828
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2829
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2522
+ // src/serialization/types/PoolResponse.ts
2523
+ var PoolResponse = schemas_exports.object({
2524
+ pool: Pool
2830
2525
  });
2831
2526
 
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
- });
2527
+ // src/serialization/types/PoolsDeleteResponse.ts
2528
+ var PoolsDeleteResponse = schemas_exports.object({});
2842
2529
 
2843
- // src/serialization/types/RunnersListNamesResponse.ts
2844
- var RunnersListNamesResponse = schemas_exports.object({
2845
- names: schemas_exports.list(schemas_exports.string()),
2530
+ // src/serialization/types/PoolsListNodesResponse.ts
2531
+ var PoolsListNodesResponse = schemas_exports.object({
2532
+ nodes: schemas_exports.list(Node),
2846
2533
  pagination: Pagination
2847
2534
  });
2848
2535
 
2849
- // src/serialization/types/RunnersListResponse.ts
2850
- var RunnersListResponse = schemas_exports.object({
2536
+ // src/serialization/types/PoolsListResponse.ts
2537
+ var PoolsListResponse = schemas_exports.object({
2851
2538
  pagination: Pagination,
2852
- runners: schemas_exports.list(Runner)
2539
+ pools: schemas_exports.list(Pool)
2853
2540
  });
2854
2541
 
2855
2542
  // src/serialization/client/requests/ActorsCreateRequest.ts
2856
2543
  var ActorsCreateRequest = schemas_exports.object({
2857
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2858
- datacenter: schemas_exports.string().optional(),
2859
2544
  input: schemas_exports.string().optional(),
2860
2545
  key: schemas_exports.string().optional(),
2861
2546
  name: schemas_exports.string(),
2862
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2547
+ pool: schemas_exports.string().optional()
2863
2548
  });
2864
2549
 
2865
2550
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2866
2551
  var ActorsGetOrCreateRequest = schemas_exports.object({
2867
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2868
- datacenter: schemas_exports.string().optional(),
2869
2552
  input: schemas_exports.string().optional(),
2870
- key: schemas_exports.string(),
2553
+ key: schemas_exports.string().optional(),
2871
2554
  name: schemas_exports.string(),
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
+ pool: schemas_exports.string().optional()
2898
2556
  });
2899
2557
 
2900
2558
  // src/serialization/resources/namespaces/index.ts
2901
- var namespaces_exports2 = {};
2902
- __export(namespaces_exports2, {
2559
+ var namespaces_exports = {};
2560
+ __export(namespaces_exports, {
2903
2561
  NamespacesCreateRequest: () => NamespacesCreateRequest
2904
2562
  });
2905
2563
 
2906
2564
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2907
2565
  var NamespacesCreateRequest = schemas_exports.object({
2908
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2909
2566
  name: schemas_exports.string()
2910
2567
  });
2911
2568
 
2912
- // src/Client.ts
2913
- var import_url_join8 = __toESM(require("url-join"));
2914
-
2915
2569
  // src/errors/RivetError.ts
2916
2570
  var RivetError = class _RivetError extends Error {
2917
2571
  statusCode;
@@ -2954,25 +2608,10 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2954
2608
  };
2955
2609
 
2956
2610
  // src/api/resources/authTokens/client/Client.ts
2957
- var import_url_join = __toESM(require("url-join"));
2958
2611
  var AuthTokens = class {
2959
2612
  constructor(_options) {
2960
2613
  this._options = _options;
2961
2614
  }
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
- */
2976
2615
  async create(request, requestOptions) {
2977
2616
  const _response = await (this._options.fetcher ?? fetcher)({
2978
2617
  url: (0, import_url_join.default)(
@@ -2989,7 +2628,12 @@ var AuthTokens = class {
2989
2628
  },
2990
2629
  contentType: "application/json",
2991
2630
  requestType: "json",
2992
- body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2631
+ body: {
2632
+ namespace: request.namespace,
2633
+ duration: request.duration,
2634
+ subject: request.subject,
2635
+ grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2636
+ },
2993
2637
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2994
2638
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2995
2639
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3023,12 +2667,6 @@ var AuthTokens = class {
3023
2667
  });
3024
2668
  }
3025
2669
  }
3026
- /**
3027
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
3028
- *
3029
- * @example
3030
- * await client.authTokens.inspect()
3031
- */
3032
2670
  async inspect(requestOptions) {
3033
2671
  const _response = await (this._options.fetcher ?? fetcher)({
3034
2672
  url: (0, import_url_join.default)(
@@ -3083,6 +2721,21 @@ var AuthTokens = class {
3083
2721
  }
3084
2722
  };
3085
2723
 
2724
+ // src/api/resources/datacenters/index.ts
2725
+ var datacenters_exports = {};
2726
+
2727
+ // src/api/resources/metadata/index.ts
2728
+ var metadata_exports = {};
2729
+
2730
+ // src/api/resources/namespaces/index.ts
2731
+ var namespaces_exports2 = {};
2732
+
2733
+ // src/api/resources/pools/index.ts
2734
+ var pools_exports = {};
2735
+
2736
+ // src/Client.ts
2737
+ var import_url_join6 = __toESM(require("url-join"));
2738
+
3086
2739
  // src/api/resources/datacenters/client/Client.ts
3087
2740
  var import_url_join2 = __toESM(require("url-join"));
3088
2741
  var Datacenters = class {
@@ -3149,45 +2802,23 @@ var Datacenters = class {
3149
2802
  }
3150
2803
  };
3151
2804
 
3152
- // src/api/resources/envoys/client/Client.ts
2805
+ // src/api/resources/metadata/client/Client.ts
3153
2806
  var import_url_join3 = __toESM(require("url-join"));
3154
- var Envoys = class {
2807
+ var Metadata = class {
3155
2808
  constructor(_options) {
3156
2809
  this._options = _options;
3157
2810
  }
3158
2811
  /**
3159
- * @param {Rivet.EnvoysListRequest} request
3160
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2812
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3161
2813
  *
3162
2814
  * @example
3163
- * await client.envoys.list({
3164
- * namespace: "namespace"
3165
- * })
2815
+ * await client.metadata.get()
3166
2816
  */
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
+ async get(requestOptions) {
3187
2818
  const _response = await (this._options.fetcher ?? fetcher)({
3188
2819
  url: (0, import_url_join3.default)(
3189
2820
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3190
- "envoys"
2821
+ "metadata"
3191
2822
  ),
3192
2823
  method: "GET",
3193
2824
  headers: {
@@ -3198,14 +2829,13 @@ var Envoys = class {
3198
2829
  ...requestOptions == null ? void 0 : requestOptions.headers
3199
2830
  },
3200
2831
  contentType: "application/json",
3201
- queryParameters: _queryParams,
3202
2832
  requestType: "json",
3203
2833
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3204
2834
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3205
2835
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3206
2836
  });
3207
2837
  if (_response.ok) {
3208
- return EnvoysListResponse.parseOrThrow(_response.body, {
2838
+ return MetadataGetResponse.parseOrThrow(_response.body, {
3209
2839
  unrecognizedObjectKeys: "passthrough",
3210
2840
  allowUnrecognizedUnionMembers: true,
3211
2841
  allowUnrecognizedEnumValues: true,
@@ -3226,7 +2856,7 @@ var Envoys = class {
3226
2856
  body: _response.error.rawBody
3227
2857
  });
3228
2858
  case "timeout":
3229
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2859
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3230
2860
  case "unknown":
3231
2861
  throw new RivetError({
3232
2862
  message: _response.error.errorMessage
@@ -3238,23 +2868,35 @@ var Envoys = class {
3238
2868
  }
3239
2869
  };
3240
2870
 
3241
- // src/api/resources/health/client/Client.ts
2871
+ // src/api/resources/namespaces/client/Client.ts
3242
2872
  var import_url_join4 = __toESM(require("url-join"));
3243
- var Health = class {
2873
+ var Namespaces = class {
3244
2874
  constructor(_options) {
3245
2875
  this._options = _options;
3246
2876
  }
3247
2877
  /**
3248
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2878
+ * @param {Rivet.NamespacesListRequest} request
2879
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3249
2880
  *
3250
2881
  * @example
3251
- * await client.health.fanout()
2882
+ * await client.namespaces.list()
3252
2883
  */
3253
- async fanout(requestOptions) {
2884
+ async list(request = {}, requestOptions) {
2885
+ const { limit, cursor, name } = request;
2886
+ const _queryParams = {};
2887
+ if (limit != null) {
2888
+ _queryParams["limit"] = limit.toString();
2889
+ }
2890
+ if (cursor != null) {
2891
+ _queryParams["cursor"] = cursor;
2892
+ }
2893
+ if (name != null) {
2894
+ _queryParams["name"] = name;
2895
+ }
3254
2896
  const _response = await (this._options.fetcher ?? fetcher)({
3255
2897
  url: (0, import_url_join4.default)(
3256
2898
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3257
- "health/fanout"
2899
+ "namespaces"
3258
2900
  ),
3259
2901
  method: "GET",
3260
2902
  headers: {
@@ -3265,13 +2907,14 @@ var Health = class {
3265
2907
  ...requestOptions == null ? void 0 : requestOptions.headers
3266
2908
  },
3267
2909
  contentType: "application/json",
2910
+ queryParameters: _queryParams,
3268
2911
  requestType: "json",
3269
2912
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3270
2913
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3271
2914
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3272
2915
  });
3273
2916
  if (_response.ok) {
3274
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2917
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3275
2918
  unrecognizedObjectKeys: "passthrough",
3276
2919
  allowUnrecognizedUnionMembers: true,
3277
2920
  allowUnrecognizedEnumValues: true,
@@ -3292,37 +2935,29 @@ var Health = class {
3292
2935
  body: _response.error.rawBody
3293
2936
  });
3294
2937
  case "timeout":
3295
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2938
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3296
2939
  case "unknown":
3297
2940
  throw new RivetError({
3298
2941
  message: _response.error.errorMessage
3299
2942
  });
3300
2943
  }
3301
2944
  }
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
- }
3313
2945
  /**
3314
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2946
+ * @param {Rivet.NamespacesCreateRequest} request
2947
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3315
2948
  *
3316
2949
  * @example
3317
- * await client.metadata.get()
2950
+ * await client.namespaces.create({
2951
+ * name: "name"
2952
+ * })
3318
2953
  */
3319
- async get(requestOptions) {
2954
+ async create(request, requestOptions) {
3320
2955
  const _response = await (this._options.fetcher ?? fetcher)({
3321
- url: (0, import_url_join5.default)(
2956
+ url: (0, import_url_join4.default)(
3322
2957
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3323
- "metadata"
2958
+ "namespaces"
3324
2959
  ),
3325
- method: "GET",
2960
+ method: "POST",
3326
2961
  headers: {
3327
2962
  Authorization: await this._getAuthorizationHeader(),
3328
2963
  "X-Fern-Language": "JavaScript",
@@ -3332,12 +2967,13 @@ var Metadata = class {
3332
2967
  },
3333
2968
  contentType: "application/json",
3334
2969
  requestType: "json",
2970
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3335
2971
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3336
2972
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3337
2973
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3338
2974
  });
3339
2975
  if (_response.ok) {
3340
- return MetadataGetResponse.parseOrThrow(_response.body, {
2976
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3341
2977
  unrecognizedObjectKeys: "passthrough",
3342
2978
  allowUnrecognizedUnionMembers: true,
3343
2979
  allowUnrecognizedEnumValues: true,
@@ -3358,7 +2994,7 @@ var Metadata = class {
3358
2994
  body: _response.error.rawBody
3359
2995
  });
3360
2996
  case "timeout":
3361
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2997
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3362
2998
  case "unknown":
3363
2999
  throw new RivetError({
3364
3000
  message: _response.error.errorMessage
@@ -3370,47 +3006,38 @@ var Metadata = class {
3370
3006
  }
3371
3007
  };
3372
3008
 
3373
- // src/api/resources/namespaces/client/Client.ts
3374
- var import_url_join6 = __toESM(require("url-join"));
3375
- var Namespaces = class {
3009
+ // src/api/resources/pools/client/Client.ts
3010
+ var import_url_join5 = __toESM(require("url-join"));
3011
+ var Pools = class {
3376
3012
  constructor(_options) {
3377
3013
  this._options = _options;
3378
3014
  }
3379
3015
  /**
3380
- * @param {Rivet.NamespacesListRequest} request
3381
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3016
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
3017
+ *
3018
+ * @param {Rivet.PoolsListRequest} request
3019
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3382
3020
  *
3383
3021
  * @example
3384
- * await client.namespaces.list()
3022
+ * await client.pools.list({
3023
+ * namespace: "namespace"
3024
+ * })
3385
3025
  */
3386
- async list(request = {}, requestOptions) {
3387
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
3026
+ async list(request, requestOptions) {
3027
+ const { namespace, limit, cursor } = request;
3388
3028
  const _queryParams = {};
3029
+ if (namespace != null)
3030
+ _queryParams["namespace"] = namespace;
3389
3031
  if (limit != null) {
3390
3032
  _queryParams["limit"] = limit.toString();
3391
3033
  }
3392
3034
  if (cursor != null) {
3393
3035
  _queryParams["cursor"] = cursor;
3394
3036
  }
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
3037
  const _response = await (this._options.fetcher ?? fetcher)({
3411
- url: (0, import_url_join6.default)(
3038
+ url: (0, import_url_join5.default)(
3412
3039
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3413
- "namespaces"
3040
+ "pools"
3414
3041
  ),
3415
3042
  method: "GET",
3416
3043
  headers: {
@@ -3428,7 +3055,7 @@ var Namespaces = class {
3428
3055
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3429
3056
  });
3430
3057
  if (_response.ok) {
3431
- return NamespaceListResponse.parseOrThrow(_response.body, {
3058
+ return PoolsListResponse.parseOrThrow(_response.body, {
3432
3059
  unrecognizedObjectKeys: "passthrough",
3433
3060
  allowUnrecognizedUnionMembers: true,
3434
3061
  allowUnrecognizedEnumValues: true,
@@ -3449,7 +3076,7 @@ var Namespaces = class {
3449
3076
  body: _response.error.rawBody
3450
3077
  });
3451
3078
  case "timeout":
3452
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3079
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3453
3080
  case "unknown":
3454
3081
  throw new RivetError({
3455
3082
  message: _response.error.errorMessage
@@ -3457,22 +3084,34 @@ var Namespaces = class {
3457
3084
  }
3458
3085
  }
3459
3086
  /**
3460
- * @param {Rivet.NamespacesCreateRequest} request
3461
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3087
+ * Lists the live nodes of a pool in node key order.
3088
+ *
3089
+ * @param {string} pool
3090
+ * @param {Rivet.PoolsListNodesRequest} request
3091
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3462
3092
  *
3463
3093
  * @example
3464
- * await client.namespaces.create({
3465
- * displayName: "display_name",
3466
- * name: "name"
3094
+ * await client.pools.listNodes("pool", {
3095
+ * namespace: "namespace"
3467
3096
  * })
3468
3097
  */
3469
- async create(request, requestOptions) {
3098
+ async listNodes(pool, request, requestOptions) {
3099
+ const { namespace, limit, cursor } = request;
3100
+ const _queryParams = {};
3101
+ if (namespace != null)
3102
+ _queryParams["namespace"] = namespace;
3103
+ if (limit != null) {
3104
+ _queryParams["limit"] = limit.toString();
3105
+ }
3106
+ if (cursor != null) {
3107
+ _queryParams["cursor"] = cursor;
3108
+ }
3470
3109
  const _response = await (this._options.fetcher ?? fetcher)({
3471
- url: (0, import_url_join6.default)(
3110
+ url: (0, import_url_join5.default)(
3472
3111
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3473
- "namespaces"
3112
+ `pools/${encodeURIComponent(pool)}/nodes`
3474
3113
  ),
3475
- method: "POST",
3114
+ method: "GET",
3476
3115
  headers: {
3477
3116
  Authorization: await this._getAuthorizationHeader(),
3478
3117
  "X-Fern-Language": "JavaScript",
@@ -3481,14 +3120,14 @@ var Namespaces = class {
3481
3120
  ...requestOptions == null ? void 0 : requestOptions.headers
3482
3121
  },
3483
3122
  contentType: "application/json",
3123
+ queryParameters: _queryParams,
3484
3124
  requestType: "json",
3485
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3486
3125
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3487
3126
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3488
3127
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3489
3128
  });
3490
3129
  if (_response.ok) {
3491
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3130
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3492
3131
  unrecognizedObjectKeys: "passthrough",
3493
3132
  allowUnrecognizedUnionMembers: true,
3494
3133
  allowUnrecognizedEnumValues: true,
@@ -3509,65 +3148,21 @@ var Namespaces = class {
3509
3148
  body: _response.error.rawBody
3510
3149
  });
3511
3150
  case "timeout":
3512
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3151
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3513
3152
  case "unknown":
3514
3153
  throw new RivetError({
3515
3154
  message: _response.error.errorMessage
3516
3155
  });
3517
3156
  }
3518
3157
  }
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
+ async get(name, request = {}, requestOptions) {
3541
3159
  const _queryParams = {};
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
- }
3160
+ if (request.namespace != null)
3161
+ _queryParams["namespace"] = request.namespace;
3567
3162
  const _response = await (this._options.fetcher ?? fetcher)({
3568
- url: (0, import_url_join7.default)(
3163
+ url: (0, import_url_join5.default)(
3569
3164
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3570
- "runners"
3165
+ `pools/${encodeURIComponent(name)}`
3571
3166
  ),
3572
3167
  method: "GET",
3573
3168
  headers: {
@@ -3585,7 +3180,7 @@ var Runners = class {
3585
3180
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3586
3181
  });
3587
3182
  if (_response.ok) {
3588
- return RunnersListResponse.parseOrThrow(_response.body, {
3183
+ return PoolResponse.parseOrThrow(_response.body, {
3589
3184
  unrecognizedObjectKeys: "passthrough",
3590
3185
  allowUnrecognizedUnionMembers: true,
3591
3186
  allowUnrecognizedEnumValues: true,
@@ -3606,43 +3201,23 @@ var Runners = class {
3606
3201
  body: _response.error.rawBody
3607
3202
  });
3608
3203
  case "timeout":
3609
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3204
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3610
3205
  case "unknown":
3611
3206
  throw new RivetError({
3612
3207
  message: _response.error.errorMessage
3613
3208
  });
3614
3209
  }
3615
3210
  }
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
+ async upsert(name, request, requestOptions) {
3632
3212
  const _queryParams = {};
3633
- _queryParams["namespace"] = namespace;
3634
- if (limit != null) {
3635
- _queryParams["limit"] = limit.toString();
3636
- }
3637
- if (cursor != null) {
3638
- _queryParams["cursor"] = cursor;
3639
- }
3213
+ if (request.namespace != null)
3214
+ _queryParams["namespace"] = request.namespace;
3640
3215
  const _response = await (this._options.fetcher ?? fetcher)({
3641
- url: (0, import_url_join7.default)(
3216
+ url: (0, import_url_join5.default)(
3642
3217
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3643
- "runners/names"
3218
+ `pools/${encodeURIComponent(name)}`
3644
3219
  ),
3645
- method: "GET",
3220
+ method: "PUT",
3646
3221
  headers: {
3647
3222
  Authorization: await this._getAuthorizationHeader(),
3648
3223
  "X-Fern-Language": "JavaScript",
@@ -3653,12 +3228,19 @@ var Runners = class {
3653
3228
  contentType: "application/json",
3654
3229
  queryParameters: _queryParams,
3655
3230
  requestType: "json",
3231
+ body: {
3232
+ drain_on_version_upgrade: request.drainOnVersionUpgrade,
3233
+ actor_eviction_delay: request.actorEvictionDelay,
3234
+ actor_eviction_period: request.actorEvictionPeriod,
3235
+ actor_eviction_rate: request.actorEvictionRate,
3236
+ metadata: request.metadata
3237
+ },
3656
3238
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3657
3239
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3658
3240
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3659
3241
  });
3660
3242
  if (_response.ok) {
3661
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3243
+ return PoolResponse.parseOrThrow(_response.body, {
3662
3244
  unrecognizedObjectKeys: "passthrough",
3663
3245
  allowUnrecognizedUnionMembers: true,
3664
3246
  allowUnrecognizedEnumValues: true,
@@ -3679,7 +3261,54 @@ var Runners = class {
3679
3261
  body: _response.error.rawBody
3680
3262
  });
3681
3263
  case "timeout":
3682
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3264
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3265
+ case "unknown":
3266
+ throw new RivetError({
3267
+ message: _response.error.errorMessage
3268
+ });
3269
+ }
3270
+ }
3271
+ async delete(name, request = {}, requestOptions) {
3272
+ const _queryParams = {};
3273
+ if (request.namespace != null)
3274
+ _queryParams["namespace"] = request.namespace;
3275
+ const _response = await (this._options.fetcher ?? fetcher)({
3276
+ url: (0, import_url_join5.default)(
3277
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3278
+ `pools/${encodeURIComponent(name)}`
3279
+ ),
3280
+ method: "DELETE",
3281
+ headers: {
3282
+ Authorization: await this._getAuthorizationHeader(),
3283
+ "X-Fern-Language": "JavaScript",
3284
+ "X-Fern-Runtime": RUNTIME.type,
3285
+ "X-Fern-Runtime-Version": RUNTIME.version,
3286
+ ...requestOptions == null ? void 0 : requestOptions.headers
3287
+ },
3288
+ contentType: "application/json",
3289
+ queryParameters: _queryParams,
3290
+ requestType: "json",
3291
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3292
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3293
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3294
+ });
3295
+ if (_response.ok) {
3296
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3297
+ }
3298
+ if (_response.error.reason === "status-code") {
3299
+ throw new RivetError({
3300
+ statusCode: _response.error.statusCode,
3301
+ body: _response.error.body
3302
+ });
3303
+ }
3304
+ switch (_response.error.reason) {
3305
+ case "non-json":
3306
+ throw new RivetError({
3307
+ statusCode: _response.error.statusCode,
3308
+ body: _response.error.rawBody
3309
+ });
3310
+ case "timeout":
3311
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3683
3312
  case "unknown":
3684
3313
  throw new RivetError({
3685
3314
  message: _response.error.errorMessage
@@ -3698,31 +3327,23 @@ var RivetClient = class {
3698
3327
  }
3699
3328
  _authTokens;
3700
3329
  _datacenters;
3701
- _envoys;
3702
- _health;
3703
3330
  _metadata;
3704
3331
  _namespaces;
3705
- _runners;
3332
+ _pools;
3706
3333
  get authTokens() {
3707
3334
  return this._authTokens ?? (this._authTokens = new AuthTokens(this._options));
3708
3335
  }
3709
3336
  get datacenters() {
3710
3337
  return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3711
3338
  }
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
- }
3718
3339
  get metadata() {
3719
3340
  return this._metadata ?? (this._metadata = new Metadata(this._options));
3720
3341
  }
3721
3342
  get namespaces() {
3722
3343
  return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3723
3344
  }
3724
- get runners() {
3725
- return this._runners ?? (this._runners = new Runners(this._options));
3345
+ get pools() {
3346
+ return this._pools ?? (this._pools = new Pools(this._options));
3726
3347
  }
3727
3348
  /**
3728
3349
  * **If key is some & `include_destroyed` is false**
@@ -3759,7 +3380,8 @@ var RivetClient = class {
3759
3380
  async actorsList(request, requestOptions) {
3760
3381
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3761
3382
  const _queryParams = {};
3762
- _queryParams["namespace"] = namespace;
3383
+ if (namespace != null)
3384
+ _queryParams["namespace"] = namespace;
3763
3385
  if (name != null) {
3764
3386
  _queryParams["name"] = name;
3765
3387
  }
@@ -3769,15 +3391,8 @@ var RivetClient = class {
3769
3391
  if (actorIds != null) {
3770
3392
  _queryParams["actor_ids"] = actorIds;
3771
3393
  }
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
- }
3394
+ if (actorId != null)
3395
+ _queryParams["actor_id"] = actorId;
3781
3396
  if (includeDestroyed != null) {
3782
3397
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3783
3398
  }
@@ -3788,7 +3403,7 @@ var RivetClient = class {
3788
3403
  _queryParams["cursor"] = cursor;
3789
3404
  }
3790
3405
  const _response = await (this._options.fetcher ?? fetcher)({
3791
- url: (0, import_url_join8.default)(
3406
+ url: (0, import_url_join6.default)(
3792
3407
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3793
3408
  "actors"
3794
3409
  ),
@@ -3860,17 +3475,17 @@ var RivetClient = class {
3860
3475
  * @example
3861
3476
  * await client.actorsCreate({
3862
3477
  * namespace: "namespace",
3863
- * crashPolicy: "restart",
3864
3478
  * name: "name",
3865
- * runnerNameSelector: "runner_name_selector"
3479
+ * pool: "pool"
3866
3480
  * })
3867
3481
  */
3868
3482
  async actorsCreate(request, requestOptions) {
3869
3483
  const { namespace, ..._body } = request;
3870
3484
  const _queryParams = {};
3871
- _queryParams["namespace"] = namespace;
3485
+ if (namespace != null)
3486
+ _queryParams["namespace"] = namespace;
3872
3487
  const _response = await (this._options.fetcher ?? fetcher)({
3873
- url: (0, import_url_join8.default)(
3488
+ url: (0, import_url_join6.default)(
3874
3489
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3875
3490
  "actors"
3876
3491
  ),
@@ -3952,18 +3567,18 @@ var RivetClient = class {
3952
3567
  * @example
3953
3568
  * await client.actorsGetOrCreate({
3954
3569
  * namespace: "namespace",
3955
- * crashPolicy: "restart",
3956
3570
  * key: "key",
3957
3571
  * name: "name",
3958
- * runnerNameSelector: "runner_name_selector"
3572
+ * pool: "pool"
3959
3573
  * })
3960
3574
  */
3961
3575
  async actorsGetOrCreate(request, requestOptions) {
3962
3576
  const { namespace, ..._body } = request;
3963
3577
  const _queryParams = {};
3964
- _queryParams["namespace"] = namespace;
3578
+ if (namespace != null)
3579
+ _queryParams["namespace"] = namespace;
3965
3580
  const _response = await (this._options.fetcher ?? fetcher)({
3966
- url: (0, import_url_join8.default)(
3581
+ url: (0, import_url_join6.default)(
3967
3582
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3968
3583
  "actors"
3969
3584
  ),
@@ -4029,7 +3644,8 @@ var RivetClient = class {
4029
3644
  async actorsListNames(request, requestOptions) {
4030
3645
  const { namespace, limit, cursor } = request;
4031
3646
  const _queryParams = {};
4032
- _queryParams["namespace"] = namespace;
3647
+ if (namespace != null)
3648
+ _queryParams["namespace"] = namespace;
4033
3649
  if (limit != null) {
4034
3650
  _queryParams["limit"] = limit.toString();
4035
3651
  }
@@ -4037,7 +3653,7 @@ var RivetClient = class {
4037
3653
  _queryParams["cursor"] = cursor;
4038
3654
  }
4039
3655
  const _response = await (this._options.fetcher ?? fetcher)({
4040
- url: (0, import_url_join8.default)(
3656
+ url: (0, import_url_join6.default)(
4041
3657
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4042
3658
  "actors/names"
4043
3659
  ),
@@ -4100,16 +3716,18 @@ var RivetClient = class {
4100
3716
  * namespace: "namespace"
4101
3717
  * })
4102
3718
  */
4103
- async actorsDelete(actorId, request, requestOptions) {
3719
+ /** Returns one actor by ID. */
3720
+ async actorsGet(actorId, request, requestOptions) {
4104
3721
  const { namespace } = request;
4105
3722
  const _queryParams = {};
4106
- _queryParams["namespace"] = namespace;
3723
+ if (namespace != null)
3724
+ _queryParams["namespace"] = namespace;
4107
3725
  const _response = await (this._options.fetcher ?? fetcher)({
4108
- url: (0, import_url_join8.default)(
3726
+ url: (0, import_url_join6.default)(
4109
3727
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4110
3728
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4111
3729
  ),
4112
- method: "DELETE",
3730
+ method: "GET",
4113
3731
  headers: {
4114
3732
  Authorization: await this._getAuthorizationHeader(),
4115
3733
  "X-Fern-Language": "JavaScript",
@@ -4125,7 +3743,7 @@ var RivetClient = class {
4125
3743
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4126
3744
  });
4127
3745
  if (_response.ok) {
4128
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3746
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4129
3747
  unrecognizedObjectKeys: "passthrough",
4130
3748
  allowUnrecognizedUnionMembers: true,
4131
3749
  allowUnrecognizedEnumValues: true,
@@ -4146,34 +3764,24 @@ var RivetClient = class {
4146
3764
  body: _response.error.rawBody
4147
3765
  });
4148
3766
  case "timeout":
4149
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3767
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4150
3768
  case "unknown":
4151
3769
  throw new RivetError({
4152
3770
  message: _response.error.errorMessage
4153
3771
  });
4154
3772
  }
4155
3773
  }
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
+ async actorsDelete(actorId, request, requestOptions) {
4168
3775
  const { namespace } = request;
4169
3776
  const _queryParams = {};
4170
- _queryParams["namespace"] = namespace;
3777
+ if (namespace != null)
3778
+ _queryParams["namespace"] = namespace;
4171
3779
  const _response = await (this._options.fetcher ?? fetcher)({
4172
- url: (0, import_url_join8.default)(
3780
+ url: (0, import_url_join6.default)(
4173
3781
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4174
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3782
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4175
3783
  ),
4176
- method: "GET",
3784
+ method: "DELETE",
4177
3785
  headers: {
4178
3786
  Authorization: await this._getAuthorizationHeader(),
4179
3787
  "X-Fern-Language": "JavaScript",
@@ -4189,7 +3797,7 @@ var RivetClient = class {
4189
3797
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4190
3798
  });
4191
3799
  if (_response.ok) {
4192
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3800
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4193
3801
  unrecognizedObjectKeys: "passthrough",
4194
3802
  allowUnrecognizedUnionMembers: true,
4195
3803
  allowUnrecognizedEnumValues: true,
@@ -4210,9 +3818,7 @@ var RivetClient = class {
4210
3818
  body: _response.error.rawBody
4211
3819
  });
4212
3820
  case "timeout":
4213
- throw new RivetTimeoutError(
4214
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4215
- );
3821
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4216
3822
  case "unknown":
4217
3823
  throw new RivetError({
4218
3824
  message: _response.error.errorMessage
@@ -4227,17 +3833,15 @@ var RivetClient = class {
4227
3833
  * @example
4228
3834
  * await client.actorsReschedule("actor_id", {
4229
3835
  * namespace: "namespace",
4230
- * body: {
4231
- * "key": "value"
4232
- * }
4233
3836
  * })
4234
3837
  */
4235
3838
  async actorsReschedule(actorId, request, requestOptions) {
4236
- const { namespace, body: _body } = request;
3839
+ const { namespace } = request;
4237
3840
  const _queryParams = {};
4238
- _queryParams["namespace"] = namespace;
3841
+ if (namespace != null)
3842
+ _queryParams["namespace"] = namespace;
4239
3843
  const _response = await (this._options.fetcher ?? fetcher)({
4240
- url: (0, import_url_join8.default)(
3844
+ url: (0, import_url_join6.default)(
4241
3845
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4242
3846
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4243
3847
  ),
@@ -4252,7 +3856,6 @@ var RivetClient = class {
4252
3856
  contentType: "application/json",
4253
3857
  queryParameters: _queryParams,
4254
3858
  requestType: "json",
4255
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4256
3859
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4257
3860
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4258
3861
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4294,17 +3897,15 @@ var RivetClient = class {
4294
3897
  * @example
4295
3898
  * await client.actorsSleep("actor_id", {
4296
3899
  * namespace: "namespace",
4297
- * body: {
4298
- * "key": "value"
4299
- * }
4300
3900
  * })
4301
3901
  */
4302
3902
  async actorsSleep(actorId, request, requestOptions) {
4303
- const { namespace, body: _body } = request;
3903
+ const { namespace } = request;
4304
3904
  const _queryParams = {};
4305
- _queryParams["namespace"] = namespace;
3905
+ if (namespace != null)
3906
+ _queryParams["namespace"] = namespace;
4306
3907
  const _response = await (this._options.fetcher ?? fetcher)({
4307
- url: (0, import_url_join8.default)(
3908
+ url: (0, import_url_join6.default)(
4308
3909
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4309
3910
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4310
3911
  ),
@@ -4319,7 +3920,6 @@ var RivetClient = class {
4319
3920
  contentType: "application/json",
4320
3921
  queryParameters: _queryParams,
4321
3922
  requestType: "json",
4322
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4323
3923
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4324
3924
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4325
3925
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4353,360 +3953,6 @@ var RivetClient = class {
4353
3953
  });
4354
3954
  }
4355
3955
  }
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
- }
4710
3956
  async _getAuthorizationHeader() {
4711
3957
  return `Bearer ${await Supplier.get(this._options.token)}`;
4712
3958
  }