@rivetkit/engine-api-full 2.3.30 → 3.0.0-preview.2

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 +322 -1077
  2. package/dist/browser/cjs/serialization.js +93 -379
  3. package/dist/browser/esm/index.js +322 -1077
  4. package/dist/browser/esm/serialization.js +93 -379
  5. package/dist/node/cjs/index.js +322 -1077
  6. package/dist/node/cjs/serialization.js +103 -421
  7. package/dist/node/esm/index.js +322 -1077
  8. package/dist/node/esm/serialization.js +93 -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 +18 -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 +16 -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,75 @@ 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
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2670
2506
  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()
2507
+ connected: schemas_exports.boolean(),
2508
+ stopping: schemas_exports.boolean()
2808
2509
  });
2809
2510
 
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
2511
+ // src/serialization/types/Pool.ts
2512
+ var Pool = schemas_exports.object({
2513
+ name: schemas_exports.string(),
2514
+ drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2515
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2516
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2517
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2518
+ metadata: schemas_exports.unknown()
2825
2519
  });
2826
2520
 
2827
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2828
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2829
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2521
+ // src/serialization/types/PoolResponse.ts
2522
+ var PoolResponse = schemas_exports.object({
2523
+ pool: Pool
2830
2524
  });
2831
2525
 
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
- });
2526
+ // src/serialization/types/PoolsDeleteResponse.ts
2527
+ var PoolsDeleteResponse = schemas_exports.object({});
2842
2528
 
