@rivetkit/engine-api-full 2.3.29 → 3.0.0-preview.1

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