@rivetkit/engine-api-full 0.0.0-active-actors-fix-active-count.253e406 → 0.0.0-bisect-sync-sqlite-1.910d1c7

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 +551 -850
  2. package/dist/browser/cjs/package.json +3 -0
  3. package/dist/browser/cjs/serialization.js +155 -287
  4. package/dist/browser/esm/index.js +551 -850
  5. package/dist/browser/esm/package.json +3 -0
  6. package/dist/browser/esm/serialization.js +155 -287
  7. package/dist/node/cjs/index.js +551 -850
  8. package/dist/node/cjs/package.json +3 -0
  9. package/dist/node/cjs/serialization.js +175 -322
  10. package/dist/node/esm/index.js +551 -850
  11. package/dist/node/esm/package.json +3 -0
  12. package/dist/node/esm/serialization.js +155 -287
  13. package/package.json +7 -2
  14. package/types/Client.d.ts +16 -83
  15. package/types/api/client/requests/ActorsCreateRequest.d.ts +3 -7
  16. package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
  17. package/types/api/client/requests/ActorsForkRequest.d.ts +14 -0
  18. package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +4 -8
  19. package/types/api/client/requests/ActorsGetRequest.d.ts +3 -0
  20. package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
  21. package/types/api/client/requests/ActorsListRequest.d.ts +2 -5
  22. package/types/api/client/requests/ActorsRescheduleRequest.d.ts +1 -5
  23. package/types/api/client/requests/ActorsSleepRequest.d.ts +1 -5
  24. package/types/api/client/requests/index.d.ts +2 -6
  25. package/types/api/resources/{health → authTokens}/client/Client.d.ts +6 -11
  26. package/types/api/resources/authTokens/client/index.d.ts +2 -0
  27. package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +25 -0
  28. package/types/api/resources/authTokens/client/requests/index.d.ts +1 -0
  29. package/types/api/resources/index.d.ts +4 -5
  30. package/types/api/resources/namespaces/client/Client.d.ts +12 -1
  31. package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -2
  32. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +0 -6
  33. package/types/api/resources/pools/client/Client.d.ts +57 -0
  34. package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +3 -0
  35. package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +3 -0
  36. package/types/api/resources/{runners/client/requests/RunnersListNamesRequest.d.ts → pools/client/requests/PoolsListNodesRequest.d.ts} +2 -2
  37. package/types/api/resources/{envoys/client/requests/EnvoysListRequest.d.ts → pools/client/requests/PoolsListRequest.d.ts} +2 -4
  38. package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +8 -0
  39. package/types/api/resources/pools/client/requests/index.d.ts +5 -0
  40. package/types/api/types/Actor.d.ts +23 -27
  41. package/types/api/types/ActorName.d.ts +1 -3
  42. package/types/api/types/ActorsCreateResponse.d.ts +2 -3
  43. package/types/api/types/ActorsDeleteResponse.d.ts +1 -4
  44. package/types/api/types/ActorsForkResponse.d.ts +4 -0
  45. package/types/api/types/ActorsGetOrCreateResponse.d.ts +1 -3
  46. package/types/api/types/ActorsGetResponse.d.ts +4 -0
  47. package/types/api/types/ActorsListNamesResponse.d.ts +1 -4
  48. package/types/api/types/ActorsListResponse.d.ts +1 -4
  49. package/types/api/types/ActorsRescheduleResponse.d.ts +1 -4
  50. package/types/api/types/ActorsSleepResponse.d.ts +1 -4
  51. package/types/api/types/AuthOperationKind.d.ts +1 -0
  52. package/types/api/types/AuthResourceKind.d.ts +1 -0
  53. package/types/api/types/AuthTargetScope.d.ts +4 -0
  54. package/types/api/types/AuthTokenCreateResponse.d.ts +8 -0
  55. package/types/api/types/AuthTokenGrant.d.ts +7 -0
  56. package/types/api/types/AuthTokenInspectResponse.d.ts +13 -0
  57. package/types/api/types/Datacenter.d.ts +1 -5
  58. package/types/api/types/DatacentersListResponse.d.ts +1 -5
  59. package/types/api/types/ErrorResponse.d.ts +10 -0
  60. package/types/api/types/MetadataGetResponse.d.ts +8 -10
  61. package/types/api/types/Namespace.d.ts +13 -6
  62. package/types/api/types/NamespaceForkedFrom.d.ts +14 -0
  63. package/types/api/types/NamespaceListResponse.d.ts +1 -4
  64. package/types/api/types/NamespaceSkippedActor.d.ts +14 -0
  65. package/types/api/types/NamespaceStatus.d.ts +18 -0
  66. package/types/api/types/{HealthFanoutResponse.d.ts → NamespacesArchiveResponse.d.ts} +2 -2
  67. package/types/api/types/NamespacesCreateResponse.d.ts +0 -3
  68. package/types/api/types/Node.d.ts +20 -0
  69. package/types/api/types/Pagination.d.ts +2 -4
  70. package/types/api/types/Pool.d.ts +14 -0
  71. package/types/api/types/PoolResponse.d.ts +4 -0
  72. package/types/api/types/PoolsDeleteResponse.d.ts +1 -0
  73. package/types/api/types/PoolsListNodesResponse.d.ts +5 -0
  74. package/types/api/types/PoolsListResponse.d.ts +5 -0
  75. package/types/api/types/RivetId.d.ts +0 -3
  76. package/types/api/types/index.d.ts +19 -33
  77. package/types/serialization/client/requests/ActorsCreateRequest.d.ts +1 -4
  78. package/types/serialization/client/requests/ActorsForkRequest.d.ts +10 -0
  79. package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +2 -5
  80. package/types/serialization/client/requests/index.d.ts +1 -2
  81. package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -1
  82. package/types/serialization/types/Actor.d.ts +11 -17
  83. package/types/serialization/types/ActorName.d.ts +0 -3
  84. package/types/serialization/types/ActorsCreateResponse.d.ts +1 -3
  85. package/types/serialization/types/ActorsDeleteResponse.d.ts +1 -4
  86. package/types/serialization/types/ActorsForkResponse.d.ts +10 -0
  87. package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +0 -3
  88. package/types/serialization/types/ActorsGetResponse.d.ts +10 -0
  89. package/types/serialization/types/ActorsListNamesResponse.d.ts +0 -5
  90. package/types/serialization/types/ActorsListResponse.d.ts +1 -4
  91. package/types/serialization/types/ActorsRescheduleResponse.d.ts +1 -4
  92. package/types/serialization/types/ActorsSleepResponse.d.ts +1 -4
  93. package/types/serialization/types/AuthOperationKind.d.ts +7 -0
  94. package/types/serialization/types/AuthResourceKind.d.ts +7 -0
  95. package/types/serialization/types/AuthTargetScope.d.ts +10 -0
  96. package/types/serialization/types/AuthTokenCreateResponse.d.ts +11 -0
  97. package/types/serialization/types/AuthTokenGrant.d.ts +14 -0
  98. package/types/serialization/types/AuthTokenInspectResponse.d.ts +14 -0
  99. package/types/serialization/types/Datacenter.d.ts +0 -5
  100. package/types/serialization/types/DatacentersListResponse.d.ts +1 -6
  101. package/types/serialization/types/ErrorResponse.d.ts +12 -0
  102. package/types/serialization/types/MetadataGetResponse.d.ts +4 -10
  103. package/types/serialization/types/Namespace.d.ts +9 -7
  104. package/types/serialization/types/NamespaceForkedFrom.d.ts +14 -0
  105. package/types/serialization/types/NamespaceListResponse.d.ts +1 -4
  106. package/types/serialization/types/NamespaceSkippedActor.d.ts +14 -0
  107. package/types/serialization/types/NamespaceStatus.d.ts +10 -0
  108. package/types/serialization/types/NamespacesArchiveResponse.d.ts +13 -0
  109. package/types/serialization/types/NamespacesCreateResponse.d.ts +0 -3
  110. package/types/serialization/types/Node.d.ts +17 -0
  111. package/types/serialization/types/Pagination.d.ts +1 -4
  112. package/types/serialization/types/Pool.d.ts +14 -0
  113. package/types/serialization/types/PoolResponse.d.ts +10 -0
  114. package/types/serialization/types/PoolsDeleteResponse.d.ts +7 -0
  115. package/types/serialization/types/PoolsListNodesResponse.d.ts +12 -0
  116. package/types/serialization/types/PoolsListResponse.d.ts +12 -0
  117. package/types/serialization/types/RivetId.d.ts +0 -3
  118. package/types/serialization/types/index.d.ts +19 -33
  119. package/types/api/client/requests/ActorsKvGetRequest.d.ts +0 -12
  120. package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +0 -12
  121. package/types/api/client/requests/RunnerConfigsListRequest.d.ts +0 -21
  122. package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +0 -17
  123. package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -15
  124. package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -17
  125. package/types/api/resources/envoys/client/Client.d.ts +0 -39
  126. package/types/api/resources/envoys/client/requests/index.d.ts +0 -1
  127. package/types/api/resources/health/client/index.d.ts +0 -1
  128. package/types/api/resources/runners/client/Client.d.ts +0 -54
  129. package/types/api/resources/runners/client/index.d.ts +0 -1
  130. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +0 -22
  131. package/types/api/resources/runners/client/requests/index.d.ts +0 -2
  132. package/types/api/resources/runners/index.d.ts +0 -1
  133. package/types/api/types/ActorsKvGetResponse.d.ts +0 -7
  134. package/types/api/types/ActorsRescheduleRequestBody.d.ts +0 -4
  135. package/types/api/types/ActorsSleepRequestBody.d.ts +0 -4
  136. package/types/api/types/CrashPolicy.d.ts +0 -9
  137. package/types/api/types/DatacenterHealth.d.ts +0 -12
  138. package/types/api/types/Envoy.d.ts +0 -18
  139. package/types/api/types/EnvoysListResponse.d.ts +0 -8
  140. package/types/api/types/HealthResponse.d.ts +0 -8
  141. package/types/api/types/HealthStatus.d.ts +0 -8
  142. package/types/api/types/Runner.d.ts +0 -21
  143. package/types/api/types/RunnerConfig.d.ts +0 -10
  144. package/types/api/types/RunnerConfigKind.d.ts +0 -5
  145. package/types/api/types/RunnerConfigKindNormal.d.ts +0 -6
  146. package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
  147. package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -22
  148. package/types/api/types/RunnerConfigResponse.d.ts +0 -8
  149. package/types/api/types/RunnerConfigServerless.d.ts +0 -22
  150. package/types/api/types/RunnerConfigVariant.d.ts +0 -8
  151. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +0 -4
  152. package/types/api/types/RunnerConfigsListResponse.d.ts +0 -8
  153. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -7
  154. package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -4
  155. package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -4
  156. package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -5
  157. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -7
  158. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -7
  159. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -7
  160. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -6
  161. package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +0 -16
  162. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +0 -6
  163. package/types/api/types/RunnersListNamesResponse.d.ts +0 -8
  164. package/types/api/types/RunnersListResponse.d.ts +0 -8
  165. package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -13
  166. package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -13
  167. package/types/serialization/types/ActorsKvGetResponse.d.ts +0 -13
  168. package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +0 -10
  169. package/types/serialization/types/ActorsSleepRequestBody.d.ts +0 -10
  170. package/types/serialization/types/CrashPolicy.d.ts +0 -10
  171. package/types/serialization/types/DatacenterHealth.d.ts +0 -19
  172. package/types/serialization/types/Envoy.d.ts +0 -24
  173. package/types/serialization/types/EnvoysListResponse.d.ts +0 -15
  174. package/types/serialization/types/HealthFanoutResponse.d.ts +0 -13
  175. package/types/serialization/types/HealthResponse.d.ts +0 -14
  176. package/types/serialization/types/HealthStatus.d.ts +0 -10
  177. package/types/serialization/types/Runner.d.ts +0 -27
  178. package/types/serialization/types/RunnerConfig.d.ts +0 -16
  179. package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
  180. package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -12
  181. package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
  182. package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -21
  183. package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
  184. package/types/serialization/types/RunnerConfigServerless.d.ts +0 -21
  185. package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
  186. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
  187. package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
  188. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
  189. package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
  190. package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
  191. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
  192. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
  193. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
  194. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
  195. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
  196. package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
  197. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
  198. package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
  199. package/types/serialization/types/RunnersListResponse.d.ts +0 -15
  200. /package/types/api/resources/{envoys → authTokens}/index.d.ts +0 -0
  201. /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
  202. /package/types/api/resources/{health → pools}/index.d.ts +0 -0