2843
- // src/serialization/types/RunnersListNamesResponse.ts
2844
- var RunnersListNamesResponse = schemas_exports.object({
2845
- names: schemas_exports.list(schemas_exports.string()),
2529
+ // src/serialization/types/PoolsListNodesResponse.ts
2530
+ var PoolsListNodesResponse = schemas_exports.object({
2531
+ nodes: schemas_exports.list(Node),
2846
2532
  pagination: Pagination
2847
2533
  });
2848
2534
 
2849
- // src/serialization/types/RunnersListResponse.ts
2850
- var RunnersListResponse = schemas_exports.object({
2535
+ // src/serialization/types/PoolsListResponse.ts
2536
+ var PoolsListResponse = schemas_exports.object({
2851
2537
  pagination: Pagination,
2852
- runners: schemas_exports.list(Runner)
2538
+ pools: schemas_exports.list(Pool)
2853
2539
  });
2854
2540
 
2855
2541
  // src/serialization/client/requests/ActorsCreateRequest.ts
2856
2542
  var ActorsCreateRequest = schemas_exports.object({
2857
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2858
- datacenter: schemas_exports.string().optional(),
2859
2543
  input: schemas_exports.string().optional(),
2860
2544
  key: schemas_exports.string().optional(),
2861
2545
  name: schemas_exports.string(),
2862
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2546
+ pool: schemas_exports.string().optional()
2863
2547
  });
2864
2548
 
2865
2549
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2866
2550
  var ActorsGetOrCreateRequest = schemas_exports.object({
2867
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2868
- datacenter: schemas_exports.string().optional(),
2869
2551
  input: schemas_exports.string().optional(),
2870
- key: schemas_exports.string(),
2552
+ key: schemas_exports.string().optional(),
2871
2553
  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()
2554
+ pool: schemas_exports.string().optional()
2898
2555
  });
2899
2556
 
2900
2557
  // src/serialization/resources/namespaces/index.ts
2901
- var namespaces_exports2 = {};
2902
- __export(namespaces_exports2, {
2558
+ var namespaces_exports = {};
2559
+ __export(namespaces_exports, {
2903
2560
  NamespacesCreateRequest: () => NamespacesCreateRequest
2904
2561
  });
2905
2562
 
2906
2563
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2907
2564
  var NamespacesCreateRequest = schemas_exports.object({
2908
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2909
2565
  name: schemas_exports.string()
2910
2566
  });
2911
2567
 
2912
- // src/Client.ts
2913
- var import_url_join8 = __toESM(require("url-join"));
2914
-
2915
2568
  // src/errors/RivetError.ts
2916
2569
  var RivetError = class _RivetError extends Error {
2917
2570
  statusCode;
@@ -2954,25 +2607,10 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2954
2607
  };
2955
2608
 
2956
2609
  // src/api/resources/authTokens/client/Client.ts
2957
- var import_url_join = __toESM(require("url-join"));
2958
2610
  var AuthTokens = class {
2959
2611
  constructor(_options) {
2960
2612
  this._options = _options;
2961
2613
  }
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
2614
  async create(request, requestOptions) {
2977
2615
  const _response = await (this._options.fetcher ?? fetcher)({
2978
2616
  url: (0, import_url_join.default)(
@@ -2989,7 +2627,12 @@ var AuthTokens = class {
2989
2627
  },
2990
2628
  contentType: "application/json",
2991
2629
  requestType: "json",
2992
- body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2630
+ body: {
2631
+ namespace: request.namespace,
2632
+ duration: request.duration,
2633
+ subject: request.subject,
2634
+ grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2635
+ },
2993
2636
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2994
2637
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2995
2638
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3023,12 +2666,6 @@ var AuthTokens = class {
3023
2666
  });
3024
2667
  }
3025
2668
  }
3026
- /**
3027
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
3028
- *
3029
- * @example
3030
- * await client.authTokens.inspect()
3031
- */
3032
2669
  async inspect(requestOptions) {
3033
2670
  const _response = await (this._options.fetcher ?? fetcher)({
3034
2671
  url: (0, import_url_join.default)(
@@ -3083,6 +2720,21 @@ var AuthTokens = class {
3083
2720
  }
3084
2721
  };
3085
2722
 
2723
+ // src/api/resources/datacenters/index.ts
2724
+ var datacenters_exports = {};
2725
+
2726
+ // src/api/resources/metadata/index.ts
2727
+ var metadata_exports = {};
2728
+
2729
+ // src/api/resources/namespaces/index.ts
2730
+ var namespaces_exports2 = {};
2731
+
2732
+ // src/api/resources/pools/index.ts
2733
+ var pools_exports = {};
2734
+
2735
+ // src/Client.ts
2736
+ var import_url_join6 = __toESM(require("url-join"));
2737
+
3086
2738
  // src/api/resources/datacenters/client/Client.ts
3087
2739
  var import_url_join2 = __toESM(require("url-join"));
3088
2740
  var Datacenters = class {
@@ -3149,45 +2801,23 @@ var Datacenters = class {
3149
2801
  }
3150
2802
  };
3151
2803
 
3152
- // src/api/resources/envoys/client/Client.ts
2804
+ // src/api/resources/metadata/client/Client.ts
3153
2805
  var import_url_join3 = __toESM(require("url-join"));
3154
- var Envoys = class {
2806
+ var Metadata = class {
3155
2807
  constructor(_options) {
3156
2808
  this._options = _options;
3157
2809
  }
3158
2810
  /**
3159
- * @param {Rivet.EnvoysListRequest} request
3160
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2811
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3161
2812
  *
3162
2813
  * @example
3163
- * await client.envoys.list({
3164
- * namespace: "namespace"
3165
- * })
2814
+ * await client.metadata.get()
3166
2815
  */
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
- }
2816
+ async get(requestOptions) {
3187
2817
  const _response = await (this._options.fetcher ?? fetcher)({
3188
2818
  url: (0, import_url_join3.default)(
3189
2819
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3190
- "envoys"
2820
+ "metadata"
3191
2821
  ),
3192
2822
  method: "GET",
3193
2823
  headers: {
@@ -3198,14 +2828,13 @@ var Envoys = class {
3198
2828
  ...requestOptions == null ? void 0 : requestOptions.headers
3199
2829
  },
3200
2830
  contentType: "application/json",
3201
- queryParameters: _queryParams,
3202
2831
  requestType: "json",
3203
2832
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3204
2833
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3205
2834
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3206
2835
  });
3207
2836
  if (_response.ok) {
3208
- return EnvoysListResponse.parseOrThrow(_response.body, {
2837
+ return MetadataGetResponse.parseOrThrow(_response.body, {
3209
2838
  unrecognizedObjectKeys: "passthrough",
3210
2839
  allowUnrecognizedUnionMembers: true,
3211
2840
  allowUnrecognizedEnumValues: true,
@@ -3226,7 +2855,7 @@ var Envoys = class {
3226
2855
  body: _response.error.rawBody
3227
2856
  });
3228
2857
  case "timeout":
3229
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2858
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3230
2859
  case "unknown":
3231
2860
  throw new RivetError({
3232
2861
  message: _response.error.errorMessage
@@ -3238,23 +2867,35 @@ var Envoys = class {
3238
2867
  }
3239
2868
  };
3240
2869
 
3241
- // src/api/resources/health/client/Client.ts
2870
+ // src/api/resources/namespaces/client/Client.ts
3242
2871
  var import_url_join4 = __toESM(require("url-join"));
3243
- var Health = class {
2872
+ var Namespaces = class {
3244
2873
  constructor(_options) {
3245
2874
  this._options = _options;
3246
2875
  }
3247
2876
  /**
3248
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2877
+ * @param {Rivet.NamespacesListRequest} request
2878
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3249
2879
  *
3250
2880
  * @example
3251
- * await client.health.fanout()
2881
+ * await client.namespaces.list()
3252
2882
  */
3253
- async fanout(requestOptions) {
2883
+ async list(request = {}, requestOptions) {
2884
+ const { limit, cursor, name } = request;
2885
+ const _queryParams = {};
2886
+ if (limit != null) {
2887
+ _queryParams["limit"] = limit.toString();
2888
+ }
2889
+ if (cursor != null) {
2890
+ _queryParams["cursor"] = cursor;
2891
+ }
2892
+ if (name != null) {
2893
+ _queryParams["name"] = name;
2894
+ }
3254
2895
  const _response = await (this._options.fetcher ?? fetcher)({
3255
2896
  url: (0, import_url_join4.default)(
3256
2897
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3257
- "health/fanout"
2898
+ "namespaces"
3258
2899
  ),
3259
2900
  method: "GET",
3260
2901
  headers: {
@@ -3265,13 +2906,14 @@ var Health = class {
3265
2906
  ...requestOptions == null ? void 0 : requestOptions.headers
3266
2907
  },
3267
2908
  contentType: "application/json",
2909
+ queryParameters: _queryParams,
3268
2910
  requestType: "json",
3269
2911
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3270
2912
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3271
2913
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3272
2914
  });
3273
2915
  if (_response.ok) {
3274
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2916
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3275
2917
  unrecognizedObjectKeys: "passthrough",
3276
2918
  allowUnrecognizedUnionMembers: true,
3277
2919
  allowUnrecognizedEnumValues: true,
@@ -3292,37 +2934,29 @@ var Health = class {
3292
2934
  body: _response.error.rawBody
3293
2935
  });
3294
2936
  case "timeout":
3295
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2937
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3296
2938
  case "unknown":
3297
2939
  throw new RivetError({
3298
2940
  message: _response.error.errorMessage
3299
2941
  });
3300
2942
  }
3301
2943
  }
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
2944
  /**
3314
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2945
+ * @param {Rivet.NamespacesCreateRequest} request
2946
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3315
2947
  *
3316
2948
  * @example
3317
- * await client.metadata.get()
2949
+ * await client.namespaces.create({
2950
+ * name: "name"
2951
+ * })
3318
2952
  */
3319
- async get(requestOptions) {
2953
+ async create(request, requestOptions) {
3320
2954
  const _response = await (this._options.fetcher ?? fetcher)({
3321
- url: (0, import_url_join5.default)(
2955
+ url: (0, import_url_join4.default)(
3322
2956
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3323
- "metadata"
2957
+ "namespaces"
3324
2958
  ),
3325
- method: "GET",
2959
+ method: "POST",
3326
2960
  headers: {
3327
2961
  Authorization: await this._getAuthorizationHeader(),
3328
2962
  "X-Fern-Language": "JavaScript",
@@ -3332,12 +2966,13 @@ var Metadata = class {
3332
2966
  },
3333
2967
  contentType: "application/json",
3334
2968
  requestType: "json",
2969
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3335
2970
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3336
2971
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3337
2972
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3338
2973
  });
3339
2974
  if (_response.ok) {
3340
- return MetadataGetResponse.parseOrThrow(_response.body, {
2975
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3341
2976
  unrecognizedObjectKeys: "passthrough",
3342
2977
  allowUnrecognizedUnionMembers: true,
3343
2978
  allowUnrecognizedEnumValues: true,
@@ -3358,7 +2993,7 @@ var Metadata = class {
3358
2993
  body: _response.error.rawBody
3359
2994
  });
3360
2995
  case "timeout":
3361
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2996
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3362
2997
  case "unknown":
3363
2998
  throw new RivetError({
3364
2999
  message: _response.error.errorMessage
@@ -3370,47 +3005,38 @@ var Metadata = class {
3370
3005
  }
3371
3006
  };
3372
3007
 
3373
- // src/api/resources/namespaces/client/Client.ts
3374
- var import_url_join6 = __toESM(require("url-join"));
3375
- var Namespaces = class {
3008
+ // src/api/resources/pools/client/Client.ts
3009
+ var import_url_join5 = __toESM(require("url-join"));
3010
+ var Pools = class {
3376
3011
  constructor(_options) {
3377
3012
  this._options = _options;
3378
3013
  }
3379
3014
  /**
3380
- * @param {Rivet.NamespacesListRequest} request
3381
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3015
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
3016
+ *
3017
+ * @param {Rivet.PoolsListRequest} request
3018
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3382
3019
  *
3383
3020
  * @example
3384
- * await client.namespaces.list()
3021
+ * await client.pools.list({
3022
+ * namespace: "namespace"
3023
+ * })
3385
3024
  */
3386
- async list(request = {}, requestOptions) {
3387
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
3025
+ async list(request, requestOptions) {
3026
+ const { namespace, limit, cursor } = request;
3388
3027
  const _queryParams = {};
3028
+ if (namespace != null)
3029
+ _queryParams["namespace"] = namespace;
3389
3030
  if (limit != null) {
3390
3031
  _queryParams["limit"] = limit.toString();
3391
3032
  }
3392
3033
  if (cursor != null) {
3393
3034
  _queryParams["cursor"] = cursor;
3394
3035
  }
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
3036
  const _response = await (this._options.fetcher ?? fetcher)({
3411
- url: (0, import_url_join6.default)(
3037
+ url: (0, import_url_join5.default)(
3412
3038
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3413
- "namespaces"
3039
+ "pools"
3414
3040
  ),
3415
3041
  method: "GET",
3416
3042
  headers: {
@@ -3428,7 +3054,7 @@ var Namespaces = class {
3428
3054
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3429
3055
  });
3430
3056
  if (_response.ok) {
3431
- return NamespaceListResponse.parseOrThrow(_response.body, {
3057
+ return PoolsListResponse.parseOrThrow(_response.body, {
3432
3058
  unrecognizedObjectKeys: "passthrough",
3433
3059
  allowUnrecognizedUnionMembers: true,
3434
3060
  allowUnrecognizedEnumValues: true,
@@ -3449,7 +3075,7 @@ var Namespaces = class {
3449
3075
  body: _response.error.rawBody
3450
3076
  });
3451
3077
  case "timeout":
3452
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3078
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3453
3079
  case "unknown":
3454
3080
  throw new RivetError({
3455
3081
  message: _response.error.errorMessage
@@ -3457,22 +3083,34 @@ var Namespaces = class {
3457
3083
  }
3458
3084
  }
3459
3085
  /**
3460
- * @param {Rivet.NamespacesCreateRequest} request
3461
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3086
+ * Lists the live nodes of a pool in node key order.
3087
+ *
3088
+ * @param {string} pool
3089
+ * @param {Rivet.PoolsListNodesRequest} request
3090
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3462
3091
  *
3463
3092
  * @example
3464
- * await client.namespaces.create({
3465
- * displayName: "display_name",
3466
- * name: "name"
3093
+ * await client.pools.listNodes("pool", {
3094
+ * namespace: "namespace"
3467
3095
  * })
3468
3096
  */
3469
- async create(request, requestOptions) {
3097
+ async listNodes(pool, request, requestOptions) {
3098
+ const { namespace, limit, cursor } = request;
3099
+ const _queryParams = {};
3100
+ if (namespace != null)
3101
+ _queryParams["namespace"] = namespace;
3102
+ if (limit != null) {
3103
+ _queryParams["limit"] = limit.toString();
3104
+ }
3105
+ if (cursor != null) {
3106
+ _queryParams["cursor"] = cursor;
3107
+ }
3470
3108
  const _response = await (this._options.fetcher ?? fetcher)({
3471
- url: (0, import_url_join6.default)(
3109
+ url: (0, import_url_join5.default)(
3472
3110
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3473
- "namespaces"
3111
+ `pools/${encodeURIComponent(pool)}/nodes`
3474
3112
  ),
3475
- method: "POST",
3113
+ method: "GET",
3476
3114
  headers: {
3477
3115
  Authorization: await this._getAuthorizationHeader(),
3478
3116
  "X-Fern-Language": "JavaScript",
@@ -3481,14 +3119,14 @@ var Namespaces = class {
3481
3119
  ...requestOptions == null ? void 0 : requestOptions.headers
3482
3120
  },
3483
3121
  contentType: "application/json",
3122
+ queryParameters: _queryParams,
3484
3123
  requestType: "json",
3485
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3486
3124
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3487
3125
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3488
3126
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3489
3127
  });
3490
3128
  if (_response.ok) {
3491
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3129
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3492
3130
  unrecognizedObjectKeys: "passthrough",
3493
3131
  allowUnrecognizedUnionMembers: true,
3494
3132
  allowUnrecognizedEnumValues: true,
@@ -3509,65 +3147,21 @@ var Namespaces = class {
3509
3147
  body: _response.error.rawBody
3510
3148
  });
3511
3149
  case "timeout":
3512
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3150
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3513
3151
  case "unknown":
3514
3152
  throw new RivetError({
3515
3153
  message: _response.error.errorMessage
3516
3154
  });
3517
3155
  }
3518
3156
  }
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;
3157
+ async get(name, request = {}, requestOptions) {
3541
3158
  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
- }
3159
+ if (request.namespace != null)
3160
+ _queryParams["namespace"] = request.namespace;
3567
3161
  const _response = await (this._options.fetcher ?? fetcher)({
3568
- url: (0, import_url_join7.default)(
3162
+ url: (0, import_url_join5.default)(
3569
3163
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3570
- "runners"
3164
+ `pools/${encodeURIComponent(name)}`
3571
3165
  ),
3572
3166
  method: "GET",
3573
3167
  headers: {
@@ -3585,7 +3179,7 @@ var Runners = class {
3585
3179
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3586
3180
  });
3587
3181
  if (_response.ok) {
3588
- return RunnersListResponse.parseOrThrow(_response.body, {
3182
+ return PoolResponse.parseOrThrow(_response.body, {
3589
3183
  unrecognizedObjectKeys: "passthrough",
3590
3184
  allowUnrecognizedUnionMembers: true,
3591
3185
  allowUnrecognizedEnumValues: true,
@@ -3606,43 +3200,23 @@ var Runners = class {
3606
3200
  body: _response.error.rawBody
3607
3201
  });
3608
3202
  case "timeout":
3609
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3203
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3610
3204
  case "unknown":
3611
3205
  throw new RivetError({
3612
3206
  message: _response.error.errorMessage
3613
3207
  });
3614
3208
  }
3615
3209
  }
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;
3210
+ async upsert(name, request, requestOptions) {
3632
3211
  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
- }
3212
+ if (request.namespace != null)
3213
+ _queryParams["namespace"] = request.namespace;
3640
3214
  const _response = await (this._options.fetcher ?? fetcher)({
3641
- url: (0, import_url_join7.default)(
3215
+ url: (0, import_url_join5.default)(
3642
3216
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3643
- "runners/names"
3217
+ `pools/${encodeURIComponent(name)}`
3644
3218
  ),
3645
- method: "GET",
3219
+ method: "PUT",
3646
3220
  headers: {
3647
3221
  Authorization: await this._getAuthorizationHeader(),
3648
3222
  "X-Fern-Language": "JavaScript",
@@ -3653,12 +3227,19 @@ var Runners = class {
3653
3227
  contentType: "application/json",
3654
3228
  queryParameters: _queryParams,
3655
3229
  requestType: "json",
3230
+ body: {
3231
+ drain_on_version_upgrade: request.drainOnVersionUpgrade,
3232
+ actor_eviction_delay: request.actorEvictionDelay,
3233
+ actor_eviction_period: request.actorEvictionPeriod,
3234
+ actor_eviction_rate: request.actorEvictionRate,
3235
+ metadata: request.metadata
3236
+ },
3656
3237
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3657
3238
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3658
3239
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3659
3240
  });
3660
3241
  if (_response.ok) {
3661
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3242
+ return PoolResponse.parseOrThrow(_response.body, {
3662
3243
  unrecognizedObjectKeys: "passthrough",
3663
3244
  allowUnrecognizedUnionMembers: true,
3664
3245
  allowUnrecognizedEnumValues: true,
@@ -3679,7 +3260,54 @@ var Runners = class {
3679
3260
  body: _response.error.rawBody
3680
3261
  });
3681
3262
  case "timeout":
3682
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3263
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3264
+ case "unknown":
3265
+ throw new RivetError({
3266
+ message: _response.error.errorMessage
3267
+ });
3268
+ }
3269
+ }
3270
+ async delete(name, request = {}, requestOptions) {
3271
+ const _queryParams = {};
3272
+ if (request.namespace != null)
3273
+ _queryParams["namespace"] = request.namespace;
3274
+ const _response = await (this._options.fetcher ?? fetcher)({
3275
+ url: (0, import_url_join5.default)(
3276
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3277
+ `pools/${encodeURIComponent(name)}`
3278
+ ),
3279
+ method: "DELETE",
3280
+ headers: {
3281
+ Authorization: await this._getAuthorizationHeader(),
3282
+ "X-Fern-Language": "JavaScript",
3283
+ "X-Fern-Runtime": RUNTIME.type,
3284
+ "X-Fern-Runtime-Version": RUNTIME.version,
3285
+ ...requestOptions == null ? void 0 : requestOptions.headers
3286
+ },
3287
+ contentType: "application/json",
3288
+ queryParameters: _queryParams,
3289
+ requestType: "json",
3290
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3291
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3292
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3293
+ });
3294
+ if (_response.ok) {
3295
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3296
+ }
3297
+ if (_response.error.reason === "status-code") {
3298
+ throw new RivetError({
3299
+ statusCode: _response.error.statusCode,
3300
+ body: _response.error.body
3301
+ });
3302
+ }
3303
+ switch (_response.error.reason) {
3304
+ case "non-json":
3305
+ throw new RivetError({
3306
+ statusCode: _response.error.statusCode,
3307
+ body: _response.error.rawBody
3308
+ });
3309
+ case "timeout":
3310
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3683
3311
  case "unknown":
3684
3312
  throw new RivetError({
3685
3313
  message: _response.error.errorMessage
@@ -3698,31 +3326,23 @@ var RivetClient = class {
3698
3326
  }
3699
3327
  _authTokens;
3700
3328
  _datacenters;
3701
- _envoys;
3702
- _health;
3703
3329
  _metadata;
3704
3330
  _namespaces;
3705
- _runners;
3331
+ _pools;
3706
3332
  get authTokens() {
3707
3333
  return this._authTokens ?? (this._authTokens = new AuthTokens(this._options));
3708
3334
  }
3709
3335
  get datacenters() {
3710
3336
  return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3711
3337
  }
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
3338
  get metadata() {
3719
3339
  return this._metadata ?? (this._metadata = new Metadata(this._options));
3720
3340
  }
3721
3341
  get namespaces() {
3722
3342
  return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3723
3343
  }
3724
- get runners() {
3725
- return this._runners ?? (this._runners = new Runners(this._options));
3344
+ get pools() {
3345
+ return this._pools ?? (this._pools = new Pools(this._options));
3726
3346
  }
3727
3347
  /**
3728
3348
  * **If key is some & `include_destroyed` is false**
@@ -3759,7 +3379,8 @@ var RivetClient = class {
3759
3379
  async actorsList(request, requestOptions) {
3760
3380
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3761
3381
  const _queryParams = {};
3762
- _queryParams["namespace"] = namespace;
3382
+ if (namespace != null)
3383
+ _queryParams["namespace"] = namespace;
3763
3384
  if (name != null) {
3764
3385
  _queryParams["name"] = name;
3765
3386
  }
@@ -3769,15 +3390,8 @@ var RivetClient = class {
3769
3390
  if (actorIds != null) {
3770
3391
  _queryParams["actor_ids"] = actorIds;
3771
3392
  }
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
- }
3393
+ if (actorId != null)
3394
+ _queryParams["actor_id"] = actorId;
3781
3395
  if (includeDestroyed != null) {
3782
3396
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3783
3397
  }
@@ -3788,7 +3402,7 @@ var RivetClient = class {
3788
3402
  _queryParams["cursor"] = cursor;
3789
3403
  }
3790
3404
  const _response = await (this._options.fetcher ?? fetcher)({
3791
- url: (0, import_url_join8.default)(
3405
+ url: (0, import_url_join6.default)(
3792
3406
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3793
3407
  "actors"
3794
3408
  ),
@@ -3860,17 +3474,17 @@ var RivetClient = class {
3860
3474
  * @example
3861
3475
  * await client.actorsCreate({
3862
3476
  * namespace: "namespace",
3863
- * crashPolicy: "restart",
3864
3477
  * name: "name",
3865
- * runnerNameSelector: "runner_name_selector"
3478
+ * pool: "pool"
3866
3479
  * })
3867
3480
  */
3868
3481
  async actorsCreate(request, requestOptions) {
3869
3482
  const { namespace, ..._body } = request;
3870
3483
  const _queryParams = {};
3871
- _queryParams["namespace"] = namespace;
3484
+ if (namespace != null)
3485
+ _queryParams["namespace"] = namespace;
3872
3486
  const _response = await (this._options.fetcher ?? fetcher)({
3873
- url: (0, import_url_join8.default)(
3487
+ url: (0, import_url_join6.default)(
3874
3488
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3875
3489
  "actors"
3876
3490
  ),
@@ -3952,18 +3566,18 @@ var RivetClient = class {
3952
3566
  * @example
3953
3567
  * await client.actorsGetOrCreate({
3954
3568
  * namespace: "namespace",
3955
- * crashPolicy: "restart",
3956
3569
  * key: "key",
3957
3570
  * name: "name",
3958
- * runnerNameSelector: "runner_name_selector"
3571
+ * pool: "pool"
3959
3572
  * })
3960
3573
  */
3961
3574
  async actorsGetOrCreate(request, requestOptions) {
3962
3575
  const { namespace, ..._body } = request;
3963
3576
  const _queryParams = {};
3964
- _queryParams["namespace"] = namespace;
3577
+ if (namespace != null)
3578
+ _queryParams["namespace"] = namespace;
3965
3579
  const _response = await (this._options.fetcher ?? fetcher)({
3966
- url: (0, import_url_join8.default)(
3580
+ url: (0, import_url_join6.default)(
3967
3581
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3968
3582
  "actors"
3969
3583
  ),
@@ -4029,7 +3643,8 @@ var RivetClient = class {
4029
3643
  async actorsListNames(request, requestOptions) {
4030
3644
  const { namespace, limit, cursor } = request;
4031
3645
  const _queryParams = {};
4032
- _queryParams["namespace"] = namespace;
3646
+ if (namespace != null)
3647
+ _queryParams["namespace"] = namespace;
4033
3648
  if (limit != null) {
4034
3649
  _queryParams["limit"] = limit.toString();
4035
3650
  }
@@ -4037,7 +3652,7 @@ var RivetClient = class {
4037
3652
  _queryParams["cursor"] = cursor;
4038
3653
  }
4039
3654
  const _response = await (this._options.fetcher ?? fetcher)({
4040
- url: (0, import_url_join8.default)(
3655
+ url: (0, import_url_join6.default)(
4041
3656
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4042
3657
  "actors/names"
4043
3658
  ),
@@ -4100,16 +3715,18 @@ var RivetClient = class {
4100
3715
  * namespace: "namespace"
4101
3716
  * })
4102
3717
  */
4103
- async actorsDelete(actorId, request, requestOptions) {
3718
+ /** Returns one actor by ID. */
3719
+ async actorsGet(actorId, request, requestOptions) {
4104
3720
  const { namespace } = request;
4105
3721
  const _queryParams = {};
4106
- _queryParams["namespace"] = namespace;
3722
+ if (namespace != null)
3723
+ _queryParams["namespace"] = namespace;
4107
3724
  const _response = await (this._options.fetcher ?? fetcher)({
4108
- url: (0, import_url_join8.default)(
3725
+ url: (0, import_url_join6.default)(
4109
3726
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4110
3727
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4111
3728
  ),
4112
- method: "DELETE",
3729
+ method: "GET",
4113
3730
  headers: {
4114
3731
  Authorization: await this._getAuthorizationHeader(),
4115
3732
  "X-Fern-Language": "JavaScript",
@@ -4125,7 +3742,7 @@ var RivetClient = class {
4125
3742
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4126
3743
  });
4127
3744
  if (_response.ok) {
4128
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3745
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4129
3746
  unrecognizedObjectKeys: "passthrough",
4130
3747
  allowUnrecognizedUnionMembers: true,
4131
3748
  allowUnrecognizedEnumValues: true,
@@ -4146,34 +3763,24 @@ var RivetClient = class {
4146
3763
  body: _response.error.rawBody
4147
3764
  });
4148
3765
  case "timeout":
4149
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3766
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4150
3767
  case "unknown":
4151
3768
  throw new RivetError({
4152
3769
  message: _response.error.errorMessage
4153
3770
  });
4154
3771
  }
4155
3772
  }
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) {
3773
+ async actorsDelete(actorId, request, requestOptions) {
4168
3774
  const { namespace } = request;
4169
3775
  const _queryParams = {};
4170
- _queryParams["namespace"] = namespace;
3776
+ if (namespace != null)
3777
+ _queryParams["namespace"] = namespace;
4171
3778
  const _response = await (this._options.fetcher ?? fetcher)({
4172
- url: (0, import_url_join8.default)(
3779
+ url: (0, import_url_join6.default)(
4173
3780
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4174
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3781
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4175
3782
  ),
4176
- method: "GET",
3783
+ method: "DELETE",
4177
3784
  headers: {
4178
3785
  Authorization: await this._getAuthorizationHeader(),
4179
3786
  "X-Fern-Language": "JavaScript",
@@ -4189,7 +3796,7 @@ var RivetClient = class {
4189
3796
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4190
3797
  });
4191
3798
  if (_response.ok) {
4192
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3799
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4193
3800
  unrecognizedObjectKeys: "passthrough",
4194
3801
  allowUnrecognizedUnionMembers: true,
4195
3802
  allowUnrecognizedEnumValues: true,
@@ -4210,9 +3817,7 @@ var RivetClient = class {
4210
3817
  body: _response.error.rawBody
4211
3818
  });
4212
3819
  case "timeout":
4213
- throw new RivetTimeoutError(
4214
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4215
- );
3820
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4216
3821
  case "unknown":
4217
3822
  throw new RivetError({
4218
3823
  message: _response.error.errorMessage
@@ -4227,17 +3832,15 @@ var RivetClient = class {
4227
3832
  * @example
4228
3833
  * await client.actorsReschedule("actor_id", {
4229
3834
  * namespace: "namespace",
4230
- * body: {
4231
- * "key": "value"
4232
- * }
4233
3835
  * })
4234
3836
  */
4235
3837
  async actorsReschedule(actorId, request, requestOptions) {
4236
- const { namespace, body: _body } = request;
3838
+ const { namespace } = request;
4237
3839
  const _queryParams = {};
4238
- _queryParams["namespace"] = namespace;
3840
+ if (namespace != null)
3841
+ _queryParams["namespace"] = namespace;
4239
3842
  const _response = await (this._options.fetcher ?? fetcher)({
4240
- url: (0, import_url_join8.default)(
3843
+ url: (0, import_url_join6.default)(
4241
3844
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4242
3845
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4243
3846
  ),
@@ -4252,7 +3855,6 @@ var RivetClient = class {
4252
3855
  contentType: "application/json",
4253
3856
  queryParameters: _queryParams,
4254
3857
  requestType: "json",
4255
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4256
3858
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4257
3859
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4258
3860
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4294,17 +3896,15 @@ var RivetClient = class {
4294
3896
  * @example
4295
3897
  * await client.actorsSleep("actor_id", {
4296
3898
  * namespace: "namespace",
4297
- * body: {
4298
- * "key": "value"
4299
- * }
4300
3899
  * })
4301
3900
  */
4302
3901
  async actorsSleep(actorId, request, requestOptions) {
4303
- const { namespace, body: _body } = request;
3902
+ const { namespace } = request;
4304
3903
  const _queryParams = {};
4305
- _queryParams["namespace"] = namespace;
3904
+ if (namespace != null)
3905
+ _queryParams["namespace"] = namespace;
4306
3906
  const _response = await (this._options.fetcher ?? fetcher)({
4307
- url: (0, import_url_join8.default)(
3907
+ url: (0, import_url_join6.default)(
4308
3908
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4309
3909
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4310
3910
  ),
@@ -4319,7 +3919,6 @@ var RivetClient = class {
4319
3919
  contentType: "application/json",
4320
3920
  queryParameters: _queryParams,
4321
3921
  requestType: "json",
4322
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4323
3922
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4324
3923
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4325
3924
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4353,360 +3952,6 @@ var RivetClient = class {
4353
3952
  });
4354
3953
  }
4355
3954
  }
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
3955
  async _getAuthorizationHeader() {
4711
3956
  return `Bearer ${await Supplier.get(this._options.token)}`;
4712
3957
  }