@@ -584,53 +584,29 @@ module.exports = __toCommonJS(src_exports);
584
584
  // src/api/index.ts
585
585
  var api_exports = {};
586
586
  __export(api_exports, {
587
- CrashPolicy: () => CrashPolicy,
588
- HealthStatus: () => HealthStatus,
589
- RunnerConfigVariant: () => RunnerConfigVariant,
587
+ NamespaceStatus: () => NamespaceStatus,
588
+ authTokens: () => authTokens_exports,
590
589
  datacenters: () => datacenters_exports,
591
- envoys: () => envoys_exports,
592
- health: () => health_exports,
593
590
  metadata: () => metadata_exports,
594
- namespaces: () => namespaces_exports,
595
- runners: () => runners_exports
591
+ namespaces: () => namespaces_exports2,
592
+ pools: () => pools_exports
596
593
  });
597
594
 
598
- // src/api/types/CrashPolicy.ts
599
- var CrashPolicy = {
600
- Restart: "restart",
601
- Sleep: "sleep",
602
- Destroy: "destroy"
595
+ // src/api/types/NamespaceStatus.ts
596
+ var NamespaceStatus = {
597
+ Creating: "creating",
598
+ Forking: "forking",
599
+ Live: "live",
600
+ Archiving: "archiving",
601
+ Archived: "archived",
602
+ Failed: "failed"
603
603
  };
604
604
 
605
- // src/api/types/HealthStatus.ts
606
- var HealthStatus = {
607
- Ok: "ok",
608
- Error: "error"
609
- };
610
-
611
- // src/api/types/RunnerConfigVariant.ts
612
- var RunnerConfigVariant = {
613
- Serverless: "serverless",
614
- Normal: "normal"
615
- };
616
-
617
- // src/api/resources/datacenters/index.ts
618
- var datacenters_exports = {};
619
-
620
- // src/api/resources/envoys/index.ts
621
- var envoys_exports = {};
622
-
623
- // src/api/resources/health/index.ts
624
- var health_exports = {};
625
-
626
- // src/api/resources/metadata/index.ts
627
- var metadata_exports = {};
628
-
629
- // src/api/resources/namespaces/index.ts
630
- var namespaces_exports = {};
631
-
632
- // src/api/resources/runners/index.ts
633
- var runners_exports = {};
605
+ // src/api/resources/authTokens/index.ts
606
+ var authTokens_exports = {};
607
+ __export(authTokens_exports, {
608
+ AuthTokens: () => AuthTokens
609
+ });
634
610
 
635
611
  // src/core/json.ts
636
612
  var toJson = (value, replacer, space) => {
@@ -2345,6 +2321,9 @@ function transformAndValidateUnion({
2345
2321
  };
2346
2322
  }
2347
2323
 
2324
+ // src/api/resources/authTokens/client/Client.ts
2325
+ var import_url_join = __toESM(require("url-join"));
2326
+
2348
2327
  // src/serialization/index.ts
2349
2328
  var serialization_exports = {};
2350
2329
  __export(serialization_exports, {
@@ -2353,82 +2332,62 @@ __export(serialization_exports, {
2353
2332
  ActorsCreateRequest: () => ActorsCreateRequest,
2354
2333
  ActorsCreateResponse: () => ActorsCreateResponse,
2355
2334
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2335
+ ActorsForkRequest: () => ActorsForkRequest,
2336
+ ActorsForkResponse: () => ActorsForkResponse,
2356
2337
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2357
2338
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2358
- ActorsKvGetResponse: () => ActorsKvGetResponse,
2339
+ ActorsGetResponse: () => ActorsGetResponse,
2359
2340
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2360
2341
  ActorsListResponse: () => ActorsListResponse,
2361
- ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2362
2342
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2363
- ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2364
2343
  ActorsSleepResponse: () => ActorsSleepResponse,
2365
- CrashPolicy: () => CrashPolicy2,
2344
+ AuthOperationKind: () => AuthOperationKind,
2345
+ AuthResourceKind: () => AuthResourceKind,
2346
+ AuthTargetScope: () => AuthTargetScope,
2347
+ AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2348
+ AuthTokenGrant: () => AuthTokenGrant,
2349
+ AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2366
2350
  Datacenter: () => Datacenter,
2367
- DatacenterHealth: () => DatacenterHealth,
2368
2351
  DatacentersListResponse: () => DatacentersListResponse,
2369
- Envoy: () => Envoy,
2370
- EnvoysListResponse: () => EnvoysListResponse,
2371
- HealthFanoutResponse: () => HealthFanoutResponse,
2372
- HealthResponse: () => HealthResponse,
2373
- HealthStatus: () => HealthStatus2,
2352
+ ErrorResponse: () => ErrorResponse,
2374
2353
  MetadataGetResponse: () => MetadataGetResponse,
2375
2354
  Namespace: () => Namespace,
2355
+ NamespaceForkedFrom: () => NamespaceForkedFrom,
2376
2356
  NamespaceListResponse: () => NamespaceListResponse,
2357
+ NamespaceSkippedActor: () => NamespaceSkippedActor,
2358
+ NamespaceStatus: () => NamespaceStatus2,
2359
+ NamespacesArchiveResponse: () => NamespacesArchiveResponse,
2377
2360
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2378
2361
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2362
+ Node: () => Node,
2379
2363
  Pagination: () => Pagination,
2364
+ Pool: () => Pool,
2365
+ PoolResponse: () => PoolResponse,
2366
+ PoolsDeleteResponse: () => PoolsDeleteResponse,
2367
+ PoolsListNodesResponse: () => PoolsListNodesResponse,
2368
+ PoolsListResponse: () => PoolsListResponse,
2380
2369
  RivetId: () => RivetId,
2381
- Runner: () => Runner,
2382
- RunnerConfig: () => RunnerConfig,
2383
- RunnerConfigKind: () => RunnerConfigKind,
2384
- RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2385
- RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2386
- RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2387
- RunnerConfigResponse: () => RunnerConfigResponse,
2388
- RunnerConfigServerless: () => RunnerConfigServerless,
2389
- RunnerConfigVariant: () => RunnerConfigVariant2,
2390
- RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2391
- RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2392
- RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2393
- RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2394
- RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2395
- RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2396
- RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2397
- RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2398
- RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2399
- RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2400
- RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2401
- RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2402
- RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2403
- RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2404
- RunnersListNamesResponse: () => RunnersListNamesResponse,
2405
- RunnersListResponse: () => RunnersListResponse,
2406
- namespaces: () => namespaces_exports2
2370
+ namespaces: () => namespaces_exports
2407
2371
  });
2408
2372
 
2409
2373
  // src/serialization/types/RivetId.ts
2410
2374
  var RivetId = schemas_exports.string();
2411
2375
 
2412
- // src/serialization/types/CrashPolicy.ts
2413
- var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2414
-
2415
2376
  // src/serialization/types/Actor.ts
2416
2377
  var Actor = schemas_exports.object({
2417
2378
  actorId: schemas_exports.property("actor_id", RivetId),
2418
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2419
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2420
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2421
- datacenter: schemas_exports.string(),
2422
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2423
- error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2424
- key: schemas_exports.string().optional(),
2425
2379
  name: schemas_exports.string(),
2426
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2427
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2428
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2429
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2430
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2431
- startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
2380
+ key: schemas_exports.string(),
2381
+ namespace: schemas_exports.string(),
2382
+ pool: schemas_exports.string(),
2383
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2384
+ startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
2385
+ pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
2386
+ connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
2387
+ sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
2388
+ rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
2389
+ destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable()),
2390
+ forkedFrom: schemas_exports.property("forked_from", RivetId.nullable().optional())
2432
2391
  });
2433
2392
 
2434
2393
  // src/serialization/types/ActorName.ts
@@ -2438,11 +2397,17 @@ var ActorName = schemas_exports.object({
2438
2397
 
2439
2398
  // src/serialization/types/ActorsCreateResponse.ts
2440
2399
  var ActorsCreateResponse = schemas_exports.object({
2441
- actor: Actor
2400
+ actor: Actor,
2401
+ created: schemas_exports.boolean()
2442
2402
  });
2443
2403
 
2444
2404
  // src/serialization/types/ActorsDeleteResponse.ts
2445
- var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2405
+ var ActorsDeleteResponse = schemas_exports.object({});
2406
+
2407
+ // src/serialization/types/ActorsForkResponse.ts
2408
+ var ActorsForkResponse = schemas_exports.object({
2409
+ actor: Actor
2410
+ });
2446
2411
 
2447
2412
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2448
2413
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2450,21 +2415,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2450
2415
  created: schemas_exports.boolean()
2451
2416
  });
2452
2417
 
2453
- // src/serialization/types/ActorsKvGetResponse.ts
2454
- var ActorsKvGetResponse = schemas_exports.object({
2455
- updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2456
- value: schemas_exports.string()
2457
- });
2458
-
2459
- // src/serialization/types/Pagination.ts
2460
- var Pagination = schemas_exports.object({
2461
- cursor: schemas_exports.string().optional()
2418
+ // src/serialization/types/ActorsGetResponse.ts
2419
+ var ActorsGetResponse = schemas_exports.object({
2420
+ actor: Actor
2462
2421
  });
2463
2422
 
2464
2423
  // src/serialization/types/ActorsListNamesResponse.ts
2465
2424
  var ActorsListNamesResponse = schemas_exports.object({
2466
- names: schemas_exports.record(schemas_exports.string(), ActorName),
2467
- pagination: Pagination
2425
+ names: schemas_exports.record(schemas_exports.string(), ActorName)
2426
+ });
2427
+
2428
+ // src/serialization/types/Pagination.ts
2429
+ var Pagination = schemas_exports.object({
2430
+ cursor: schemas_exports.string().nullable()
2468
2431
  });
2469
2432
 
2470
2433
  // src/serialization/types/ActorsListResponse.ts
@@ -2473,96 +2436,98 @@ var ActorsListResponse = schemas_exports.object({
2473
2436
  pagination: Pagination
2474
2437
  });
2475
2438
 
2476
- // src/serialization/types/ActorsRescheduleRequestBody.ts
2477
- var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2478
-
2479
2439
  // src/serialization/types/ActorsRescheduleResponse.ts
2480
- var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2481
-
2482
- // src/serialization/types/ActorsSleepRequestBody.ts
2483
- var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2440
+ var ActorsRescheduleResponse = schemas_exports.object({});
2484
2441
 
2485
2442
  // src/serialization/types/ActorsSleepResponse.ts
2486
- var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2443
+ var ActorsSleepResponse = schemas_exports.object({});
2487
2444
 
2488
- // src/serialization/types/Datacenter.ts
2489
- var Datacenter = schemas_exports.object({
2490
- label: schemas_exports.number(),
2491
- name: schemas_exports.string(),
2492
- url: schemas_exports.string()
2445
+ // src/serialization/types/AuthOperationKind.ts
2446
+ var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete", "fork"]);
2447
+
2448
+ // src/serialization/types/AuthResourceKind.ts
2449
+ var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
2450
+
2451
+ // src/serialization/types/AuthTargetScope.ts
2452
+ var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
2453
+ id: RivetId
2454
+ })]);
2455
+
2456
+ // src/serialization/types/AuthTokenCreateResponse.ts
2457
+ var AuthTokenCreateResponse = schemas_exports.object({
2458
+ token: schemas_exports.string(),
2459
+ issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2460
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2493
2461
  });
2494
2462
 
2495
- // src/serialization/types/HealthResponse.ts
2496
- var HealthResponse = schemas_exports.object({
2497
- runtime: schemas_exports.string(),
2498
- status: schemas_exports.string(),
2499
- version: schemas_exports.string()
2463
+ // src/serialization/types/AuthTokenGrant.ts
2464
+ var AuthTokenGrant = schemas_exports.object({
2465
+ resource: AuthResourceKind,
2466
+ target: AuthTargetScope,
2467
+ operations: schemas_exports.list(AuthOperationKind)
2500
2468
  });
2501
2469
 
2502
- // src/serialization/types/HealthStatus.ts
2503
- var HealthStatus2 = schemas_exports.enum_(["ok", "error"]);
2470
+ // src/serialization/types/AuthTokenInspectResponse.ts
2471
+ var AuthTokenInspectResponse = schemas_exports.object({
2472
+ namespace: schemas_exports.string(),
2473
+ subject: schemas_exports.string().nullable(),
2474
+ grants: schemas_exports.list(AuthTokenGrant),
2475
+ issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2476
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2477
+ });
2504
2478
 
2505
- // src/serialization/types/DatacenterHealth.ts
2506
- var DatacenterHealth = schemas_exports.object({
2507
- datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2508
- datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2509
- error: schemas_exports.string().optional(),
2510
- response: HealthResponse.optional(),
2511
- rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2512
- status: HealthStatus2
2479
+ // src/serialization/types/Datacenter.ts
2480
+ var Datacenter = schemas_exports.object({
2481
+ name: schemas_exports.string()
2513
2482
  });
2514
2483
 
2515
2484
  // src/serialization/types/DatacentersListResponse.ts
2516
2485
  var DatacentersListResponse = schemas_exports.object({
2517
- datacenters: schemas_exports.list(Datacenter),
2518
- pagination: Pagination
2486
+ datacenters: schemas_exports.list(Datacenter)
2519
2487
  });
2520
2488
 
2521
- // src/serialization/types/Envoy.ts
2522
- var Envoy = schemas_exports.object({
2523
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2524
- datacenter: schemas_exports.string(),
2525
- envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2526
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2527
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2528
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2529
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2530
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2531
- poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2532
- slots: schemas_exports.number(),
2533
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2534
- version: schemas_exports.number()
2489
+ // src/serialization/types/ErrorResponse.ts
2490
+ var ErrorResponse = schemas_exports.object({
2491
+ group: schemas_exports.string(),
2492
+ code: schemas_exports.string(),
2493
+ message: schemas_exports.string(),
2494
+ metadata: schemas_exports.unknown().optional()
2535
2495
  });
2536
2496
 
2537
- // src/serialization/types/EnvoysListResponse.ts
2538
- var EnvoysListResponse = schemas_exports.object({
2539
- envoys: schemas_exports.list(Envoy),
2540
- pagination: Pagination
2497
+ // src/serialization/types/MetadataGetResponse.ts
2498
+ var MetadataGetResponse = schemas_exports.object({
2499
+ runtime: schemas_exports.stringLiteral("engine"),
2500
+ version: schemas_exports.string(),
2501
+ envoyProtocolVersion: schemas_exports.number(),
2502
+ actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
2541
2503
  });
2542
2504
 
2543
- // src/serialization/types/HealthFanoutResponse.ts
2544
- var HealthFanoutResponse = schemas_exports.object({
2545
- datacenters: schemas_exports.list(DatacenterHealth)
2505
+ // src/serialization/types/NamespaceStatus.ts
2506
+ var NamespaceStatus2 = schemas_exports.enum_(["creating", "forking", "live", "archiving", "archived", "failed"]);
2507
+
2508
+ // src/serialization/types/NamespaceForkedFrom.ts
2509
+ var NamespaceForkedFrom = schemas_exports.object({
2510
+ namespace: schemas_exports.string(),
2511
+ forkNumber: schemas_exports.property("fork_number", schemas_exports.number()),
2512
+ forkedTs: schemas_exports.property("forked_ts", schemas_exports.number())
2546
2513
  });
2547
2514
 
2548
- // src/serialization/types/MetadataGetResponse.ts
2549
- var MetadataGetResponse = schemas_exports.object({
2550
- buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2551
- cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2552
- cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2553
- gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2554
- runtime: schemas_exports.string(),
2555
- rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2556
- rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2557
- version: schemas_exports.string()
2515
+ // src/serialization/types/NamespaceSkippedActor.ts
2516
+ var NamespaceSkippedActor = schemas_exports.object({
2517
+ actorId: schemas_exports.property("actor_id", schemas_exports.string()),
2518
+ name: schemas_exports.string(),
2519
+ key: schemas_exports.string().nullable()
2558
2520
  });
2559
2521
 
2560
2522
  // src/serialization/types/Namespace.ts
2561
2523
  var Namespace = schemas_exports.object({
2562
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2563
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2564
2524
  name: schemas_exports.string(),
2565
- namespaceId: schemas_exports.property("namespace_id", RivetId)
2525
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2526
+ status: NamespaceStatus2,
2527
+ forkedFrom: schemas_exports.property("forked_from", NamespaceForkedFrom.nullable()),
2528
+ archivedTs: schemas_exports.property("archived_ts", schemas_exports.number().nullable()),
2529
+ skipped: schemas_exports.list(NamespaceSkippedActor).optional(),
2530
+ skippedCount: schemas_exports.property("skipped_count", schemas_exports.number().optional())
2566
2531
  });
2567
2532
 
2568
2533
  // src/serialization/types/NamespaceListResponse.ts
@@ -2576,208 +2541,87 @@ var NamespacesCreateResponse = schemas_exports.object({
2576
2541
  namespace: Namespace
2577
2542
  });
2578
2543
 
2579
- // src/serialization/types/Runner.ts
2580
- var Runner = schemas_exports.object({
2581
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2582
- datacenter: schemas_exports.string(),
2583
- drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2584
- key: schemas_exports.string(),
2585
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2586
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2587
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2588
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2589
- name: schemas_exports.string(),
2590
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2591
- remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2592
- runnerId: schemas_exports.property("runner_id", RivetId),
2593
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2594
- totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2595
- version: schemas_exports.number()
2596
- });
2597
-
2598
- // src/serialization/types/RunnerConfigServerless.ts
2599
- var RunnerConfigServerless = schemas_exports.object({
2600
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2601
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2602
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2603
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2604
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2605
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2606
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2607
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2608
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2609
- url: schemas_exports.string()
2610
- });
2611
-
2612
- // src/serialization/types/RunnerConfig.ts
2613
- var RunnerConfig = schemas_exports.object({
2614
- normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2615
- serverless: RunnerConfigServerless.optional(),
2616
- drainOnVersionUpgrade: schemas_exports.property(
2617
- "drain_on_version_upgrade",
2618
- schemas_exports.boolean().optional()
2619
- ),
2620
- metadata: schemas_exports.unknown().optional()
2621
- });
2622
-
2623
- // src/serialization/types/RunnerConfigKindNormal.ts
2624
- var RunnerConfigKindNormal = schemas_exports.object({
2625
- normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown())
2626
- });
2627
-
2628
- // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2629
- var RunnerConfigKindServerlessServerless = schemas_exports.object({
2630
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2631
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2632
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2633
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2634
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2635
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2636
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2637
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2638
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2639
- url: schemas_exports.string()
2640
- });
2641
-
2642
- // src/serialization/types/RunnerConfigKindServerless.ts
2643
- var RunnerConfigKindServerless = schemas_exports.object({
2644
- serverless: RunnerConfigKindServerlessServerless
2645
- });
2646
-
2647
- // src/serialization/types/RunnerConfigKind.ts
2648
- var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2649
-
2650
- // src/serialization/types/RunnerConfigResponse.ts
2651
- var RunnerConfigResponse = schemas_exports.object({
2652
- protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2653
- runnerPoolError: schemas_exports.property(
2654
- "runner_pool_error",
2655
- schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2656
- )
2657
- }).extend(RunnerConfig);
2658
-
2659
- // src/serialization/types/RunnerConfigVariant.ts
2660
- var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2661
-
2662
- // src/serialization/types/RunnerConfigsDeleteResponse.ts
2663
- var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2664
-
2665
- // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2666
- var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2667
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2668
- });
2669
-
2670
- // src/serialization/types/RunnerConfigsListResponse.ts
2671
- var RunnerConfigsListResponse = schemas_exports.object({
2672
- pagination: Pagination,
2673
- runnerConfigs: schemas_exports.property(
2674
- "runner_configs",
2675
- schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2676
- )
2677
- });
2678
-
2679
- // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2680
- var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2681
-
2682
- // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2683
- var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2684
-
2685
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2686
- var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2687
- version: schemas_exports.string()
2688
- });
2689
-
2690
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2691
- var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2692
- success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2544
+ // src/serialization/types/NamespacesArchiveResponse.ts
2545
+ var NamespacesArchiveResponse = schemas_exports.object({
2546
+ namespace: Namespace
2693
2547
  });
2694
2548
 
2695
- // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2696
- var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2697
- details: schemas_exports.string().optional(),
2698
- message: schemas_exports.string(),
2699
- metadata: schemas_exports.unknown().optional()
2549
+ // src/serialization/types/Node.ts
2550
+ var Node = schemas_exports.object({
2551
+ key: schemas_exports.string(),
2552
+ pool: schemas_exports.string(),
2553
+ namespace: schemas_exports.string(),
2554
+ datacenter: schemas_exports.string(),
2555
+ version: schemas_exports.number(),
2556
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2557
+ lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2558
+ connected: schemas_exports.boolean(),
2559
+ stopping: schemas_exports.boolean()
2700
2560
  });
2701
2561
 
2702
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2703
- var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2704
- error: RunnerConfigsServerlessMetadataError
2562
+ // src/serialization/types/Pool.ts
2563
+ var Pool = schemas_exports.object({
2564
+ name: schemas_exports.string(),
2565
+ drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2566
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2567
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2568
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2569
+ metadata: schemas_exports.unknown()
2705
2570
  });
2706
2571
 
2707
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2708
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2709
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2572
+ // src/serialization/types/PoolResponse.ts
2573
+ var PoolResponse = schemas_exports.object({
2574
+ pool: Pool
2710
2575
  });
2711
2576
 
2712
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2713
- var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2714
- RunnerConfigsServerlessHealthCheckResponseSuccess,
2715
- RunnerConfigsServerlessHealthCheckResponseFailure
2716
- ]);
2717
-
2718
- // src/serialization/types/RunnerConfigsUpsertResponse.ts
2719
- var RunnerConfigsUpsertResponse = schemas_exports.object({
2720
- endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2721
- });
2577
+ // src/serialization/types/PoolsDeleteResponse.ts
2578
+ var PoolsDeleteResponse = schemas_exports.object({});
2722
2579
 
2723
- // src/serialization/types/RunnersListNamesResponse.ts
2724
- var RunnersListNamesResponse = schemas_exports.object({
2725
- names: schemas_exports.list(schemas_exports.string()),
2580
+ // src/serialization/types/PoolsListNodesResponse.ts
2581
+ var PoolsListNodesResponse = schemas_exports.object({
2582
+ nodes: schemas_exports.list(Node),
2726
2583
  pagination: Pagination
2727
2584
  });
2728
2585
 
2729
- // src/serialization/types/RunnersListResponse.ts
2730
- var RunnersListResponse = schemas_exports.object({
2586
+ // src/serialization/types/PoolsListResponse.ts
2587
+ var PoolsListResponse = schemas_exports.object({
2731
2588
  pagination: Pagination,
2732
- runners: schemas_exports.list(Runner)
2589
+ pools: schemas_exports.list(Pool)
2733
2590
  });
2734
2591
 
2735
2592
  // src/serialization/client/requests/ActorsCreateRequest.ts
2736
2593
  var ActorsCreateRequest = schemas_exports.object({
2737
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2738
- datacenter: schemas_exports.string().optional(),
2739
2594
  input: schemas_exports.string().optional(),
2740
2595
  key: schemas_exports.string().optional(),
2741
2596
  name: schemas_exports.string(),
2742
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2597
+ pool: schemas_exports.string().optional()
2743
2598
  });
2744
2599
 
2745
2600
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2746
2601
  var ActorsGetOrCreateRequest = schemas_exports.object({
2747
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2748
- datacenter: schemas_exports.string().optional(),
2749
2602
  input: schemas_exports.string().optional(),
2750
- key: schemas_exports.string(),
2603
+ key: schemas_exports.string().optional(),
2751
2604
  name: schemas_exports.string(),
2752
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2753
- });
2754
-
2755
- // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2756
- var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2757
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2758
- url: schemas_exports.string()
2605
+ pool: schemas_exports.string().optional()
2759
2606
  });
2760
2607
 
2761
- // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2762
- var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2763
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2608
+ // src/serialization/client/requests/ActorsForkRequest.ts
2609
+ var ActorsForkRequest = schemas_exports.object({
2610
+ key: schemas_exports.string().optional(),
2611
+ input: schemas_exports.string().optional()
2764
2612
  });
2765
2613
 
2766
2614
  // src/serialization/resources/namespaces/index.ts
2767
- var namespaces_exports2 = {};
2768
- __export(namespaces_exports2, {
2615
+ var namespaces_exports = {};
2616
+ __export(namespaces_exports, {
2769
2617
  NamespacesCreateRequest: () => NamespacesCreateRequest
2770
2618
  });
2771
2619
 
2772
2620
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2773
2621
  var NamespacesCreateRequest = schemas_exports.object({
2774
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2775
2622
  name: schemas_exports.string()
2776
2623
  });
2777
2624
 
2778
- // src/Client.ts
2779
- var import_url_join7 = __toESM(require("url-join"));
2780
-
2781
2625
  // src/errors/RivetError.ts
2782
2626
  var RivetError = class _RivetError extends Error {
2783
2627
  statusCode;
@@ -2819,25 +2663,18 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2819
2663
  }
2820
2664
  };
2821
2665
 
2822
- // src/api/resources/datacenters/client/Client.ts
2823
- var import_url_join = __toESM(require("url-join"));
2824
- var Datacenters = class {
2666
+ // src/api/resources/authTokens/client/Client.ts
2667
+ var AuthTokens = class {
2825
2668
  constructor(_options) {
2826
2669
  this._options = _options;
2827
2670
  }
2828
- /**
2829
- * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
2830
- *
2831
- * @example
2832
- * await client.datacenters.list()
2833
- */
2834
- async list(requestOptions) {
2671
+ async create(request, requestOptions) {
2835
2672
  const _response = await (this._options.fetcher ?? fetcher)({
2836
2673
  url: (0, import_url_join.default)(
2837
2674
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2838
- "datacenters"
2675
+ "auth/tokens"
2839
2676
  ),
2840
- method: "GET",
2677
+ method: "POST",
2841
2678
  headers: {
2842
2679
  Authorization: await this._getAuthorizationHeader(),
2843
2680
  "X-Fern-Language": "JavaScript",
@@ -2847,12 +2684,18 @@ var Datacenters = class {
2847
2684
  },
2848
2685
  contentType: "application/json",
2849
2686
  requestType: "json",
2687
+ body: {
2688
+ namespace: request.namespace,
2689
+ duration: request.duration,
2690
+ subject: request.subject,
2691
+ grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2692
+ },
2850
2693
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2851
2694
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2852
2695
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2853
2696
  });
2854
2697
  if (_response.ok) {
2855
- return DatacentersListResponse.parseOrThrow(_response.body, {
2698
+ return AuthTokenCreateResponse.parseOrThrow(_response.body, {
2856
2699
  unrecognizedObjectKeys: "passthrough",
2857
2700
  allowUnrecognizedUnionMembers: true,
2858
2701
  allowUnrecognizedEnumValues: true,
@@ -2873,57 +2716,18 @@ var Datacenters = class {
2873
2716
  body: _response.error.rawBody
2874
2717
  });
2875
2718
  case "timeout":
2876
- throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
2719
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /auth/tokens.");
2877
2720
  case "unknown":
2878
2721
  throw new RivetError({
2879
2722
  message: _response.error.errorMessage
2880
2723
  });
2881
2724
  }
2882
2725
  }
2883
- async _getAuthorizationHeader() {
2884
- return `Bearer ${await Supplier.get(this._options.token)}`;
2885
- }
2886
- };
2887
-
2888
- // src/api/resources/envoys/client/Client.ts
2889
- var import_url_join2 = __toESM(require("url-join"));
2890
- var Envoys = class {
2891
- constructor(_options) {
2892
- this._options = _options;
2893
- }
2894
- /**
2895
- * @param {Rivet.EnvoysListRequest} request
2896
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2897
- *
2898
- * @example
2899
- * await client.envoys.list({
2900
- * namespace: "namespace"
2901
- * })
2902
- */
2903
- async list(request, requestOptions) {
2904
- const { namespace, name, envoyKey, limit, cursor } = request;
2905
- const _queryParams = {};
2906
- _queryParams["namespace"] = namespace;
2907
- if (name != null) {
2908
- _queryParams["name"] = name;
2909
- }
2910
- if (envoyKey != null) {
2911
- if (Array.isArray(envoyKey)) {
2912
- _queryParams["envoy_key"] = envoyKey.map((item) => item);
2913
- } else {
2914
- _queryParams["envoy_key"] = envoyKey;
2915
- }
2916
- }
2917
- if (limit != null) {
2918
- _queryParams["limit"] = limit.toString();
2919
- }
2920
- if (cursor != null) {
2921
- _queryParams["cursor"] = cursor;
2922
- }
2726
+ async inspect(requestOptions) {
2923
2727
  const _response = await (this._options.fetcher ?? fetcher)({
2924
- url: (0, import_url_join2.default)(
2728
+ url: (0, import_url_join.default)(
2925
2729
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2926
- "envoys"
2730
+ "auth/tokens/inspect"
2927
2731
  ),
2928
2732
  method: "GET",
2929
2733
  headers: {
@@ -2934,14 +2738,13 @@ var Envoys = class {
2934
2738
  ...requestOptions == null ? void 0 : requestOptions.headers
2935
2739
  },
2936
2740
  contentType: "application/json",
2937
- queryParameters: _queryParams,
2938
2741
  requestType: "json",
2939
2742
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2940
2743
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2941
2744
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2942
2745
  });
2943
2746
  if (_response.ok) {
2944
- return EnvoysListResponse.parseOrThrow(_response.body, {
2747
+ return AuthTokenInspectResponse.parseOrThrow(_response.body, {
2945
2748
  unrecognizedObjectKeys: "passthrough",
2946
2749
  allowUnrecognizedUnionMembers: true,
2947
2750
  allowUnrecognizedEnumValues: true,
@@ -2962,7 +2765,7 @@ var Envoys = class {
2962
2765
  body: _response.error.rawBody
2963
2766
  });
2964
2767
  case "timeout":
2965
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2768
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /auth/tokens/inspect.");
2966
2769
  case "unknown":
2967
2770
  throw new RivetError({
2968
2771
  message: _response.error.errorMessage
@@ -2974,23 +2777,38 @@ var Envoys = class {
2974
2777
  }
2975
2778
  };
2976
2779
 
2977
- // src/api/resources/health/client/Client.ts
2978
- var import_url_join3 = __toESM(require("url-join"));
2979
- var Health = class {
2780
+ // src/api/resources/datacenters/index.ts
2781
+ var datacenters_exports = {};
2782
+
2783
+ // src/api/resources/metadata/index.ts
2784
+ var metadata_exports = {};
2785
+
2786
+ // src/api/resources/namespaces/index.ts
2787
+ var namespaces_exports2 = {};
2788
+
2789
+ // src/api/resources/pools/index.ts
2790
+ var pools_exports = {};
2791
+
2792
+ // src/Client.ts
2793
+ var import_url_join6 = __toESM(require("url-join"));
2794
+
2795
+ // src/api/resources/datacenters/client/Client.ts
2796
+ var import_url_join2 = __toESM(require("url-join"));
2797
+ var Datacenters = class {
2980
2798
  constructor(_options) {
2981
2799
  this._options = _options;
2982
2800
  }
2983
2801
  /**
2984
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2802
+ * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
2985
2803
  *
2986
2804
  * @example
2987
- * await client.health.fanout()
2805
+ * await client.datacenters.list()
2988
2806
  */
2989
- async fanout(requestOptions) {
2807
+ async list(requestOptions) {
2990
2808
  const _response = await (this._options.fetcher ?? fetcher)({
2991
- url: (0, import_url_join3.default)(
2809
+ url: (0, import_url_join2.default)(
2992
2810
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2993
- "health/fanout"
2811
+ "datacenters"
2994
2812
  ),
2995
2813
  method: "GET",
2996
2814
  headers: {
@@ -3007,7 +2825,7 @@ var Health = class {
3007
2825
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3008
2826
  });
3009
2827
  if (_response.ok) {
3010
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2828
+ return DatacentersListResponse.parseOrThrow(_response.body, {
3011
2829
  unrecognizedObjectKeys: "passthrough",
3012
2830
  allowUnrecognizedUnionMembers: true,
3013
2831
  allowUnrecognizedEnumValues: true,
@@ -3028,7 +2846,7 @@ var Health = class {
3028
2846
  body: _response.error.rawBody
3029
2847
  });
3030
2848
  case "timeout":
3031
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2849
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
3032
2850
  case "unknown":
3033
2851
  throw new RivetError({
3034
2852
  message: _response.error.errorMessage
@@ -3041,7 +2859,7 @@ var Health = class {
3041
2859
  };
3042
2860
 
3043
2861
  // src/api/resources/metadata/client/Client.ts
3044
- var import_url_join4 = __toESM(require("url-join"));
2862
+ var import_url_join3 = __toESM(require("url-join"));
3045
2863
  var Metadata = class {
3046
2864
  constructor(_options) {
3047
2865
  this._options = _options;
@@ -3054,7 +2872,7 @@ var Metadata = class {
3054
2872
  */
3055
2873
  async get(requestOptions) {
3056
2874
  const _response = await (this._options.fetcher ?? fetcher)({
3057
- url: (0, import_url_join4.default)(
2875
+ url: (0, import_url_join3.default)(
3058
2876
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3059
2877
  "metadata"
3060
2878
  ),
@@ -3107,7 +2925,7 @@ var Metadata = class {
3107
2925
  };
3108
2926
 
3109
2927
  // src/api/resources/namespaces/client/Client.ts
3110
- var import_url_join5 = __toESM(require("url-join"));
2928
+ var import_url_join4 = __toESM(require("url-join"));
3111
2929
  var Namespaces = class {
3112
2930
  constructor(_options) {
3113
2931
  this._options = _options;
@@ -3120,7 +2938,7 @@ var Namespaces = class {
3120
2938
  * await client.namespaces.list()
3121
2939
  */
3122
2940
  async list(request = {}, requestOptions) {
3123
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
2941
+ const { limit, cursor, name } = request;
3124
2942
  const _queryParams = {};
3125
2943
  if (limit != null) {
3126
2944
  _queryParams["limit"] = limit.toString();
@@ -3131,20 +2949,8 @@ var Namespaces = class {
3131
2949
  if (name != null) {
3132
2950
  _queryParams["name"] = name;
3133
2951
  }
3134
- if (namespaceIds != null) {
3135
- _queryParams["namespace_ids"] = namespaceIds;
3136
- }
3137
- if (namespaceId != null) {
3138
- if (Array.isArray(namespaceId)) {
3139
- _queryParams["namespace_id"] = namespaceId.map(
3140
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3141
- );
3142
- } else {
3143
- _queryParams["namespace_id"] = namespaceId;
3144
- }
3145
- }
3146
2952
  const _response = await (this._options.fetcher ?? fetcher)({
3147
- url: (0, import_url_join5.default)(
2953
+ url: (0, import_url_join4.default)(
3148
2954
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3149
2955
  "namespaces"
3150
2956
  ),
@@ -3198,13 +3004,14 @@ var Namespaces = class {
3198
3004
  *
3199
3005
  * @example
3200
3006
  * await client.namespaces.create({
3201
- * displayName: "display_name",
3202
3007
  * name: "name"
3203
3008
  * })
3204
3009
  */
3205
3010
  async create(request, requestOptions) {
3011
+ const _body = request;
3012
+ const _queryParams = {};
3206
3013
  const _response = await (this._options.fetcher ?? fetcher)({
3207
- url: (0, import_url_join5.default)(
3014
+ url: (0, import_url_join4.default)(
3208
3015
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3209
3016
  "namespaces"
3210
3017
  ),
@@ -3217,8 +3024,9 @@ var Namespaces = class {
3217
3024
  ...requestOptions == null ? void 0 : requestOptions.headers
3218
3025
  },
3219
3026
  contentType: "application/json",
3027
+ queryParameters: _queryParams,
3220
3028
  requestType: "json",
3221
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3029
+ body: NamespacesCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3222
3030
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3223
3031
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3224
3032
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3252,60 +3060,24 @@ var Namespaces = class {
3252
3060
  });
3253
3061
  }
3254
3062
  }
3255
- async _getAuthorizationHeader() {
3256
- return `Bearer ${await Supplier.get(this._options.token)}`;
3257
- }
3258
- };
3259
-
3260
- // src/api/resources/runners/client/Client.ts
3261
- var import_url_join6 = __toESM(require("url-join"));
3262
- var Runners = class {
3263
- constructor(_options) {
3264
- this._options = _options;
3265
- }
3266
3063
  /**
3267
- * @param {Rivet.RunnersListRequest} request
3268
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3064
+ * Archives a namespace: refuses new work for it, stops what its nodes host, then closes its
3065
+ * storage. Archiving is final. Answers at once with the namespace at status `archiving`, or
3066
+ * `archived` when it already is.
3067
+ *
3068
+ * @param {string} name - The namespace to archive.
3069
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3269
3070
  *
3270
3071
  * @example
3271
- * await client.runners.list({
3272
- * namespace: "namespace"
3273
- * })
3072
+ * await client.namespaces.archive("staging")
3274
3073
  */
3275
- async list(request, requestOptions) {
3276
- const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3277
- const _queryParams = {};
3278
- _queryParams["namespace"] = namespace;
3279
- if (name != null) {
3280
- _queryParams["name"] = name;
3281
- }
3282
- if (runnerIds != null) {
3283
- _queryParams["runner_ids"] = runnerIds;
3284
- }
3285
- if (runnerId != null) {
3286
- if (Array.isArray(runnerId)) {
3287
- _queryParams["runner_id"] = runnerId.map(
3288
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3289
- );
3290
- } else {
3291
- _queryParams["runner_id"] = runnerId;
3292
- }
3293
- }
3294
- if (includeStopped != null) {
3295
- _queryParams["include_stopped"] = includeStopped.toString();
3296
- }
3297
- if (limit != null) {
3298
- _queryParams["limit"] = limit.toString();
3299
- }
3300
- if (cursor != null) {
3301
- _queryParams["cursor"] = cursor;
3302
- }
3074
+ async archive(name, requestOptions) {
3303
3075
  const _response = await (this._options.fetcher ?? fetcher)({
3304
- url: (0, import_url_join6.default)(
3076
+ url: (0, import_url_join4.default)(
3305
3077
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3306
- "runners"
3078
+ `namespaces/${encodeURIComponent(name)}/archive`
3307
3079
  ),
3308
- method: "GET",
3080
+ method: "POST",
3309
3081
  headers: {
3310
3082
  Authorization: await this._getAuthorizationHeader(),
3311
3083
  "X-Fern-Language": "JavaScript",
@@ -3314,14 +3086,13 @@ var Runners = class {
3314
3086
  ...requestOptions == null ? void 0 : requestOptions.headers
3315
3087
  },
3316
3088
  contentType: "application/json",
3317
- queryParameters: _queryParams,
3318
3089
  requestType: "json",
3319
3090
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3320
3091
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3321
3092
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3322
3093
  });
3323
3094
  if (_response.ok) {
3324
- return RunnersListResponse.parseOrThrow(_response.body, {
3095
+ return NamespacesArchiveResponse.parseOrThrow(_response.body, {
3325
3096
  unrecognizedObjectKeys: "passthrough",
3326
3097
  allowUnrecognizedUnionMembers: true,
3327
3098
  allowUnrecognizedEnumValues: true,
@@ -3342,31 +3113,40 @@ var Runners = class {
3342
3113
  body: _response.error.rawBody
3343
3114
  });
3344
3115
  case "timeout":
3345
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3116
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3346
3117
  case "unknown":
3347
3118
  throw new RivetError({
3348
3119
  message: _response.error.errorMessage
3349
3120
  });
3350
3121
  }
3351
3122
  }
3123
+ async _getAuthorizationHeader() {
3124
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3125
+ }
3126
+ };
3127
+
3128
+ // src/api/resources/pools/client/Client.ts
3129
+ var import_url_join5 = __toESM(require("url-join"));
3130
+ var Pools = class {
3131
+ constructor(_options) {
3132
+ this._options = _options;
3133
+ }
3352
3134
  /**
3353
- * 2 round trips:
3135
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
3354
3136
  *
3355
- * - GET /runners/names (fanout)
3356
- * - [api-peer] namespace::ops::resolve_for_name_global
3357
- *
3358
- * @param {Rivet.RunnersListNamesRequest} request
3359
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3137
+ * @param {Rivet.PoolsListRequest} request
3138
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3360
3139
  *
3361
3140
  * @example
3362
- * await client.runners.listNames({
3141
+ * await client.pools.list({
3363
3142
  * namespace: "namespace"
3364
3143
  * })
3365
3144
  */
3366
- async listNames(request, requestOptions) {
3145
+ async list(request, requestOptions) {
3367
3146
  const { namespace, limit, cursor } = request;
3368
3147
  const _queryParams = {};
3369
- _queryParams["namespace"] = namespace;
3148
+ if (namespace != null)
3149
+ _queryParams["namespace"] = namespace;
3370
3150
  if (limit != null) {
3371
3151
  _queryParams["limit"] = limit.toString();
3372
3152
  }
@@ -3374,9 +3154,9 @@ var Runners = class {
3374
3154
  _queryParams["cursor"] = cursor;
3375
3155
  }
3376
3156
  const _response = await (this._options.fetcher ?? fetcher)({
3377
- url: (0, import_url_join6.default)(
3157
+ url: (0, import_url_join5.default)(
3378
3158
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3379
- "runners/names"
3159
+ "pools"
3380
3160
  ),
3381
3161
  method: "GET",
3382
3162
  headers: {
@@ -3394,7 +3174,7 @@ var Runners = class {
3394
3174
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3395
3175
  });
3396
3176
  if (_response.ok) {
3397
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3177
+ return PoolsListResponse.parseOrThrow(_response.body, {
3398
3178
  unrecognizedObjectKeys: "passthrough",
3399
3179
  allowUnrecognizedUnionMembers: true,
3400
3180
  allowUnrecognizedEnumValues: true,
@@ -3415,104 +3195,30 @@ var Runners = class {
3415
3195
  body: _response.error.rawBody
3416
3196
  });
3417
3197
  case "timeout":
3418
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3198
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3419
3199
  case "unknown":
3420
3200
  throw new RivetError({
3421
3201
  message: _response.error.errorMessage
3422
3202
  });
3423
3203
  }
3424
3204
  }
3425
- async _getAuthorizationHeader() {
3426
- return `Bearer ${await Supplier.get(this._options.token)}`;
3427
- }
3428
- };
3429
-
3430
- // src/Client.ts
3431
- var RivetClient = class {
3432
- constructor(_options) {
3433
- this._options = _options;
3434
- }
3435
- _datacenters;
3436
- _envoys;
3437
- _health;
3438
- _metadata;
3439
- _namespaces;
3440
- _runners;
3441
- get datacenters() {
3442
- return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3443
- }
3444
- get envoys() {
3445
- return this._envoys ?? (this._envoys = new Envoys(this._options));
3446
- }
3447
- get health() {
3448
- return this._health ?? (this._health = new Health(this._options));
3449
- }
3450
- get metadata() {
3451
- return this._metadata ?? (this._metadata = new Metadata(this._options));
3452
- }
3453
- get namespaces() {
3454
- return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3455
- }
3456
- get runners() {
3457
- return this._runners ?? (this._runners = new Runners(this._options));
3458
- }
3459
3205
  /**
3460
- * **If key is some & `include_destroyed` is false**
3461
- *
3462
- * 2 round trips:
3463
- *
3464
- * - namespace::ops::resolve_for_name_global
3465
- * - GET /actors (multiple DCs based on actor IDs)
3466
- *
3467
- * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
3468
- * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
3469
- * this means we don't need to fan out to all datacenters (like normal list does).
3470
- *
3471
- * The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
3472
- * `include_destroyed` is true, we show all previous iterations of actors with the same key.
3473
- *
3474
- * **Otherwise**
3475
- *
3476
- * 2 round trips:
3477
- *
3478
- * - namespace::ops::resolve_for_name_global
3479
- * - GET /actors (fanout)
3206
+ * Lists the live nodes of a pool in node key order.
3480
3207
  *
3481
- * ## Optimized Alternative Routes
3482
- *
3483
- * @param {Rivet.ActorsListRequest} request
3484
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3208
+ * @param {string} pool
3209
+ * @param {Rivet.PoolsListNodesRequest} request
3210
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3485
3211
  *
3486
3212
  * @example
3487
- * await client.actorsList({
3213
+ * await client.pools.listNodes("pool", {
3488
3214
  * namespace: "namespace"
3489
3215
  * })
3490
3216
  */
3491
- async actorsList(request, requestOptions) {
3492
- const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3217
+ async listNodes(pool, request, requestOptions) {
3218
+ const { namespace, limit, cursor } = request;
3493
3219
  const _queryParams = {};
3494
- _queryParams["namespace"] = namespace;
3495
- if (name != null) {
3496
- _queryParams["name"] = name;
3497
- }
3498
- if (key != null) {
3499
- _queryParams["key"] = key;
3500
- }
3501
- if (actorIds != null) {
3502
- _queryParams["actor_ids"] = actorIds;
3503
- }
3504
- if (actorId != null) {
3505
- if (Array.isArray(actorId)) {
3506
- _queryParams["actor_id"] = actorId.map(
3507
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3508
- );
3509
- } else {
3510
- _queryParams["actor_id"] = actorId;
3511
- }
3512
- }
3513
- if (includeDestroyed != null) {
3514
- _queryParams["include_destroyed"] = includeDestroyed.toString();
3515
- }
3220
+ if (namespace != null)
3221
+ _queryParams["namespace"] = namespace;
3516
3222
  if (limit != null) {
3517
3223
  _queryParams["limit"] = limit.toString();
3518
3224
  }
@@ -3520,9 +3226,9 @@ var RivetClient = class {
3520
3226
  _queryParams["cursor"] = cursor;
3521
3227
  }
3522
3228
  const _response = await (this._options.fetcher ?? fetcher)({
3523
- url: (0, import_url_join7.default)(
3229
+ url: (0, import_url_join5.default)(
3524
3230
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3525
- "actors"
3231
+ `pools/${encodeURIComponent(pool)}/nodes`
3526
3232
  ),
3527
3233
  method: "GET",
3528
3234
  headers: {
@@ -3540,7 +3246,7 @@ var RivetClient = class {
3540
3246
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3541
3247
  });
3542
3248
  if (_response.ok) {
3543
- return ActorsListResponse.parseOrThrow(_response.body, {
3249
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3544
3250
  unrecognizedObjectKeys: "passthrough",
3545
3251
  allowUnrecognizedUnionMembers: true,
3546
3252
  allowUnrecognizedEnumValues: true,
@@ -3561,52 +3267,23 @@ var RivetClient = class {
3561
3267
  body: _response.error.rawBody
3562
3268
  });
3563
3269
  case "timeout":
3564
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
3270
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3565
3271
  case "unknown":
3566
3272
  throw new RivetError({
3567
3273
  message: _response.error.errorMessage
3568
3274
  });
3569
3275
  }
3570
3276
  }
3571
- /**
3572
- * **If actor is created in the current datacenter:**
3573
- *
3574
- * 2 round trips:
3575
- *
3576
- * - namespace::ops::resolve_for_name_global
3577
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3578
- *
3579
- * **If actor is created in a different datacenter:**
3580
- *
3581
- * 3 round trips:
3582
- *
3583
- * - namespace::ops::resolve_for_name_global
3584
- * - POST /actors to remote datacenter
3585
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3586
- *
3587
- * actor::get will always be in the same datacenter.
3588
- *
3589
- * @param {Rivet.ActorsCreateRequest} request
3590
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3591
- *
3592
- * @example
3593
- * await client.actorsCreate({
3594
- * namespace: "namespace",
3595
- * crashPolicy: "restart",
3596
- * name: "name",
3597
- * runnerNameSelector: "runner_name_selector"
3598
- * })
3599
- */
3600
- async actorsCreate(request, requestOptions) {
3601
- const { namespace, ..._body } = request;
3277
+ async get(name, request = {}, requestOptions) {
3602
3278
  const _queryParams = {};
3603
- _queryParams["namespace"] = namespace;
3279
+ if (request.namespace != null)
3280
+ _queryParams["namespace"] = request.namespace;
3604
3281
  const _response = await (this._options.fetcher ?? fetcher)({
3605
- url: (0, import_url_join7.default)(
3282
+ url: (0, import_url_join5.default)(
3606
3283
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3607
- "actors"
3284
+ `pools/${encodeURIComponent(name)}`
3608
3285
  ),
3609
- method: "POST",
3286
+ method: "GET",
3610
3287
  headers: {
3611
3288
  Authorization: await this._getAuthorizationHeader(),
3612
3289
  "X-Fern-Language": "JavaScript",
@@ -3617,13 +3294,12 @@ var RivetClient = class {
3617
3294
  contentType: "application/json",
3618
3295
  queryParameters: _queryParams,
3619
3296
  requestType: "json",
3620
- body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3621
3297
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3622
3298
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3623
3299
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3624
3300
  });
3625
3301
  if (_response.ok) {
3626
- return ActorsCreateResponse.parseOrThrow(_response.body, {
3302
+ return PoolResponse.parseOrThrow(_response.body, {
3627
3303
  unrecognizedObjectKeys: "passthrough",
3628
3304
  allowUnrecognizedUnionMembers: true,
3629
3305
  allowUnrecognizedEnumValues: true,
@@ -3644,60 +3320,21 @@ var RivetClient = class {
3644
3320
  body: _response.error.rawBody
3645
3321
  });
3646
3322
  case "timeout":
3647
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
3323
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3648
3324
  case "unknown":
3649
3325
  throw new RivetError({
3650
3326
  message: _response.error.errorMessage
3651
3327
  });
3652
3328
  }
3653
3329
  }
3654
- /**
3655
- * **If actor exists**
3656
- *
3657
- * 2 round trips:
3658
- *
3659
- * - namespace::ops::resolve_for_name_global
3660
- * - GET /actors/{}
3661
- *
3662
- * **If actor does not exist and is created in the current datacenter:**
3663
- *
3664
- * 2 round trips:
3665
- *
3666
- * - namespace::ops::resolve_for_name_global
3667
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3668
- *
3669
- * **If actor does not exist and is created in a different datacenter:**
3670
- *
3671
- * 3 round trips:
3672
- *
3673
- * - namespace::ops::resolve_for_name_global
3674
- * - POST /actors to remote datacenter
3675
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3676
- *
3677
- * actor::get will always be in the same datacenter.
3678
- *
3679
- * ## Optimized Alternative Routes
3680
- *
3681
- * @param {Rivet.ActorsGetOrCreateRequest} request
3682
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3683
- *
3684
- * @example
3685
- * await client.actorsGetOrCreate({
3686
- * namespace: "namespace",
3687
- * crashPolicy: "restart",
3688
- * key: "key",
3689
- * name: "name",
3690
- * runnerNameSelector: "runner_name_selector"
3691
- * })
3692
- */
3693
- async actorsGetOrCreate(request, requestOptions) {
3694
- const { namespace, ..._body } = request;
3330
+ async upsert(name, request, requestOptions) {
3695
3331
  const _queryParams = {};
3696
- _queryParams["namespace"] = namespace;
3332
+ if (request.namespace != null)
3333
+ _queryParams["namespace"] = request.namespace;
3697
3334
  const _response = await (this._options.fetcher ?? fetcher)({
3698
- url: (0, import_url_join7.default)(
3335
+ url: (0, import_url_join5.default)(
3699
3336
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3700
- "actors"
3337
+ `pools/${encodeURIComponent(name)}`
3701
3338
  ),
3702
3339
  method: "PUT",
3703
3340
  headers: {
@@ -3710,13 +3347,19 @@ var RivetClient = class {
3710
3347
  contentType: "application/json",
3711
3348
  queryParameters: _queryParams,
3712
3349
  requestType: "json",
3713
- body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3350
+ body: {
3351
+ drain_on_version_upgrade: request.drainOnVersionUpgrade,
3352
+ actor_eviction_delay: request.actorEvictionDelay,
3353
+ actor_eviction_period: request.actorEvictionPeriod,
3354
+ actor_eviction_rate: request.actorEvictionRate,
3355
+ metadata: request.metadata
3356
+ },
3714
3357
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3715
3358
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3716
3359
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3717
3360
  });
3718
3361
  if (_response.ok) {
3719
- return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
3362
+ return PoolResponse.parseOrThrow(_response.body, {
3720
3363
  unrecognizedObjectKeys: "passthrough",
3721
3364
  allowUnrecognizedUnionMembers: true,
3722
3365
  allowUnrecognizedEnumValues: true,
@@ -3737,43 +3380,23 @@ var RivetClient = class {
3737
3380
  body: _response.error.rawBody
3738
3381
  });
3739
3382
  case "timeout":
3740
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
3383
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3741
3384
  case "unknown":
3742
3385
  throw new RivetError({
3743
3386
  message: _response.error.errorMessage
3744
3387
  });
3745
3388
  }
3746
3389
  }
3747
- /**
3748
- * 2 round trips:
3749
- *
3750
- * - GET /actors/names (fanout)
3751
- * - [api-peer] namespace::ops::resolve_for_name_global
3752
- *
3753
- * @param {Rivet.ActorsListNamesRequest} request
3754
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3755
- *
3756
- * @example
3757
- * await client.actorsListNames({
3758
- * namespace: "namespace"
3759
- * })
3760
- */
3761
- async actorsListNames(request, requestOptions) {
3762
- const { namespace, limit, cursor } = request;
3390
+ async delete(name, request = {}, requestOptions) {
3763
3391
  const _queryParams = {};
3764
- _queryParams["namespace"] = namespace;
3765
- if (limit != null) {
3766
- _queryParams["limit"] = limit.toString();
3767
- }
3768
- if (cursor != null) {
3769
- _queryParams["cursor"] = cursor;
3770
- }
3392
+ if (request.namespace != null)
3393
+ _queryParams["namespace"] = request.namespace;
3771
3394
  const _response = await (this._options.fetcher ?? fetcher)({
3772
- url: (0, import_url_join7.default)(
3395
+ url: (0, import_url_join5.default)(
3773
3396
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3774
- "actors/names"
3397
+ `pools/${encodeURIComponent(name)}`
3775
3398
  ),
3776
- method: "GET",
3399
+ method: "DELETE",
3777
3400
  headers: {
3778
3401
  Authorization: await this._getAuthorizationHeader(),
3779
3402
  "X-Fern-Language": "JavaScript",
@@ -3789,13 +3412,7 @@ var RivetClient = class {
3789
3412
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3790
3413
  });
3791
3414
  if (_response.ok) {
3792
- return ActorsListNamesResponse.parseOrThrow(_response.body, {
3793
- unrecognizedObjectKeys: "passthrough",
3794
- allowUnrecognizedUnionMembers: true,
3795
- allowUnrecognizedEnumValues: true,
3796
- skipValidation: true,
3797
- breadcrumbsPrefix: ["response"]
3798
- });
3415
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3799
3416
  }
3800
3417
  if (_response.error.reason === "status-code") {
3801
3418
  throw new RivetError({
@@ -3810,38 +3427,106 @@ var RivetClient = class {
3810
3427
  body: _response.error.rawBody
3811
3428
  });
3812
3429
  case "timeout":
3813
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
3430
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3814
3431
  case "unknown":
3815
3432
  throw new RivetError({
3816
3433
  message: _response.error.errorMessage
3817
3434
  });
3818
3435
  }
3819
3436
  }
3437
+ async _getAuthorizationHeader() {
3438
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3439
+ }
3440
+ };
3441
+
3442
+ // src/Client.ts
3443
+ var RivetClient = class {
3444
+ constructor(_options) {
3445
+ this._options = _options;
3446
+ }
3447
+ _authTokens;
3448
+ _datacenters;
3449
+ _metadata;
3450
+ _namespaces;
3451
+ _pools;
3452
+ get authTokens() {
3453
+ return this._authTokens ?? (this._authTokens = new AuthTokens(this._options));
3454
+ }
3455
+ get datacenters() {
3456
+ return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3457
+ }
3458
+ get metadata() {
3459
+ return this._metadata ?? (this._metadata = new Metadata(this._options));
3460
+ }
3461
+ get namespaces() {
3462
+ return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3463
+ }
3464
+ get pools() {
3465
+ return this._pools ?? (this._pools = new Pools(this._options));
3466
+ }
3820
3467
  /**
3821
- * 2 round trip:
3468
+ * **If key is some & `include_destroyed` is false**
3822
3469
  *
3823
- * - DELETE /actors/{}
3824
- * - [api-peer] namespace::ops::resolve_for_name_global
3470
+ * 2 round trips:
3825
3471
  *
3826
- * @param {Rivet.RivetId} actorId
3827
- * @param {Rivet.ActorsDeleteRequest} request
3472
+ * - namespace::ops::resolve_for_name_global
3473
+ * - GET /actors (multiple DCs based on actor IDs)
3474
+ *
3475
+ * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
3476
+ * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
3477
+ * this means we don't need to fan out to all datacenters (like normal list does).
3478
+ *
3479
+ * The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
3480
+ * `include_destroyed` is true, we show all previous iterations of actors with the same key.
3481
+ *
3482
+ * **Otherwise**
3483
+ *
3484
+ * 2 round trips:
3485
+ *
3486
+ * - namespace::ops::resolve_for_name_global
3487
+ * - GET /actors (fanout)
3488
+ *
3489
+ * ## Optimized Alternative Routes
3490
+ *
3491
+ * @param {Rivet.ActorsListRequest} request
3828
3492
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3829
3493
  *
3830
3494
  * @example
3831
- * await client.actorsDelete("actor_id", {
3495
+ * await client.actorsList({
3832
3496
  * namespace: "namespace"
3833
3497
  * })
3834
3498
  */
3835
- async actorsDelete(actorId, request, requestOptions) {
3836
- const { namespace } = request;
3499
+ async actorsList(request, requestOptions) {
3500
+ const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3837
3501
  const _queryParams = {};
3838
- _queryParams["namespace"] = namespace;
3502
+ if (namespace != null)
3503
+ _queryParams["namespace"] = namespace;
3504
+ if (name != null) {
3505
+ _queryParams["name"] = name;
3506
+ }
3507
+ if (key != null) {
3508
+ _queryParams["key"] = key;
3509
+ }
3510
+ if (actorIds != null) {
3511
+ _queryParams["actor_ids"] = actorIds;
3512
+ }
3513
+ if (actorId != null)
3514
+ _queryParams["actor_id"] = actorId;
3515
+ if (includeDestroyed != null) {
3516
+ _queryParams["include_destroyed"] = includeDestroyed.toString();
3517
+ }
3518
+ if (limit != null) {
3519
+ _queryParams["limit"] = limit.toString();
3520
+ }
3521
+ if (cursor != null) {
3522
+ _queryParams["cursor"] = cursor;
3523
+ }
3839
3524
  const _response = await (this._options.fetcher ?? fetcher)({
3840
- url: (0, import_url_join7.default)(
3525
+ url: (0, import_url_join6.default)(
3841
3526
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3842
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3527
+ "actors"
3843
3528
  ),
3844
- method: "DELETE",
3529
+ method: "GET",
3845
3530
  headers: {
3846
3531
  Authorization: await this._getAuthorizationHeader(),
3847
3532
  "X-Fern-Language": "JavaScript",
@@ -3857,7 +3542,7 @@ var RivetClient = class {
3857
3542
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3858
3543
  });
3859
3544
  if (_response.ok) {
3860
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3545
+ return ActorsListResponse.parseOrThrow(_response.body, {
3861
3546
  unrecognizedObjectKeys: "passthrough",
3862
3547
  allowUnrecognizedUnionMembers: true,
3863
3548
  allowUnrecognizedEnumValues: true,
@@ -3878,7 +3563,7 @@ var RivetClient = class {
3878
3563
  body: _response.error.rawBody
3879
3564
  });
3880
3565
  case "timeout":
3881
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3566
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
3882
3567
  case "unknown":
3883
3568
  throw new RivetError({
3884
3569
  message: _response.error.errorMessage
@@ -3886,26 +3571,44 @@ var RivetClient = class {
3886
3571
  }
3887
3572
  }
3888
3573
  /**
3889
- * @param {Rivet.RivetId} actorId
3890
- * @param {string} key
3891
- * @param {Rivet.ActorsKvGetRequest} request
3574
+ * **If actor is created in the current datacenter:**
3575
+ *
3576
+ * 2 round trips:
3577
+ *
3578
+ * - namespace::ops::resolve_for_name_global
3579
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3580
+ *
3581
+ * **If actor is created in a different datacenter:**
3582
+ *
3583
+ * 3 round trips:
3584
+ *
3585
+ * - namespace::ops::resolve_for_name_global
3586
+ * - POST /actors to remote datacenter
3587
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3588
+ *
3589
+ * actor::get will always be in the same datacenter.
3590
+ *
3591
+ * @param {Rivet.ActorsCreateRequest} request
3892
3592
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3893
3593
  *
3894
3594
  * @example
3895
- * await client.actorsKvGet("actor_id", "key", {
3896
- * namespace: "namespace"
3595
+ * await client.actorsCreate({
3596
+ * namespace: "namespace",
3597
+ * name: "name",
3598
+ * pool: "pool"
3897
3599
  * })
3898
3600
  */
3899
- async actorsKvGet(actorId, key, request, requestOptions) {
3900
- const { namespace } = request;
3601
+ async actorsCreate(request, requestOptions) {
3602
+ const { namespace, ..._body } = request;
3901
3603
  const _queryParams = {};
3902
- _queryParams["namespace"] = namespace;
3604
+ if (namespace != null)
3605
+ _queryParams["namespace"] = namespace;
3903
3606
  const _response = await (this._options.fetcher ?? fetcher)({
3904
- url: (0, import_url_join7.default)(
3607
+ url: (0, import_url_join6.default)(
3905
3608
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3906
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3609
+ "actors"
3907
3610
  ),
3908
- method: "GET",
3611
+ method: "POST",
3909
3612
  headers: {
3910
3613
  Authorization: await this._getAuthorizationHeader(),
3911
3614
  "X-Fern-Language": "JavaScript",
@@ -3916,12 +3619,13 @@ var RivetClient = class {
3916
3619
  contentType: "application/json",
3917
3620
  queryParameters: _queryParams,
3918
3621
  requestType: "json",
3622
+ body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3919
3623
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3920
3624
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3921
3625
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3922
3626
  });
3923
3627
  if (_response.ok) {
3924
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3628
+ return ActorsCreateResponse.parseOrThrow(_response.body, {
3925
3629
  unrecognizedObjectKeys: "passthrough",
3926
3630
  allowUnrecognizedUnionMembers: true,
3927
3631
  allowUnrecognizedEnumValues: true,
@@ -3942,9 +3646,7 @@ var RivetClient = class {
3942
3646
  body: _response.error.rawBody
3943
3647
  });
3944
3648
  case "timeout":
3945
- throw new RivetTimeoutError(
3946
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
3947
- );
3649
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
3948
3650
  case "unknown":
3949
3651
  throw new RivetError({
3950
3652
  message: _response.error.errorMessage
@@ -3952,28 +3654,54 @@ var RivetClient = class {
3952
3654
  }
3953
3655
  }
3954
3656
  /**
3955
- * @param {Rivet.RivetId} actorId
3956
- * @param {Rivet.ActorsRescheduleRequest} request
3657
+ * **If actor exists**
3658
+ *
3659
+ * 2 round trips:
3660
+ *
3661
+ * - namespace::ops::resolve_for_name_global
3662
+ * - GET /actors/{}
3663
+ *
3664
+ * **If actor does not exist and is created in the current datacenter:**
3665
+ *
3666
+ * 2 round trips:
3667
+ *
3668
+ * - namespace::ops::resolve_for_name_global
3669
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3670
+ *
3671
+ * **If actor does not exist and is created in a different datacenter:**
3672
+ *
3673
+ * 3 round trips:
3674
+ *
3675
+ * - namespace::ops::resolve_for_name_global
3676
+ * - POST /actors to remote datacenter
3677
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3678
+ *
3679
+ * actor::get will always be in the same datacenter.
3680
+ *
3681
+ * ## Optimized Alternative Routes
3682
+ *
3683
+ * @param {Rivet.ActorsGetOrCreateRequest} request
3957
3684
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3958
3685
  *
3959
3686
  * @example
3960
- * await client.actorsReschedule("actor_id", {
3687
+ * await client.actorsGetOrCreate({
3961
3688
  * namespace: "namespace",
3962
- * body: {
3963
- * "key": "value"
3964
- * }
3689
+ * key: "key",
3690
+ * name: "name",
3691
+ * pool: "pool"
3965
3692
  * })
3966
3693
  */
3967
- async actorsReschedule(actorId, request, requestOptions) {
3968
- const { namespace, body: _body } = request;
3694
+ async actorsGetOrCreate(request, requestOptions) {
3695
+ const { namespace, ..._body } = request;
3969
3696
  const _queryParams = {};
3970
- _queryParams["namespace"] = namespace;
3697
+ if (namespace != null)
3698
+ _queryParams["namespace"] = namespace;
3971
3699
  const _response = await (this._options.fetcher ?? fetcher)({
3972
- url: (0, import_url_join7.default)(
3700
+ url: (0, import_url_join6.default)(
3973
3701
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3974
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
3702
+ "actors"
3975
3703
  ),
3976
- method: "POST",
3704
+ method: "PUT",
3977
3705
  headers: {
3978
3706
  Authorization: await this._getAuthorizationHeader(),
3979
3707
  "X-Fern-Language": "JavaScript",
@@ -3984,13 +3712,13 @@ var RivetClient = class {
3984
3712
  contentType: "application/json",
3985
3713
  queryParameters: _queryParams,
3986
3714
  requestType: "json",
3987
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3715
+ body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3988
3716
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3989
3717
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3990
3718
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3991
3719
  });
3992
3720
  if (_response.ok) {
3993
- return ActorsRescheduleResponse.parseOrThrow(_response.body, {
3721
+ return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
3994
3722
  unrecognizedObjectKeys: "passthrough",
3995
3723
  allowUnrecognizedUnionMembers: true,
3996
3724
  allowUnrecognizedEnumValues: true,
@@ -4011,7 +3739,7 @@ var RivetClient = class {
4011
3739
  body: _response.error.rawBody
4012
3740
  });
4013
3741
  case "timeout":
4014
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
3742
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
4015
3743
  case "unknown":
4016
3744
  throw new RivetError({
4017
3745
  message: _response.error.errorMessage
@@ -4019,28 +3747,36 @@ var RivetClient = class {
4019
3747
  }
4020
3748
  }
4021
3749
  /**
4022
- * @param {Rivet.RivetId} actorId
4023
- * @param {Rivet.ActorsSleepRequest} request
3750
+ * 2 round trips:
3751
+ *
3752
+ * - GET /actors/names (fanout)
3753
+ * - [api-peer] namespace::ops::resolve_for_name_global
3754
+ *
3755
+ * @param {Rivet.ActorsListNamesRequest} request
4024
3756
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4025
3757
  *
4026
3758
  * @example
4027
- * await client.actorsSleep("actor_id", {
4028
- * namespace: "namespace",
4029
- * body: {
4030
- * "key": "value"
4031
- * }
3759
+ * await client.actorsListNames({
3760
+ * namespace: "namespace"
4032
3761
  * })
4033
3762
  */
4034
- async actorsSleep(actorId, request, requestOptions) {
4035
- const { namespace, body: _body } = request;
3763
+ async actorsListNames(request, requestOptions) {
3764
+ const { namespace, limit, cursor } = request;
4036
3765
  const _queryParams = {};
4037
- _queryParams["namespace"] = namespace;
3766
+ if (namespace != null)
3767
+ _queryParams["namespace"] = namespace;
3768
+ if (limit != null) {
3769
+ _queryParams["limit"] = limit.toString();
3770
+ }
3771
+ if (cursor != null) {
3772
+ _queryParams["cursor"] = cursor;
3773
+ }
4038
3774
  const _response = await (this._options.fetcher ?? fetcher)({
4039
- url: (0, import_url_join7.default)(
3775
+ url: (0, import_url_join6.default)(
4040
3776
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4041
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
3777
+ "actors/names"
4042
3778
  ),
4043
- method: "POST",
3779
+ method: "GET",
4044
3780
  headers: {
4045
3781
  Authorization: await this._getAuthorizationHeader(),
4046
3782
  "X-Fern-Language": "JavaScript",
@@ -4051,13 +3787,12 @@ var RivetClient = class {
4051
3787
  contentType: "application/json",
4052
3788
  queryParameters: _queryParams,
4053
3789
  requestType: "json",
4054
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4055
3790
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4056
3791
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4057
3792
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4058
3793
  });
4059
3794
  if (_response.ok) {
4060
- return ActorsSleepResponse.parseOrThrow(_response.body, {
3795
+ return ActorsListNamesResponse.parseOrThrow(_response.body, {
4061
3796
  unrecognizedObjectKeys: "passthrough",
4062
3797
  allowUnrecognizedUnionMembers: true,
4063
3798
  allowUnrecognizedEnumValues: true,
@@ -4078,7 +3813,7 @@ var RivetClient = class {
4078
3813
  body: _response.error.rawBody
4079
3814
  });
4080
3815
  case "timeout":
4081
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
3816
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
4082
3817
  case "unknown":
4083
3818
  throw new RivetError({
4084
3819
  message: _response.error.errorMessage
@@ -4086,43 +3821,30 @@ var RivetClient = class {
4086
3821
  }
4087
3822
  }
4088
3823
  /**
4089
- * @param {Rivet.RunnerConfigsListRequest} request
3824
+ * 2 round trip:
3825
+ *
3826
+ * - DELETE /actors/{}
3827
+ * - [api-peer] namespace::ops::resolve_for_name_global
3828
+ *
3829
+ * @param {Rivet.RivetId} actorId
3830
+ * @param {Rivet.ActorsDeleteRequest} request
4090
3831
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4091
3832
  *
4092
3833
  * @example
4093
- * await client.runnerConfigsList({
3834
+ * await client.actorsDelete("actor_id", {
4094
3835
  * namespace: "namespace"
4095
3836
  * })
4096
3837
  */
4097
- async runnerConfigsList(request, requestOptions) {
4098
- const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
3838
+ /** Returns one actor by ID. */
3839
+ async actorsGet(actorId, request, requestOptions) {
3840
+ const { namespace } = request;
4099
3841
  const _queryParams = {};
4100
- _queryParams["namespace"] = namespace;
4101
- if (limit != null) {
4102
- _queryParams["limit"] = limit.toString();
4103
- }
4104
- if (cursor != null) {
4105
- _queryParams["cursor"] = cursor;
4106
- }
4107
- if (variant != null) {
4108
- _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4109
- unrecognizedObjectKeys: "strip"
4110
- });
4111
- }
4112
- if (runnerNames != null) {
4113
- _queryParams["runner_names"] = runnerNames;
4114
- }
4115
- if (runnerName != null) {
4116
- if (Array.isArray(runnerName)) {
4117
- _queryParams["runner_name"] = runnerName.map((item) => item);
4118
- } else {
4119
- _queryParams["runner_name"] = runnerName;
4120
- }
4121
- }
3842
+ if (namespace != null)
3843
+ _queryParams["namespace"] = namespace;
4122
3844
  const _response = await (this._options.fetcher ?? fetcher)({
4123
- url: (0, import_url_join7.default)(
3845
+ url: (0, import_url_join6.default)(
4124
3846
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4125
- "runner-configs"
3847
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4126
3848
  ),
4127
3849
  method: "GET",
4128
3850
  headers: {
@@ -4140,7 +3862,7 @@ var RivetClient = class {
4140
3862
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4141
3863
  });
4142
3864
  if (_response.ok) {
4143
- return RunnerConfigsListResponse.parseOrThrow(_response.body, {
3865
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4144
3866
  unrecognizedObjectKeys: "passthrough",
4145
3867
  allowUnrecognizedUnionMembers: true,
4146
3868
  allowUnrecognizedEnumValues: true,
@@ -4161,33 +3883,24 @@ var RivetClient = class {
4161
3883
  body: _response.error.rawBody
4162
3884
  });
4163
3885
  case "timeout":
4164
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
3886
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4165
3887
  case "unknown":
4166
3888
  throw new RivetError({
4167
3889
  message: _response.error.errorMessage
4168
3890
  });
4169
3891
  }
4170
3892
  }
4171
- /**
4172
- * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4173
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4174
- *
4175
- * @example
4176
- * await client.runnerConfigsServerlessHealthCheck({
4177
- * namespace: "namespace",
4178
- * url: "url"
4179
- * })
4180
- */
4181
- async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4182
- const { namespace, ..._body } = request;
3893
+ async actorsDelete(actorId, request, requestOptions) {
3894
+ const { namespace } = request;
4183
3895
  const _queryParams = {};
4184
- _queryParams["namespace"] = namespace;
3896
+ if (namespace != null)
3897
+ _queryParams["namespace"] = namespace;
4185
3898
  const _response = await (this._options.fetcher ?? fetcher)({
4186
- url: (0, import_url_join7.default)(
3899
+ url: (0, import_url_join6.default)(
4187
3900
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4188
- "runner-configs/serverless-health-check"
3901
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4189
3902
  ),
4190
- method: "POST",
3903
+ method: "DELETE",
4191
3904
  headers: {
4192
3905
  Authorization: await this._getAuthorizationHeader(),
4193
3906
  "X-Fern-Language": "JavaScript",
@@ -4198,15 +3911,12 @@ var RivetClient = class {
4198
3911
  contentType: "application/json",
4199
3912
  queryParameters: _queryParams,
4200
3913
  requestType: "json",
4201
- body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4202
- unrecognizedObjectKeys: "strip"
4203
- }),
4204
3914
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4205
3915
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4206
3916
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4207
3917
  });
4208
3918
  if (_response.ok) {
4209
- return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
3919
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4210
3920
  unrecognizedObjectKeys: "passthrough",
4211
3921
  allowUnrecognizedUnionMembers: true,
4212
3922
  allowUnrecognizedEnumValues: true,
@@ -4227,9 +3937,7 @@ var RivetClient = class {
4227
3937
  body: _response.error.rawBody
4228
3938
  });
4229
3939
  case "timeout":
4230
- throw new RivetTimeoutError(
4231
- "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4232
- );
3940
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4233
3941
  case "unknown":
4234
3942
  throw new RivetError({
4235
3943
  message: _response.error.errorMessage
@@ -4237,28 +3945,26 @@ var RivetClient = class {
4237
3945
  }
4238
3946
  }
4239
3947
  /**
4240
- * @param {string} runnerName
4241
- * @param {Rivet.RunnerConfigsUpsertRequestBody} request
3948
+ * @param {Rivet.RivetId} actorId
3949
+ * @param {Rivet.ActorsRescheduleRequest} request
4242
3950
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4243
3951
  *
4244
3952
  * @example
4245
- * await client.runnerConfigsUpsert("runner_name", {
3953
+ * await client.actorsReschedule("actor_id", {
4246
3954
  * namespace: "namespace",
4247
- * datacenters: {
4248
- * "key": {}
4249
- * }
4250
3955
  * })
4251
3956
  */
4252
- async runnerConfigsUpsert(runnerName, request, requestOptions) {
4253
- const { namespace, ..._body } = request;
3957
+ async actorsReschedule(actorId, request, requestOptions) {
3958
+ const { namespace } = request;
4254
3959
  const _queryParams = {};
4255
- _queryParams["namespace"] = namespace;
3960
+ if (namespace != null)
3961
+ _queryParams["namespace"] = namespace;
4256
3962
  const _response = await (this._options.fetcher ?? fetcher)({
4257
- url: (0, import_url_join7.default)(
3963
+ url: (0, import_url_join6.default)(
4258
3964
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4259
- `runner-configs/${encodeURIComponent(runnerName)}`
3965
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4260
3966
  ),
4261
- method: "PUT",
3967
+ method: "POST",
4262
3968
  headers: {
4263
3969
  Authorization: await this._getAuthorizationHeader(),
4264
3970
  "X-Fern-Language": "JavaScript",
@@ -4269,13 +3975,12 @@ var RivetClient = class {
4269
3975
  contentType: "application/json",
4270
3976
  queryParameters: _queryParams,
4271
3977
  requestType: "json",
4272
- body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4273
3978
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4274
3979
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4275
3980
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4276
3981
  });
4277
3982
  if (_response.ok) {
4278
- return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
3983
+ return ActorsRescheduleResponse.parseOrThrow(_response.body, {
4279
3984
  unrecognizedObjectKeys: "passthrough",
4280
3985
  allowUnrecognizedUnionMembers: true,
4281
3986
  allowUnrecognizedEnumValues: true,
@@ -4296,7 +4001,7 @@ var RivetClient = class {
4296
4001
  body: _response.error.rawBody
4297
4002
  });
4298
4003
  case "timeout":
4299
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
4004
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
4300
4005
  case "unknown":
4301
4006
  throw new RivetError({
4302
4007
  message: _response.error.errorMessage
@@ -4304,25 +4009,26 @@ var RivetClient = class {
4304
4009
  }
4305
4010
  }
4306
4011
  /**
4307
- * @param {string} runnerName
4308
- * @param {Rivet.RunnerConfigsDeleteRequest} request
4012
+ * @param {Rivet.RivetId} actorId
4013
+ * @param {Rivet.ActorsSleepRequest} request
4309
4014
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4310
4015
  *
4311
4016
  * @example
4312
- * await client.runnerConfigsDelete("runner_name", {
4313
- * namespace: "namespace"
4017
+ * await client.actorsSleep("actor_id", {
4018
+ * namespace: "namespace",
4314
4019
  * })
4315
4020
  */
4316
- async runnerConfigsDelete(runnerName, request, requestOptions) {
4021
+ async actorsSleep(actorId, request, requestOptions) {
4317
4022
  const { namespace } = request;
4318
4023
  const _queryParams = {};
4319
- _queryParams["namespace"] = namespace;
4024
+ if (namespace != null)
4025
+ _queryParams["namespace"] = namespace;
4320
4026
  const _response = await (this._options.fetcher ?? fetcher)({
4321
- url: (0, import_url_join7.default)(
4027
+ url: (0, import_url_join6.default)(
4322
4028
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4323
- `runner-configs/${encodeURIComponent(runnerName)}`
4029
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4324
4030
  ),
4325
- method: "DELETE",
4031
+ method: "POST",
4326
4032
  headers: {
4327
4033
  Authorization: await this._getAuthorizationHeader(),
4328
4034
  "X-Fern-Language": "JavaScript",
@@ -4338,7 +4044,7 @@ var RivetClient = class {
4338
4044
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4339
4045
  });
4340
4046
  if (_response.ok) {
4341
- return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4047
+ return ActorsSleepResponse.parseOrThrow(_response.body, {
4342
4048
  unrecognizedObjectKeys: "passthrough",
4343
4049
  allowUnrecognizedUnionMembers: true,
4344
4050
  allowUnrecognizedEnumValues: true,
@@ -4359,9 +4065,7 @@ var RivetClient = class {
4359
4065
  body: _response.error.rawBody
4360
4066
  });
4361
4067
  case "timeout":
4362
- throw new RivetTimeoutError(
4363
- "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4364
- );
4068
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
4365
4069
  case "unknown":
4366
4070
  throw new RivetError({
4367
4071
  message: _response.error.errorMessage
@@ -4369,26 +4073,27 @@ var RivetClient = class {
4369
4073
  }
4370
4074
  }
4371
4075
  /**
4372
- * @param {string} runnerName
4373
- * @param {Rivet.RunnerConfigsRefreshMetadataRequest} request
4076
+ * Forks an actor: creates a new actor in the same namespace, with the source's name and pool,
4077
+ * whose database is a copy of the source's, and starts it.
4078
+ *
4079
+ * @param {Rivet.RivetId} actorId
4080
+ * @param {Rivet.ActorsForkRequest} request
4374
4081
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4375
4082
  *
4376
4083
  * @example
4377
- * await client.runnerConfigsRefreshMetadata("runner_name", {
4084
+ * await client.actorsFork("actor_id", {
4378
4085
  * namespace: "namespace",
4379
- * body: {
4380
- * "key": "value"
4381
- * }
4382
4086
  * })
4383
4087
  */
4384
- async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4385
- const { namespace, body: _body } = request;
4088
+ async actorsFork(actorId, request, requestOptions) {
4089
+ const { namespace, ..._body } = request;
4386
4090
  const _queryParams = {};
4387
- _queryParams["namespace"] = namespace;
4091
+ if (namespace != null)
4092
+ _queryParams["namespace"] = namespace;
4388
4093
  const _response = await (this._options.fetcher ?? fetcher)({
4389
- url: (0, import_url_join7.default)(
4094
+ url: (0, import_url_join6.default)(
4390
4095
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4391
- `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4096
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/fork`
4392
4097
  ),
4393
4098
  method: "POST",
4394
4099
  headers: {
@@ -4401,15 +4106,13 @@ var RivetClient = class {
4401
4106
  contentType: "application/json",
4402
4107
  queryParameters: _queryParams,
4403
4108
  requestType: "json",
4404
- body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4405
- unrecognizedObjectKeys: "strip"
4406
- }),
4109
+ body: ActorsForkRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4407
4110
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4408
4111
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4409
4112
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4410
4113
  });
4411
4114
  if (_response.ok) {
4412
- return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4115
+ return ActorsForkResponse.parseOrThrow(_response.body, {
4413
4116
  unrecognizedObjectKeys: "passthrough",
4414
4117
  allowUnrecognizedUnionMembers: true,
4415
4118
  allowUnrecognizedEnumValues: true,
@@ -4430,9 +4133,7 @@ var RivetClient = class {
4430
4133
  body: _response.error.rawBody
4431
4134
  });
4432
4135
  case "timeout":
4433
- throw new RivetTimeoutError(
4434
- "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4435
- );
4136
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/fork.");
4436
4137
  case "unknown":
4437
4138
  throw new RivetError({
4438
4139
  message: _response.error.errorMessage