@rivetkit/engine-api-full 0.0.0-fix-get-or-create-w.e73872b → 0.0.0-fix-envoy-late-frames.5b6e1bd

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 (206) hide show
  1. package/dist/browser/cjs/index.js +551 -890
  2. package/dist/browser/cjs/package.json +3 -0
  3. package/dist/browser/cjs/serialization.js +155 -327
  4. package/dist/browser/esm/index.js +551 -890
  5. package/dist/browser/esm/package.json +3 -0
  6. package/dist/browser/esm/serialization.js +155 -327
  7. package/dist/node/cjs/index.js +551 -890
  8. package/dist/node/cjs/package.json +3 -0
  9. package/dist/node/cjs/serialization.js +175 -364
  10. package/dist/node/esm/index.js +551 -890
  11. package/dist/node/esm/package.json +3 -0
  12. package/dist/node/esm/serialization.js +155 -327
  13. package/package.json +3 -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 -12
  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 -35
  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 -12
  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 -35
  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 -11
  144. package/types/api/types/RunnerConfigKind.d.ts +0 -5
  145. package/types/api/types/RunnerConfigKindNormal.d.ts +0 -7
  146. package/types/api/types/RunnerConfigKindNormalNormal.d.ts +0 -12
  147. package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
  148. package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -29
  149. package/types/api/types/RunnerConfigNormal.d.ts +0 -12
  150. package/types/api/types/RunnerConfigResponse.d.ts +0 -8
  151. package/types/api/types/RunnerConfigServerless.d.ts +0 -29
  152. package/types/api/types/RunnerConfigVariant.d.ts +0 -8
  153. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +0 -4
  154. package/types/api/types/RunnerConfigsListResponse.d.ts +0 -8
  155. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -7
  156. package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -4
  157. package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -4
  158. package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -5
  159. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -7
  160. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -7
  161. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -7
  162. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -6
  163. package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +0 -16
  164. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +0 -6
  165. package/types/api/types/RunnersListNamesResponse.d.ts +0 -8
  166. package/types/api/types/RunnersListResponse.d.ts +0 -8
  167. package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -13
  168. package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -13
  169. package/types/serialization/types/ActorsKvGetResponse.d.ts +0 -13
  170. package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +0 -10
  171. package/types/serialization/types/ActorsSleepRequestBody.d.ts +0 -10
  172. package/types/serialization/types/CrashPolicy.d.ts +0 -10
  173. package/types/serialization/types/DatacenterHealth.d.ts +0 -19
  174. package/types/serialization/types/Envoy.d.ts +0 -24
  175. package/types/serialization/types/EnvoysListResponse.d.ts +0 -15
  176. package/types/serialization/types/HealthFanoutResponse.d.ts +0 -13
  177. package/types/serialization/types/HealthResponse.d.ts +0 -14
  178. package/types/serialization/types/HealthStatus.d.ts +0 -10
  179. package/types/serialization/types/Runner.d.ts +0 -27
  180. package/types/serialization/types/RunnerConfig.d.ts +0 -17
  181. package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
  182. package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -13
  183. package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +0 -15
  184. package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
  185. package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -25
  186. package/types/serialization/types/RunnerConfigNormal.d.ts +0 -15
  187. package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
  188. package/types/serialization/types/RunnerConfigServerless.d.ts +0 -25
  189. package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
  190. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
  191. package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
  192. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
  193. package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
  194. package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
  195. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
  196. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
  197. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
  198. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
  199. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
  200. package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
  201. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
  202. package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
  203. package/types/serialization/types/RunnersListResponse.d.ts +0 -15
  204. /package/types/api/resources/{envoys → authTokens}/index.d.ts +0 -0
  205. /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
  206. /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,84 +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
- RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
2386
- RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2387
- RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2388
- RunnerConfigNormal: () => RunnerConfigNormal,
2389
- RunnerConfigResponse: () => RunnerConfigResponse,
2390
- RunnerConfigServerless: () => RunnerConfigServerless,
2391
- RunnerConfigVariant: () => RunnerConfigVariant2,
2392
- RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2393
- RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2394
- RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2395
- RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2396
- RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2397
- RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2398
- RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2399
- RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2400
- RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2401
- RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2402
- RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2403
- RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2404
- RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2405
- RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2406
- RunnersListNamesResponse: () => RunnersListNamesResponse,
2407
- RunnersListResponse: () => RunnersListResponse,
2408
- namespaces: () => namespaces_exports2
2370
+ namespaces: () => namespaces_exports
2409
2371
  });
2410
2372
 
2411
2373
  // src/serialization/types/RivetId.ts
2412
2374
  var RivetId = schemas_exports.string();
2413
2375
 
2414
- // src/serialization/types/CrashPolicy.ts
2415
- var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2416
-
2417
2376
  // src/serialization/types/Actor.ts
2418
2377
  var Actor = schemas_exports.object({
2419
2378
  actorId: schemas_exports.property("actor_id", RivetId),
2420
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2421
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2422
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2423
- datacenter: schemas_exports.string(),
2424
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2425
- error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2426
- key: schemas_exports.string().optional(),
2427
2379
  name: schemas_exports.string(),
2428
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2429
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2430
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2431
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2432
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2433
- 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())
2434
2391
  });
2435
2392
 
2436
2393
  // src/serialization/types/ActorName.ts
@@ -2440,11 +2397,17 @@ var ActorName = schemas_exports.object({
2440
2397
 
2441
2398
  // src/serialization/types/ActorsCreateResponse.ts
2442
2399
  var ActorsCreateResponse = schemas_exports.object({
2443
- actor: Actor
2400
+ actor: Actor,
2401
+ created: schemas_exports.boolean()
2444
2402
  });
2445
2403
 
2446
2404
  // src/serialization/types/ActorsDeleteResponse.ts
2447
- 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
+ });
2448
2411
 
2449
2412
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2450
2413
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2452,21 +2415,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2452
2415
  created: schemas_exports.boolean()
2453
2416
  });
2454
2417
 
2455
- // src/serialization/types/ActorsKvGetResponse.ts
2456
- var ActorsKvGetResponse = schemas_exports.object({
2457
- updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2458
- value: schemas_exports.string()
2459
- });
2460
-
2461
- // src/serialization/types/Pagination.ts
2462
- var Pagination = schemas_exports.object({
2463
- cursor: schemas_exports.string().optional()
2418
+ // src/serialization/types/ActorsGetResponse.ts
2419
+ var ActorsGetResponse = schemas_exports.object({
2420
+ actor: Actor
2464
2421
  });
2465
2422
 
2466
2423
  // src/serialization/types/ActorsListNamesResponse.ts
2467
2424
  var ActorsListNamesResponse = schemas_exports.object({
2468
- names: schemas_exports.record(schemas_exports.string(), ActorName),
2469
- 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()
2470
2431
  });
2471
2432
 
2472
2433
  // src/serialization/types/ActorsListResponse.ts
@@ -2475,98 +2436,98 @@ var ActorsListResponse = schemas_exports.object({
2475
2436
  pagination: Pagination
2476
2437
  });
2477
2438
 
2478
- // src/serialization/types/ActorsRescheduleRequestBody.ts
2479
- var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2480
-
2481
2439
  // src/serialization/types/ActorsRescheduleResponse.ts
2482
- var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2483
-
2484
- // src/serialization/types/ActorsSleepRequestBody.ts
2485
- var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2440
+ var ActorsRescheduleResponse = schemas_exports.object({});
2486
2441
 
2487
2442
  // src/serialization/types/ActorsSleepResponse.ts
2488
- var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2443
+ var ActorsSleepResponse = schemas_exports.object({});
2489
2444
 
2490
- // src/serialization/types/Datacenter.ts
2491
- var Datacenter = schemas_exports.object({
2492
- label: schemas_exports.number(),
2493
- name: schemas_exports.string(),
2494
- 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())
2495
2461
  });
2496
2462
 
2497
- // src/serialization/types/HealthResponse.ts
2498
- var HealthResponse = schemas_exports.object({
2499
- runtime: schemas_exports.string(),
2500
- status: schemas_exports.string(),
2501
- 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)
2502
2468
  });
2503
2469
 
2504
- // src/serialization/types/HealthStatus.ts
2505
- 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
+ });
2506
2478
 
2507
- // src/serialization/types/DatacenterHealth.ts
2508
- var DatacenterHealth = schemas_exports.object({
2509
- datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2510
- datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2511
- error: schemas_exports.string().optional(),
2512
- response: HealthResponse.optional(),
2513
- rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2514
- status: HealthStatus2
2479
+ // src/serialization/types/Datacenter.ts
2480
+ var Datacenter = schemas_exports.object({
2481
+ name: schemas_exports.string()
2515
2482
  });
2516
2483
 
2517
2484
  // src/serialization/types/DatacentersListResponse.ts
2518
2485
  var DatacentersListResponse = schemas_exports.object({
2519
- datacenters: schemas_exports.list(Datacenter),
2520
- pagination: Pagination
2486
+ datacenters: schemas_exports.list(Datacenter)
2521
2487
  });
2522
2488
 
2523
- // src/serialization/types/Envoy.ts
2524
- var Envoy = schemas_exports.object({
2525
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2526
- datacenter: schemas_exports.string(),
2527
- envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2528
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2529
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2530
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2531
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2532
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2533
- poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2534
- slots: schemas_exports.number(),
2535
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2536
- 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()
2537
2495
  });
2538
2496
 
2539
- // src/serialization/types/EnvoysListResponse.ts
2540
- var EnvoysListResponse = schemas_exports.object({
2541
- envoys: schemas_exports.list(Envoy),
2542
- 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()
2543
2503
  });
2544
2504
 
2545
- // src/serialization/types/HealthFanoutResponse.ts
2546
- var HealthFanoutResponse = schemas_exports.object({
2547
- 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())
2548
2513
  });
2549
2514
 
2550
- // src/serialization/types/MetadataGetResponse.ts
2551
- var MetadataGetResponse = schemas_exports.object({
2552
- buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2553
- cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2554
- cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2555
- envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
2556
- epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
2557
- gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2558
- runtime: schemas_exports.string(),
2559
- rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2560
- rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2561
- 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()
2562
2520
  });
2563
2521
 
2564
2522
  // src/serialization/types/Namespace.ts
2565
2523
  var Namespace = schemas_exports.object({
2566
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2567
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2568
2524
  name: schemas_exports.string(),
2569
- 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())
2570
2531
  });
2571
2532
 
2572
2533
  // src/serialization/types/NamespaceListResponse.ts
@@ -2580,244 +2541,87 @@ var NamespacesCreateResponse = schemas_exports.object({
2580
2541
  namespace: Namespace
2581
2542
  });
2582
2543
 
2583
- // src/serialization/types/Runner.ts
2584
- var Runner = schemas_exports.object({
2585
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2586
- datacenter: schemas_exports.string(),
2587
- drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2588
- key: schemas_exports.string(),
2589
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2590
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2591
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2592
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2593
- name: schemas_exports.string(),
2594
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2595
- remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2596
- runnerId: schemas_exports.property("runner_id", RivetId),
2597
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2598
- totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2599
- version: schemas_exports.number()
2600
- });
2601
-
2602
- // src/serialization/types/RunnerConfigNormal.ts
2603
- var RunnerConfigNormal = schemas_exports.object({
2604
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2605
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2606
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2607
- drainOnVersionUpgrade: schemas_exports.property(
2608
- "drain_on_version_upgrade",
2609
- schemas_exports.boolean().optional()
2610
- )
2611
- });
2612
-
2613
- // src/serialization/types/RunnerConfigServerless.ts
2614
- var RunnerConfigServerless = schemas_exports.object({
2615
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2616
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2617
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2618
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2619
- drainOnVersionUpgrade: schemas_exports.property(
2620
- "drain_on_version_upgrade",
2621
- schemas_exports.boolean().optional()
2622
- ),
2623
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2624
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2625
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2626
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2627
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2628
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2629
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2630
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2631
- url: schemas_exports.string()
2632
- });
2633
-
2634
- // src/serialization/types/RunnerConfig.ts
2635
- var RunnerConfig = schemas_exports.object({
2636
- normal: RunnerConfigNormal.optional(),
2637
- serverless: RunnerConfigServerless.optional(),
2638
- drainOnVersionUpgrade: schemas_exports.property(
2639
- "drain_on_version_upgrade",
2640
- schemas_exports.boolean().optional()
2641
- ),
2642
- metadata: schemas_exports.unknown().optional()
2643
- });
2644
-
2645
- // src/serialization/types/RunnerConfigKindNormalNormal.ts
2646
- var RunnerConfigKindNormalNormal = schemas_exports.object({
2647
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2648
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2649
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2650
- drainOnVersionUpgrade: schemas_exports.property(
2651
- "drain_on_version_upgrade",
2652
- schemas_exports.boolean().optional()
2653
- )
2654
- });
2655
-
2656
- // src/serialization/types/RunnerConfigKindNormal.ts
2657
- var RunnerConfigKindNormal = schemas_exports.object({
2658
- normal: RunnerConfigKindNormalNormal
2659
- });
2660
-
2661
- // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2662
- var RunnerConfigKindServerlessServerless = schemas_exports.object({
2663
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2664
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2665
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2666
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2667
- drainOnVersionUpgrade: schemas_exports.property(
2668
- "drain_on_version_upgrade",
2669
- schemas_exports.boolean().optional()
2670
- ),
2671
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2672
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2673
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2674
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2675
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2676
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2677
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2678
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2679
- url: schemas_exports.string()
2680
- });
2681
-
2682
- // src/serialization/types/RunnerConfigKindServerless.ts
2683
- var RunnerConfigKindServerless = schemas_exports.object({
2684
- serverless: RunnerConfigKindServerlessServerless
2685
- });
2686
-
2687
- // src/serialization/types/RunnerConfigKind.ts
2688
- var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2689
-
2690
- // src/serialization/types/RunnerConfigResponse.ts
2691
- var RunnerConfigResponse = schemas_exports.object({
2692
- protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2693
- runnerPoolError: schemas_exports.property(
2694
- "runner_pool_error",
2695
- schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2696
- )
2697
- }).extend(RunnerConfig);
2698
-
2699
- // src/serialization/types/RunnerConfigVariant.ts
2700
- var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2701
-
2702
- // src/serialization/types/RunnerConfigsDeleteResponse.ts
2703
- var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2704
-
2705
- // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2706
- var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2707
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2708
- });
2709
-
2710
- // src/serialization/types/RunnerConfigsListResponse.ts
2711
- var RunnerConfigsListResponse = schemas_exports.object({
2712
- pagination: Pagination,
2713
- runnerConfigs: schemas_exports.property(
2714
- "runner_configs",
2715
- schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2716
- )
2717
- });
2718
-
2719
- // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2720
- var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2721
-
2722
- // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2723
- var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2724
-
2725
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2726
- var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2727
- version: schemas_exports.string()
2728
- });
2729
-
2730
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2731
- var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2732
- success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2544
+ // src/serialization/types/NamespacesArchiveResponse.ts
2545
+ var NamespacesArchiveResponse = schemas_exports.object({
2546
+ namespace: Namespace
2733
2547
  });
2734
2548
 
2735
- // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2736
- var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2737
- details: schemas_exports.string().optional(),
2738
- message: schemas_exports.string(),
2739
- 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()
2740
2560
  });
2741
2561
 
2742
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2743
- var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2744
- 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()
2745
2570
  });
2746
2571
 
2747
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2748
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2749
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2572
+ // src/serialization/types/PoolResponse.ts
2573
+ var PoolResponse = schemas_exports.object({
2574
+ pool: Pool
2750
2575
  });
2751
2576
 
2752
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2753
- var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2754
- RunnerConfigsServerlessHealthCheckResponseSuccess,
2755
- RunnerConfigsServerlessHealthCheckResponseFailure
2756
- ]);
2757
-
2758
- // src/serialization/types/RunnerConfigsUpsertResponse.ts
2759
- var RunnerConfigsUpsertResponse = schemas_exports.object({
2760
- endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2761
- });
2577
+ // src/serialization/types/PoolsDeleteResponse.ts
2578
+ var PoolsDeleteResponse = schemas_exports.object({});
2762
2579
 
2763
- // src/serialization/types/RunnersListNamesResponse.ts
2764
- var RunnersListNamesResponse = schemas_exports.object({
2765
- 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),
2766
2583
  pagination: Pagination
2767
2584
  });
2768
2585
 
2769
- // src/serialization/types/RunnersListResponse.ts
2770
- var RunnersListResponse = schemas_exports.object({
2586
+ // src/serialization/types/PoolsListResponse.ts
2587
+ var PoolsListResponse = schemas_exports.object({
2771
2588
  pagination: Pagination,
2772
- runners: schemas_exports.list(Runner)
2589
+ pools: schemas_exports.list(Pool)
2773
2590
  });
2774
2591
 
2775
2592
  // src/serialization/client/requests/ActorsCreateRequest.ts
2776
2593
  var ActorsCreateRequest = schemas_exports.object({
2777
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2778
- datacenter: schemas_exports.string().optional(),
2779
2594
  input: schemas_exports.string().optional(),
2780
2595
  key: schemas_exports.string().optional(),
2781
2596
  name: schemas_exports.string(),
2782
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2597
+ pool: schemas_exports.string().optional()
2783
2598
  });
2784
2599
 
2785
2600
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2786
2601
  var ActorsGetOrCreateRequest = schemas_exports.object({
2787
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2788
- datacenter: schemas_exports.string().optional(),
2789
2602
  input: schemas_exports.string().optional(),
2790
- key: schemas_exports.string(),
2603
+ key: schemas_exports.string().optional(),
2791
2604
  name: schemas_exports.string(),
2792
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2793
- });
2794
-
2795
- // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2796
- var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2797
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2798
- url: schemas_exports.string()
2605
+ pool: schemas_exports.string().optional()
2799
2606
  });
2800
2607
 
2801
- // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2802
- var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2803
- 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()
2804
2612
  });
2805
2613
 
2806
2614
  // src/serialization/resources/namespaces/index.ts
2807
- var namespaces_exports2 = {};
2808
- __export(namespaces_exports2, {
2615
+ var namespaces_exports = {};
2616
+ __export(namespaces_exports, {
2809
2617
  NamespacesCreateRequest: () => NamespacesCreateRequest
2810
2618
  });
2811
2619
 
2812
2620
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2813
2621
  var NamespacesCreateRequest = schemas_exports.object({
2814
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2815
2622
  name: schemas_exports.string()
2816
2623
  });
2817
2624
 
2818
- // src/Client.ts
2819
- var import_url_join7 = __toESM(require("url-join"));
2820
-
2821
2625
  // src/errors/RivetError.ts
2822
2626
  var RivetError = class _RivetError extends Error {
2823
2627
  statusCode;
@@ -2859,25 +2663,18 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2859
2663
  }
2860
2664
  };
2861
2665
 
2862
- // src/api/resources/datacenters/client/Client.ts
2863
- var import_url_join = __toESM(require("url-join"));
2864
- var Datacenters = class {
2666
+ // src/api/resources/authTokens/client/Client.ts
2667
+ var AuthTokens = class {
2865
2668
  constructor(_options) {
2866
2669
  this._options = _options;
2867
2670
  }
2868
- /**
2869
- * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
2870
- *
2871
- * @example
2872
- * await client.datacenters.list()
2873
- */
2874
- async list(requestOptions) {
2671
+ async create(request, requestOptions) {
2875
2672
  const _response = await (this._options.fetcher ?? fetcher)({
2876
2673
  url: (0, import_url_join.default)(
2877
2674
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2878
- "datacenters"
2675
+ "auth/tokens"
2879
2676
  ),
2880
- method: "GET",
2677
+ method: "POST",
2881
2678
  headers: {
2882
2679
  Authorization: await this._getAuthorizationHeader(),
2883
2680
  "X-Fern-Language": "JavaScript",
@@ -2887,12 +2684,18 @@ var Datacenters = class {
2887
2684
  },
2888
2685
  contentType: "application/json",
2889
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
+ },
2890
2693
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2891
2694
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2892
2695
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2893
2696
  });
2894
2697
  if (_response.ok) {
2895
- return DatacentersListResponse.parseOrThrow(_response.body, {
2698
+ return AuthTokenCreateResponse.parseOrThrow(_response.body, {
2896
2699
  unrecognizedObjectKeys: "passthrough",
2897
2700
  allowUnrecognizedUnionMembers: true,
2898
2701
  allowUnrecognizedEnumValues: true,
@@ -2913,57 +2716,18 @@ var Datacenters = class {
2913
2716
  body: _response.error.rawBody
2914
2717
  });
2915
2718
  case "timeout":
2916
- throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
2719
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /auth/tokens.");
2917
2720
  case "unknown":
2918
2721
  throw new RivetError({
2919
2722
  message: _response.error.errorMessage
2920
2723
  });
2921
2724
  }
2922
2725
  }
2923
- async _getAuthorizationHeader() {
2924
- return `Bearer ${await Supplier.get(this._options.token)}`;
2925
- }
2926
- };
2927
-
2928
- // src/api/resources/envoys/client/Client.ts
2929
- var import_url_join2 = __toESM(require("url-join"));
2930
- var Envoys = class {
2931
- constructor(_options) {
2932
- this._options = _options;
2933
- }
2934
- /**
2935
- * @param {Rivet.EnvoysListRequest} request
2936
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2937
- *
2938
- * @example
2939
- * await client.envoys.list({
2940
- * namespace: "namespace"
2941
- * })
2942
- */
2943
- async list(request, requestOptions) {
2944
- const { namespace, name, envoyKey, limit, cursor } = request;
2945
- const _queryParams = {};
2946
- _queryParams["namespace"] = namespace;
2947
- if (name != null) {
2948
- _queryParams["name"] = name;
2949
- }
2950
- if (envoyKey != null) {
2951
- if (Array.isArray(envoyKey)) {
2952
- _queryParams["envoy_key"] = envoyKey.map((item) => item);
2953
- } else {
2954
- _queryParams["envoy_key"] = envoyKey;
2955
- }
2956
- }
2957
- if (limit != null) {
2958
- _queryParams["limit"] = limit.toString();
2959
- }
2960
- if (cursor != null) {
2961
- _queryParams["cursor"] = cursor;
2962
- }
2726
+ async inspect(requestOptions) {
2963
2727
  const _response = await (this._options.fetcher ?? fetcher)({
2964
- url: (0, import_url_join2.default)(
2728
+ url: (0, import_url_join.default)(
2965
2729
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2966
- "envoys"
2730
+ "auth/tokens/inspect"
2967
2731
  ),
2968
2732
  method: "GET",
2969
2733
  headers: {
@@ -2974,14 +2738,13 @@ var Envoys = class {
2974
2738
  ...requestOptions == null ? void 0 : requestOptions.headers
2975
2739
  },
2976
2740
  contentType: "application/json",
2977
- queryParameters: _queryParams,
2978
2741
  requestType: "json",
2979
2742
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2980
2743
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2981
2744
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2982
2745
  });
2983
2746
  if (_response.ok) {
2984
- return EnvoysListResponse.parseOrThrow(_response.body, {
2747
+ return AuthTokenInspectResponse.parseOrThrow(_response.body, {
2985
2748
  unrecognizedObjectKeys: "passthrough",
2986
2749
  allowUnrecognizedUnionMembers: true,
2987
2750
  allowUnrecognizedEnumValues: true,
@@ -3002,7 +2765,7 @@ var Envoys = class {
3002
2765
  body: _response.error.rawBody
3003
2766
  });
3004
2767
  case "timeout":
3005
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2768
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /auth/tokens/inspect.");
3006
2769
  case "unknown":
3007
2770
  throw new RivetError({
3008
2771
  message: _response.error.errorMessage
@@ -3014,23 +2777,38 @@ var Envoys = class {
3014
2777
  }
3015
2778
  };
3016
2779
 
3017
- // src/api/resources/health/client/Client.ts
3018
- var import_url_join3 = __toESM(require("url-join"));
3019
- 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 {
3020
2798
  constructor(_options) {
3021
2799
  this._options = _options;
3022
2800
  }
3023
2801
  /**
3024
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2802
+ * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
3025
2803
  *
3026
2804
  * @example
3027
- * await client.health.fanout()
2805
+ * await client.datacenters.list()
3028
2806
  */
3029
- async fanout(requestOptions) {
2807
+ async list(requestOptions) {
3030
2808
  const _response = await (this._options.fetcher ?? fetcher)({
3031
- url: (0, import_url_join3.default)(
2809
+ url: (0, import_url_join2.default)(
3032
2810
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3033
- "health/fanout"
2811
+ "datacenters"
3034
2812
  ),
3035
2813
  method: "GET",
3036
2814
  headers: {
@@ -3047,7 +2825,7 @@ var Health = class {
3047
2825
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3048
2826
  });
3049
2827
  if (_response.ok) {
3050
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2828
+ return DatacentersListResponse.parseOrThrow(_response.body, {
3051
2829
  unrecognizedObjectKeys: "passthrough",
3052
2830
  allowUnrecognizedUnionMembers: true,
3053
2831
  allowUnrecognizedEnumValues: true,
@@ -3068,7 +2846,7 @@ var Health = class {
3068
2846
  body: _response.error.rawBody
3069
2847
  });
3070
2848
  case "timeout":
3071
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2849
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
3072
2850
  case "unknown":
3073
2851
  throw new RivetError({
3074
2852
  message: _response.error.errorMessage
@@ -3081,7 +2859,7 @@ var Health = class {
3081
2859
  };
3082
2860
 
3083
2861
  // src/api/resources/metadata/client/Client.ts
3084
- var import_url_join4 = __toESM(require("url-join"));
2862
+ var import_url_join3 = __toESM(require("url-join"));
3085
2863
  var Metadata = class {
3086
2864
  constructor(_options) {
3087
2865
  this._options = _options;
@@ -3094,7 +2872,7 @@ var Metadata = class {
3094
2872
  */
3095
2873
  async get(requestOptions) {
3096
2874
  const _response = await (this._options.fetcher ?? fetcher)({
3097
- url: (0, import_url_join4.default)(
2875
+ url: (0, import_url_join3.default)(
3098
2876
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3099
2877
  "metadata"
3100
2878
  ),
@@ -3147,7 +2925,7 @@ var Metadata = class {
3147
2925
  };
3148
2926
 
3149
2927
  // src/api/resources/namespaces/client/Client.ts
3150
- var import_url_join5 = __toESM(require("url-join"));
2928
+ var import_url_join4 = __toESM(require("url-join"));
3151
2929
  var Namespaces = class {
3152
2930
  constructor(_options) {
3153
2931
  this._options = _options;
@@ -3160,7 +2938,7 @@ var Namespaces = class {
3160
2938
  * await client.namespaces.list()
3161
2939
  */
3162
2940
  async list(request = {}, requestOptions) {
3163
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
2941
+ const { limit, cursor, name } = request;
3164
2942
  const _queryParams = {};
3165
2943
  if (limit != null) {
3166
2944
  _queryParams["limit"] = limit.toString();
@@ -3171,20 +2949,8 @@ var Namespaces = class {
3171
2949
  if (name != null) {
3172
2950
  _queryParams["name"] = name;
3173
2951
  }
3174
- if (namespaceIds != null) {
3175
- _queryParams["namespace_ids"] = namespaceIds;
3176
- }
3177
- if (namespaceId != null) {
3178
- if (Array.isArray(namespaceId)) {
3179
- _queryParams["namespace_id"] = namespaceId.map(
3180
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3181
- );
3182
- } else {
3183
- _queryParams["namespace_id"] = namespaceId;
3184
- }
3185
- }
3186
2952
  const _response = await (this._options.fetcher ?? fetcher)({
3187
- url: (0, import_url_join5.default)(
2953
+ url: (0, import_url_join4.default)(
3188
2954
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3189
2955
  "namespaces"
3190
2956
  ),
@@ -3238,13 +3004,14 @@ var Namespaces = class {
3238
3004
  *
3239
3005
  * @example
3240
3006
  * await client.namespaces.create({
3241
- * displayName: "display_name",
3242
3007
  * name: "name"
3243
3008
  * })
3244
3009
  */
3245
3010
  async create(request, requestOptions) {
3011
+ const _body = request;
3012
+ const _queryParams = {};
3246
3013
  const _response = await (this._options.fetcher ?? fetcher)({
3247
- url: (0, import_url_join5.default)(
3014
+ url: (0, import_url_join4.default)(
3248
3015
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3249
3016
  "namespaces"
3250
3017
  ),
@@ -3257,8 +3024,9 @@ var Namespaces = class {
3257
3024
  ...requestOptions == null ? void 0 : requestOptions.headers
3258
3025
  },
3259
3026
  contentType: "application/json",
3027
+ queryParameters: _queryParams,
3260
3028
  requestType: "json",
3261
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3029
+ body: NamespacesCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3262
3030
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3263
3031
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3264
3032
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3292,60 +3060,24 @@ var Namespaces = class {
3292
3060
  });
3293
3061
  }
3294
3062
  }
3295
- async _getAuthorizationHeader() {
3296
- return `Bearer ${await Supplier.get(this._options.token)}`;
3297
- }
3298
- };
3299
-
3300
- // src/api/resources/runners/client/Client.ts
3301
- var import_url_join6 = __toESM(require("url-join"));
3302
- var Runners = class {
3303
- constructor(_options) {
3304
- this._options = _options;
3305
- }
3306
3063
  /**
3307
- * @param {Rivet.RunnersListRequest} request
3308
- * @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.
3309
3070
  *
3310
3071
  * @example
3311
- * await client.runners.list({
3312
- * namespace: "namespace"
3313
- * })
3072
+ * await client.namespaces.archive("staging")
3314
3073
  */
3315
- async list(request, requestOptions) {
3316
- const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3317
- const _queryParams = {};
3318
- _queryParams["namespace"] = namespace;
3319
- if (name != null) {
3320
- _queryParams["name"] = name;
3321
- }
3322
- if (runnerIds != null) {
3323
- _queryParams["runner_ids"] = runnerIds;
3324
- }
3325
- if (runnerId != null) {
3326
- if (Array.isArray(runnerId)) {
3327
- _queryParams["runner_id"] = runnerId.map(
3328
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3329
- );
3330
- } else {
3331
- _queryParams["runner_id"] = runnerId;
3332
- }
3333
- }
3334
- if (includeStopped != null) {
3335
- _queryParams["include_stopped"] = includeStopped.toString();
3336
- }
3337
- if (limit != null) {
3338
- _queryParams["limit"] = limit.toString();
3339
- }
3340
- if (cursor != null) {
3341
- _queryParams["cursor"] = cursor;
3342
- }
3074
+ async archive(name, requestOptions) {
3343
3075
  const _response = await (this._options.fetcher ?? fetcher)({
3344
- url: (0, import_url_join6.default)(
3076
+ url: (0, import_url_join4.default)(
3345
3077
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3346
- "runners"
3078
+ `namespaces/${encodeURIComponent(name)}/archive`
3347
3079
  ),
3348
- method: "GET",
3080
+ method: "POST",
3349
3081
  headers: {
3350
3082
  Authorization: await this._getAuthorizationHeader(),
3351
3083
  "X-Fern-Language": "JavaScript",
@@ -3354,14 +3086,13 @@ var Runners = class {
3354
3086
  ...requestOptions == null ? void 0 : requestOptions.headers
3355
3087
  },
3356
3088
  contentType: "application/json",
3357
- queryParameters: _queryParams,
3358
3089
  requestType: "json",
3359
3090
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3360
3091
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3361
3092
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3362
3093
  });
3363
3094
  if (_response.ok) {
3364
- return RunnersListResponse.parseOrThrow(_response.body, {
3095
+ return NamespacesArchiveResponse.parseOrThrow(_response.body, {
3365
3096
  unrecognizedObjectKeys: "passthrough",
3366
3097
  allowUnrecognizedUnionMembers: true,
3367
3098
  allowUnrecognizedEnumValues: true,
@@ -3382,31 +3113,40 @@ var Runners = class {
3382
3113
  body: _response.error.rawBody
3383
3114
  });
3384
3115
  case "timeout":
3385
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3116
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3386
3117
  case "unknown":
3387
3118
  throw new RivetError({
3388
3119
  message: _response.error.errorMessage
3389
3120
  });
3390
3121
  }
3391
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
+ }
3392
3134
  /**
3393
- * 2 round trips:
3135
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
3394
3136
  *
3395
- * - GET /runners/names (fanout)
3396
- * - [api-peer] namespace::ops::resolve_for_name_global
3397
- *
3398
- * @param {Rivet.RunnersListNamesRequest} request
3399
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3137
+ * @param {Rivet.PoolsListRequest} request
3138
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3400
3139
  *
3401
3140
  * @example
3402
- * await client.runners.listNames({
3141
+ * await client.pools.list({
3403
3142
  * namespace: "namespace"
3404
3143
  * })
3405
3144
  */
3406
- async listNames(request, requestOptions) {
3145
+ async list(request, requestOptions) {
3407
3146
  const { namespace, limit, cursor } = request;
3408
3147
  const _queryParams = {};
3409
- _queryParams["namespace"] = namespace;
3148
+ if (namespace != null)
3149
+ _queryParams["namespace"] = namespace;
3410
3150
  if (limit != null) {
3411
3151
  _queryParams["limit"] = limit.toString();
3412
3152
  }
@@ -3414,9 +3154,9 @@ var Runners = class {
3414
3154
  _queryParams["cursor"] = cursor;
3415
3155
  }
3416
3156
  const _response = await (this._options.fetcher ?? fetcher)({
3417
- url: (0, import_url_join6.default)(
3157
+ url: (0, import_url_join5.default)(
3418
3158
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3419
- "runners/names"
3159
+ "pools"
3420
3160
  ),
3421
3161
  method: "GET",
3422
3162
  headers: {
@@ -3434,7 +3174,7 @@ var Runners = class {
3434
3174
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3435
3175
  });
3436
3176
  if (_response.ok) {
3437
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3177
+ return PoolsListResponse.parseOrThrow(_response.body, {
3438
3178
  unrecognizedObjectKeys: "passthrough",
3439
3179
  allowUnrecognizedUnionMembers: true,
3440
3180
  allowUnrecognizedEnumValues: true,
@@ -3455,104 +3195,30 @@ var Runners = class {
3455
3195
  body: _response.error.rawBody
3456
3196
  });
3457
3197
  case "timeout":
3458
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3198
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3459
3199
  case "unknown":
3460
3200
  throw new RivetError({
3461
3201
  message: _response.error.errorMessage
3462
3202
  });
3463
3203
  }
3464
3204
  }
3465
- async _getAuthorizationHeader() {
3466
- return `Bearer ${await Supplier.get(this._options.token)}`;
3467
- }
3468
- };
3469
-
3470
- // src/Client.ts
3471
- var RivetClient = class {
3472
- constructor(_options) {
3473
- this._options = _options;
3474
- }
3475
- _datacenters;
3476
- _envoys;
3477
- _health;
3478
- _metadata;
3479
- _namespaces;
3480
- _runners;
3481
- get datacenters() {
3482
- return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3483
- }
3484
- get envoys() {
3485
- return this._envoys ?? (this._envoys = new Envoys(this._options));
3486
- }
3487
- get health() {
3488
- return this._health ?? (this._health = new Health(this._options));
3489
- }
3490
- get metadata() {
3491
- return this._metadata ?? (this._metadata = new Metadata(this._options));
3492
- }
3493
- get namespaces() {
3494
- return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3495
- }
3496
- get runners() {
3497
- return this._runners ?? (this._runners = new Runners(this._options));
3498
- }
3499
3205
  /**
3500
- * **If key is some & `include_destroyed` is false**
3501
- *
3502
- * 2 round trips:
3503
- *
3504
- * - namespace::ops::resolve_for_name_global
3505
- * - GET /actors (multiple DCs based on actor IDs)
3506
- *
3507
- * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
3508
- * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
3509
- * this means we don't need to fan out to all datacenters (like normal list does).
3510
- *
3511
- * The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
3512
- * `include_destroyed` is true, we show all previous iterations of actors with the same key.
3206
+ * Lists the live nodes of a pool in node key order.
3513
3207
  *
3514
- * **Otherwise**
3515
- *
3516
- * 2 round trips:
3517
- *
3518
- * - namespace::ops::resolve_for_name_global
3519
- * - GET /actors (fanout)
3520
- *
3521
- * ## Optimized Alternative Routes
3522
- *
3523
- * @param {Rivet.ActorsListRequest} request
3524
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3208
+ * @param {string} pool
3209
+ * @param {Rivet.PoolsListNodesRequest} request
3210
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3525
3211
  *
3526
3212
  * @example
3527
- * await client.actorsList({
3213
+ * await client.pools.listNodes("pool", {
3528
3214
  * namespace: "namespace"
3529
3215
  * })
3530
3216
  */
3531
- async actorsList(request, requestOptions) {
3532
- const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3217
+ async listNodes(pool, request, requestOptions) {
3218
+ const { namespace, limit, cursor } = request;
3533
3219
  const _queryParams = {};
3534
- _queryParams["namespace"] = namespace;
3535
- if (name != null) {
3536
- _queryParams["name"] = name;
3537
- }
3538
- if (key != null) {
3539
- _queryParams["key"] = key;
3540
- }
3541
- if (actorIds != null) {
3542
- _queryParams["actor_ids"] = actorIds;
3543
- }
3544
- if (actorId != null) {
3545
- if (Array.isArray(actorId)) {
3546
- _queryParams["actor_id"] = actorId.map(
3547
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3548
- );
3549
- } else {
3550
- _queryParams["actor_id"] = actorId;
3551
- }
3552
- }
3553
- if (includeDestroyed != null) {
3554
- _queryParams["include_destroyed"] = includeDestroyed.toString();
3555
- }
3220
+ if (namespace != null)
3221
+ _queryParams["namespace"] = namespace;
3556
3222
  if (limit != null) {
3557
3223
  _queryParams["limit"] = limit.toString();
3558
3224
  }
@@ -3560,9 +3226,9 @@ var RivetClient = class {
3560
3226
  _queryParams["cursor"] = cursor;
3561
3227
  }
3562
3228
  const _response = await (this._options.fetcher ?? fetcher)({
3563
- url: (0, import_url_join7.default)(
3229
+ url: (0, import_url_join5.default)(
3564
3230
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3565
- "actors"
3231
+ `pools/${encodeURIComponent(pool)}/nodes`
3566
3232
  ),
3567
3233
  method: "GET",
3568
3234
  headers: {
@@ -3580,7 +3246,7 @@ var RivetClient = class {
3580
3246
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3581
3247
  });
3582
3248
  if (_response.ok) {
3583
- return ActorsListResponse.parseOrThrow(_response.body, {
3249
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3584
3250
  unrecognizedObjectKeys: "passthrough",
3585
3251
  allowUnrecognizedUnionMembers: true,
3586
3252
  allowUnrecognizedEnumValues: true,
@@ -3601,52 +3267,23 @@ var RivetClient = class {
3601
3267
  body: _response.error.rawBody
3602
3268
  });
3603
3269
  case "timeout":
3604
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
3270
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3605
3271
  case "unknown":
3606
3272
  throw new RivetError({
3607
3273
  message: _response.error.errorMessage
3608
3274
  });
3609
3275
  }
3610
3276
  }
3611
- /**
3612
- * **If actor is created in the current datacenter:**
3613
- *
3614
- * 2 round trips:
3615
- *
3616
- * - namespace::ops::resolve_for_name_global
3617
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3618
- *
3619
- * **If actor is created in a different datacenter:**
3620
- *
3621
- * 3 round trips:
3622
- *
3623
- * - namespace::ops::resolve_for_name_global
3624
- * - POST /actors to remote datacenter
3625
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3626
- *
3627
- * actor::get will always be in the same datacenter.
3628
- *
3629
- * @param {Rivet.ActorsCreateRequest} request
3630
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3631
- *
3632
- * @example
3633
- * await client.actorsCreate({
3634
- * namespace: "namespace",
3635
- * crashPolicy: "restart",
3636
- * name: "name",
3637
- * runnerNameSelector: "runner_name_selector"
3638
- * })
3639
- */
3640
- async actorsCreate(request, requestOptions) {
3641
- const { namespace, ..._body } = request;
3277
+ async get(name, request = {}, requestOptions) {
3642
3278
  const _queryParams = {};
3643
- _queryParams["namespace"] = namespace;
3279
+ if (request.namespace != null)
3280
+ _queryParams["namespace"] = request.namespace;
3644
3281
  const _response = await (this._options.fetcher ?? fetcher)({
3645
- url: (0, import_url_join7.default)(
3282
+ url: (0, import_url_join5.default)(
3646
3283
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3647
- "actors"
3284
+ `pools/${encodeURIComponent(name)}`
3648
3285
  ),
3649
- method: "POST",
3286
+ method: "GET",
3650
3287
  headers: {
3651
3288
  Authorization: await this._getAuthorizationHeader(),
3652
3289
  "X-Fern-Language": "JavaScript",
@@ -3657,13 +3294,12 @@ var RivetClient = class {
3657
3294
  contentType: "application/json",
3658
3295
  queryParameters: _queryParams,
3659
3296
  requestType: "json",
3660
- body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3661
3297
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3662
3298
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3663
3299
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3664
3300
  });
3665
3301
  if (_response.ok) {
3666
- return ActorsCreateResponse.parseOrThrow(_response.body, {
3302
+ return PoolResponse.parseOrThrow(_response.body, {
3667
3303
  unrecognizedObjectKeys: "passthrough",
3668
3304
  allowUnrecognizedUnionMembers: true,
3669
3305
  allowUnrecognizedEnumValues: true,
@@ -3684,60 +3320,21 @@ var RivetClient = class {
3684
3320
  body: _response.error.rawBody
3685
3321
  });
3686
3322
  case "timeout":
3687
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
3323
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3688
3324
  case "unknown":
3689
3325
  throw new RivetError({
3690
3326
  message: _response.error.errorMessage
3691
3327
  });
3692
3328
  }
3693
3329
  }
3694
- /**
3695
- * **If actor exists**
3696
- *
3697
- * 2 round trips:
3698
- *
3699
- * - namespace::ops::resolve_for_name_global
3700
- * - GET /actors/{}
3701
- *
3702
- * **If actor does not exist and is created in the current datacenter:**
3703
- *
3704
- * 2 round trips:
3705
- *
3706
- * - namespace::ops::resolve_for_name_global
3707
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3708
- *
3709
- * **If actor does not exist and is created in a different datacenter:**
3710
- *
3711
- * 3 round trips:
3712
- *
3713
- * - namespace::ops::resolve_for_name_global
3714
- * - POST /actors to remote datacenter
3715
- * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
3716
- *
3717
- * actor::get will always be in the same datacenter.
3718
- *
3719
- * ## Optimized Alternative Routes
3720
- *
3721
- * @param {Rivet.ActorsGetOrCreateRequest} request
3722
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3723
- *
3724
- * @example
3725
- * await client.actorsGetOrCreate({
3726
- * namespace: "namespace",
3727
- * crashPolicy: "restart",
3728
- * key: "key",
3729
- * name: "name",
3730
- * runnerNameSelector: "runner_name_selector"
3731
- * })
3732
- */
3733
- async actorsGetOrCreate(request, requestOptions) {
3734
- const { namespace, ..._body } = request;
3330
+ async upsert(name, request, requestOptions) {
3735
3331
  const _queryParams = {};
3736
- _queryParams["namespace"] = namespace;
3332
+ if (request.namespace != null)
3333
+ _queryParams["namespace"] = request.namespace;
3737
3334
  const _response = await (this._options.fetcher ?? fetcher)({
3738
- url: (0, import_url_join7.default)(
3335
+ url: (0, import_url_join5.default)(
3739
3336
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3740
- "actors"
3337
+ `pools/${encodeURIComponent(name)}`
3741
3338
  ),
3742
3339
  method: "PUT",
3743
3340
  headers: {
@@ -3750,13 +3347,19 @@ var RivetClient = class {
3750
3347
  contentType: "application/json",
3751
3348
  queryParameters: _queryParams,
3752
3349
  requestType: "json",
3753
- 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
+ },
3754
3357
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3755
3358
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3756
3359
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3757
3360
  });
3758
3361
  if (_response.ok) {
3759
- return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
3362
+ return PoolResponse.parseOrThrow(_response.body, {
3760
3363
  unrecognizedObjectKeys: "passthrough",
3761
3364
  allowUnrecognizedUnionMembers: true,
3762
3365
  allowUnrecognizedEnumValues: true,
@@ -3777,43 +3380,23 @@ var RivetClient = class {
3777
3380
  body: _response.error.rawBody
3778
3381
  });
3779
3382
  case "timeout":
3780
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
3383
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3781
3384
  case "unknown":
3782
3385
  throw new RivetError({
3783
3386
  message: _response.error.errorMessage
3784
3387
  });
3785
3388
  }
3786
3389
  }
3787
- /**
3788
- * 2 round trips:
3789
- *
3790
- * - GET /actors/names (fanout)
3791
- * - [api-peer] namespace::ops::resolve_for_name_global
3792
- *
3793
- * @param {Rivet.ActorsListNamesRequest} request
3794
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3795
- *
3796
- * @example
3797
- * await client.actorsListNames({
3798
- * namespace: "namespace"
3799
- * })
3800
- */
3801
- async actorsListNames(request, requestOptions) {
3802
- const { namespace, limit, cursor } = request;
3390
+ async delete(name, request = {}, requestOptions) {
3803
3391
  const _queryParams = {};
3804
- _queryParams["namespace"] = namespace;
3805
- if (limit != null) {
3806
- _queryParams["limit"] = limit.toString();
3807
- }
3808
- if (cursor != null) {
3809
- _queryParams["cursor"] = cursor;
3810
- }
3392
+ if (request.namespace != null)
3393
+ _queryParams["namespace"] = request.namespace;
3811
3394
  const _response = await (this._options.fetcher ?? fetcher)({
3812
- url: (0, import_url_join7.default)(
3395
+ url: (0, import_url_join5.default)(
3813
3396
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3814
- "actors/names"
3397
+ `pools/${encodeURIComponent(name)}`
3815
3398
  ),
3816
- method: "GET",
3399
+ method: "DELETE",
3817
3400
  headers: {
3818
3401
  Authorization: await this._getAuthorizationHeader(),
3819
3402
  "X-Fern-Language": "JavaScript",
@@ -3829,13 +3412,7 @@ var RivetClient = class {
3829
3412
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3830
3413
  });
3831
3414
  if (_response.ok) {
3832
- return ActorsListNamesResponse.parseOrThrow(_response.body, {
3833
- unrecognizedObjectKeys: "passthrough",
3834
- allowUnrecognizedUnionMembers: true,
3835
- allowUnrecognizedEnumValues: true,
3836
- skipValidation: true,
3837
- breadcrumbsPrefix: ["response"]
3838
- });
3415
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3839
3416
  }
3840
3417
  if (_response.error.reason === "status-code") {
3841
3418
  throw new RivetError({
@@ -3850,38 +3427,106 @@ var RivetClient = class {
3850
3427
  body: _response.error.rawBody
3851
3428
  });
3852
3429
  case "timeout":
3853
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
3430
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3854
3431
  case "unknown":
3855
3432
  throw new RivetError({
3856
3433
  message: _response.error.errorMessage
3857
3434
  });
3858
3435
  }
3859
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
+ }
3860
3467
  /**
3861
- * 2 round trip:
3468
+ * **If key is some & `include_destroyed` is false**
3862
3469
  *
3863
- * - DELETE /actors/{}
3864
- * - [api-peer] namespace::ops::resolve_for_name_global
3470
+ * 2 round trips:
3865
3471
  *
3866
- * @param {Rivet.RivetId} actorId
3867
- * @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
3868
3492
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3869
3493
  *
3870
3494
  * @example
3871
- * await client.actorsDelete("actor_id", {
3495
+ * await client.actorsList({
3872
3496
  * namespace: "namespace"
3873
3497
  * })
3874
3498
  */
3875
- async actorsDelete(actorId, request, requestOptions) {
3876
- const { namespace } = request;
3499
+ async actorsList(request, requestOptions) {
3500
+ const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3877
3501
  const _queryParams = {};
3878
- _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
+ }
3879
3524
  const _response = await (this._options.fetcher ?? fetcher)({
3880
- url: (0, import_url_join7.default)(
3525
+ url: (0, import_url_join6.default)(
3881
3526
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3882
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3527
+ "actors"
3883
3528
  ),
3884
- method: "DELETE",
3529
+ method: "GET",
3885
3530
  headers: {
3886
3531
  Authorization: await this._getAuthorizationHeader(),
3887
3532
  "X-Fern-Language": "JavaScript",
@@ -3897,7 +3542,7 @@ var RivetClient = class {
3897
3542
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3898
3543
  });
3899
3544
  if (_response.ok) {
3900
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3545
+ return ActorsListResponse.parseOrThrow(_response.body, {
3901
3546
  unrecognizedObjectKeys: "passthrough",
3902
3547
  allowUnrecognizedUnionMembers: true,
3903
3548
  allowUnrecognizedEnumValues: true,
@@ -3918,7 +3563,7 @@ var RivetClient = class {
3918
3563
  body: _response.error.rawBody
3919
3564
  });
3920
3565
  case "timeout":
3921
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3566
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
3922
3567
  case "unknown":
3923
3568
  throw new RivetError({
3924
3569
  message: _response.error.errorMessage
@@ -3926,26 +3571,44 @@ var RivetClient = class {
3926
3571
  }
3927
3572
  }
3928
3573
  /**
3929
- * @param {Rivet.RivetId} actorId
3930
- * @param {string} key
3931
- * @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
3932
3592
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3933
3593
  *
3934
3594
  * @example
3935
- * await client.actorsKvGet("actor_id", "key", {
3936
- * namespace: "namespace"
3595
+ * await client.actorsCreate({
3596
+ * namespace: "namespace",
3597
+ * name: "name",
3598
+ * pool: "pool"
3937
3599
  * })
3938
3600
  */
3939
- async actorsKvGet(actorId, key, request, requestOptions) {
3940
- const { namespace } = request;
3601
+ async actorsCreate(request, requestOptions) {
3602
+ const { namespace, ..._body } = request;
3941
3603
  const _queryParams = {};
3942
- _queryParams["namespace"] = namespace;
3604
+ if (namespace != null)
3605
+ _queryParams["namespace"] = namespace;
3943
3606
  const _response = await (this._options.fetcher ?? fetcher)({
3944
- url: (0, import_url_join7.default)(
3607
+ url: (0, import_url_join6.default)(
3945
3608
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3946
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3609
+ "actors"
3947
3610
  ),
3948
- method: "GET",
3611
+ method: "POST",
3949
3612
  headers: {
3950
3613
  Authorization: await this._getAuthorizationHeader(),
3951
3614
  "X-Fern-Language": "JavaScript",
@@ -3956,12 +3619,13 @@ var RivetClient = class {
3956
3619
  contentType: "application/json",
3957
3620
  queryParameters: _queryParams,
3958
3621
  requestType: "json",
3622
+ body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3959
3623
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3960
3624
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3961
3625
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3962
3626
  });
3963
3627
  if (_response.ok) {
3964
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3628
+ return ActorsCreateResponse.parseOrThrow(_response.body, {
3965
3629
  unrecognizedObjectKeys: "passthrough",
3966
3630
  allowUnrecognizedUnionMembers: true,
3967
3631
  allowUnrecognizedEnumValues: true,
@@ -3982,9 +3646,7 @@ var RivetClient = class {
3982
3646
  body: _response.error.rawBody
3983
3647
  });
3984
3648
  case "timeout":
3985
- throw new RivetTimeoutError(
3986
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
3987
- );
3649
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
3988
3650
  case "unknown":
3989
3651
  throw new RivetError({
3990
3652
  message: _response.error.errorMessage
@@ -3992,28 +3654,54 @@ var RivetClient = class {
3992
3654
  }
3993
3655
  }
3994
3656
  /**
3995
- * @param {Rivet.RivetId} actorId
3996
- * @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
3997
3684
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3998
3685
  *
3999
3686
  * @example
4000
- * await client.actorsReschedule("actor_id", {
3687
+ * await client.actorsGetOrCreate({
4001
3688
  * namespace: "namespace",
4002
- * body: {
4003
- * "key": "value"
4004
- * }
3689
+ * key: "key",
3690
+ * name: "name",
3691
+ * pool: "pool"
4005
3692
  * })
4006
3693
  */
4007
- async actorsReschedule(actorId, request, requestOptions) {
4008
- const { namespace, body: _body } = request;
3694
+ async actorsGetOrCreate(request, requestOptions) {
3695
+ const { namespace, ..._body } = request;
4009
3696
  const _queryParams = {};
4010
- _queryParams["namespace"] = namespace;
3697
+ if (namespace != null)
3698
+ _queryParams["namespace"] = namespace;
4011
3699
  const _response = await (this._options.fetcher ?? fetcher)({
4012
- url: (0, import_url_join7.default)(
3700
+ url: (0, import_url_join6.default)(
4013
3701
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4014
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
3702
+ "actors"
4015
3703
  ),
4016
- method: "POST",
3704
+ method: "PUT",
4017
3705
  headers: {
4018
3706
  Authorization: await this._getAuthorizationHeader(),
4019
3707
  "X-Fern-Language": "JavaScript",
@@ -4024,13 +3712,13 @@ var RivetClient = class {
4024
3712
  contentType: "application/json",
4025
3713
  queryParameters: _queryParams,
4026
3714
  requestType: "json",
4027
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3715
+ body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4028
3716
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4029
3717
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4030
3718
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4031
3719
  });
4032
3720
  if (_response.ok) {
4033
- return ActorsRescheduleResponse.parseOrThrow(_response.body, {
3721
+ return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
4034
3722
  unrecognizedObjectKeys: "passthrough",
4035
3723
  allowUnrecognizedUnionMembers: true,
4036
3724
  allowUnrecognizedEnumValues: true,
@@ -4051,7 +3739,7 @@ var RivetClient = class {
4051
3739
  body: _response.error.rawBody
4052
3740
  });
4053
3741
  case "timeout":
4054
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
3742
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
4055
3743
  case "unknown":
4056
3744
  throw new RivetError({
4057
3745
  message: _response.error.errorMessage
@@ -4059,28 +3747,36 @@ var RivetClient = class {
4059
3747
  }
4060
3748
  }
4061
3749
  /**
4062
- * @param {Rivet.RivetId} actorId
4063
- * @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
4064
3756
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4065
3757
  *
4066
3758
  * @example
4067
- * await client.actorsSleep("actor_id", {
4068
- * namespace: "namespace",
4069
- * body: {
4070
- * "key": "value"
4071
- * }
3759
+ * await client.actorsListNames({
3760
+ * namespace: "namespace"
4072
3761
  * })
4073
3762
  */
4074
- async actorsSleep(actorId, request, requestOptions) {
4075
- const { namespace, body: _body } = request;
3763
+ async actorsListNames(request, requestOptions) {
3764
+ const { namespace, limit, cursor } = request;
4076
3765
  const _queryParams = {};
4077
- _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
+ }
4078
3774
  const _response = await (this._options.fetcher ?? fetcher)({
4079
- url: (0, import_url_join7.default)(
3775
+ url: (0, import_url_join6.default)(
4080
3776
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4081
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
3777
+ "actors/names"
4082
3778
  ),
4083
- method: "POST",
3779
+ method: "GET",
4084
3780
  headers: {
4085
3781
  Authorization: await this._getAuthorizationHeader(),
4086
3782
  "X-Fern-Language": "JavaScript",
@@ -4091,13 +3787,12 @@ var RivetClient = class {
4091
3787
  contentType: "application/json",
4092
3788
  queryParameters: _queryParams,
4093
3789
  requestType: "json",
4094
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4095
3790
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4096
3791
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4097
3792
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4098
3793
  });
4099
3794
  if (_response.ok) {
4100
- return ActorsSleepResponse.parseOrThrow(_response.body, {
3795
+ return ActorsListNamesResponse.parseOrThrow(_response.body, {
4101
3796
  unrecognizedObjectKeys: "passthrough",
4102
3797
  allowUnrecognizedUnionMembers: true,
4103
3798
  allowUnrecognizedEnumValues: true,
@@ -4118,7 +3813,7 @@ var RivetClient = class {
4118
3813
  body: _response.error.rawBody
4119
3814
  });
4120
3815
  case "timeout":
4121
- throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
3816
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
4122
3817
  case "unknown":
4123
3818
  throw new RivetError({
4124
3819
  message: _response.error.errorMessage
@@ -4126,43 +3821,30 @@ var RivetClient = class {
4126
3821
  }
4127
3822
  }
4128
3823
  /**
4129
- * @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
4130
3831
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4131
3832
  *
4132
3833
  * @example
4133
- * await client.runnerConfigsList({
3834
+ * await client.actorsDelete("actor_id", {
4134
3835
  * namespace: "namespace"
4135
3836
  * })
4136
3837
  */
4137
- async runnerConfigsList(request, requestOptions) {
4138
- const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
3838
+ /** Returns one actor by ID. */
3839
+ async actorsGet(actorId, request, requestOptions) {
3840
+ const { namespace } = request;
4139
3841
  const _queryParams = {};
4140
- _queryParams["namespace"] = namespace;
4141
- if (limit != null) {
4142
- _queryParams["limit"] = limit.toString();
4143
- }
4144
- if (cursor != null) {
4145
- _queryParams["cursor"] = cursor;
4146
- }
4147
- if (variant != null) {
4148
- _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4149
- unrecognizedObjectKeys: "strip"
4150
- });
4151
- }
4152
- if (runnerNames != null) {
4153
- _queryParams["runner_names"] = runnerNames;
4154
- }
4155
- if (runnerName != null) {
4156
- if (Array.isArray(runnerName)) {
4157
- _queryParams["runner_name"] = runnerName.map((item) => item);
4158
- } else {
4159
- _queryParams["runner_name"] = runnerName;
4160
- }
4161
- }
3842
+ if (namespace != null)
3843
+ _queryParams["namespace"] = namespace;
4162
3844
  const _response = await (this._options.fetcher ?? fetcher)({
4163
- url: (0, import_url_join7.default)(
3845
+ url: (0, import_url_join6.default)(
4164
3846
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4165
- "runner-configs"
3847
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4166
3848
  ),
4167
3849
  method: "GET",
4168
3850
  headers: {
@@ -4180,7 +3862,7 @@ var RivetClient = class {
4180
3862
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4181
3863
  });
4182
3864
  if (_response.ok) {
4183
- return RunnerConfigsListResponse.parseOrThrow(_response.body, {
3865
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4184
3866
  unrecognizedObjectKeys: "passthrough",
4185
3867
  allowUnrecognizedUnionMembers: true,
4186
3868
  allowUnrecognizedEnumValues: true,
@@ -4201,33 +3883,24 @@ var RivetClient = class {
4201
3883
  body: _response.error.rawBody
4202
3884
  });
4203
3885
  case "timeout":
4204
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
3886
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4205
3887
  case "unknown":
4206
3888
  throw new RivetError({
4207
3889
  message: _response.error.errorMessage
4208
3890
  });
4209
3891
  }
4210
3892
  }
4211
- /**
4212
- * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4213
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4214
- *
4215
- * @example
4216
- * await client.runnerConfigsServerlessHealthCheck({
4217
- * namespace: "namespace",
4218
- * url: "url"
4219
- * })
4220
- */
4221
- async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4222
- const { namespace, ..._body } = request;
3893
+ async actorsDelete(actorId, request, requestOptions) {
3894
+ const { namespace } = request;
4223
3895
  const _queryParams = {};
4224
- _queryParams["namespace"] = namespace;
3896
+ if (namespace != null)
3897
+ _queryParams["namespace"] = namespace;
4225
3898
  const _response = await (this._options.fetcher ?? fetcher)({
4226
- url: (0, import_url_join7.default)(
3899
+ url: (0, import_url_join6.default)(
4227
3900
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4228
- "runner-configs/serverless-health-check"
3901
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4229
3902
  ),
4230
- method: "POST",
3903
+ method: "DELETE",
4231
3904
  headers: {
4232
3905
  Authorization: await this._getAuthorizationHeader(),
4233
3906
  "X-Fern-Language": "JavaScript",
@@ -4238,15 +3911,12 @@ var RivetClient = class {
4238
3911
  contentType: "application/json",
4239
3912
  queryParameters: _queryParams,
4240
3913
  requestType: "json",
4241
- body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4242
- unrecognizedObjectKeys: "strip"
4243
- }),
4244
3914
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4245
3915
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4246
3916
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4247
3917
  });
4248
3918
  if (_response.ok) {
4249
- return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
3919
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4250
3920
  unrecognizedObjectKeys: "passthrough",
4251
3921
  allowUnrecognizedUnionMembers: true,
4252
3922
  allowUnrecognizedEnumValues: true,
@@ -4267,9 +3937,7 @@ var RivetClient = class {
4267
3937
  body: _response.error.rawBody
4268
3938
  });
4269
3939
  case "timeout":
4270
- throw new RivetTimeoutError(
4271
- "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4272
- );
3940
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4273
3941
  case "unknown":
4274
3942
  throw new RivetError({
4275
3943
  message: _response.error.errorMessage
@@ -4277,28 +3945,26 @@ var RivetClient = class {
4277
3945
  }
4278
3946
  }
4279
3947
  /**
4280
- * @param {string} runnerName
4281
- * @param {Rivet.RunnerConfigsUpsertRequestBody} request
3948
+ * @param {Rivet.RivetId} actorId
3949
+ * @param {Rivet.ActorsRescheduleRequest} request
4282
3950
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4283
3951
  *
4284
3952
  * @example
4285
- * await client.runnerConfigsUpsert("runner_name", {
3953
+ * await client.actorsReschedule("actor_id", {
4286
3954
  * namespace: "namespace",
4287
- * datacenters: {
4288
- * "key": {}
4289
- * }
4290
3955
  * })
4291
3956
  */
4292
- async runnerConfigsUpsert(runnerName, request, requestOptions) {
4293
- const { namespace, ..._body } = request;
3957
+ async actorsReschedule(actorId, request, requestOptions) {
3958
+ const { namespace } = request;
4294
3959
  const _queryParams = {};
4295
- _queryParams["namespace"] = namespace;
3960
+ if (namespace != null)
3961
+ _queryParams["namespace"] = namespace;
4296
3962
  const _response = await (this._options.fetcher ?? fetcher)({
4297
- url: (0, import_url_join7.default)(
3963
+ url: (0, import_url_join6.default)(
4298
3964
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4299
- `runner-configs/${encodeURIComponent(runnerName)}`
3965
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4300
3966
  ),
4301
- method: "PUT",
3967
+ method: "POST",
4302
3968
  headers: {
4303
3969
  Authorization: await this._getAuthorizationHeader(),
4304
3970
  "X-Fern-Language": "JavaScript",
@@ -4309,13 +3975,12 @@ var RivetClient = class {
4309
3975
  contentType: "application/json",
4310
3976
  queryParameters: _queryParams,
4311
3977
  requestType: "json",
4312
- body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4313
3978
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4314
3979
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4315
3980
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4316
3981
  });
4317
3982
  if (_response.ok) {
4318
- return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
3983
+ return ActorsRescheduleResponse.parseOrThrow(_response.body, {
4319
3984
  unrecognizedObjectKeys: "passthrough",
4320
3985
  allowUnrecognizedUnionMembers: true,
4321
3986
  allowUnrecognizedEnumValues: true,
@@ -4336,7 +4001,7 @@ var RivetClient = class {
4336
4001
  body: _response.error.rawBody
4337
4002
  });
4338
4003
  case "timeout":
4339
- 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.");
4340
4005
  case "unknown":
4341
4006
  throw new RivetError({
4342
4007
  message: _response.error.errorMessage
@@ -4344,25 +4009,26 @@ var RivetClient = class {
4344
4009
  }
4345
4010
  }
4346
4011
  /**
4347
- * @param {string} runnerName
4348
- * @param {Rivet.RunnerConfigsDeleteRequest} request
4012
+ * @param {Rivet.RivetId} actorId
4013
+ * @param {Rivet.ActorsSleepRequest} request
4349
4014
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4350
4015
  *
4351
4016
  * @example
4352
- * await client.runnerConfigsDelete("runner_name", {
4353
- * namespace: "namespace"
4017
+ * await client.actorsSleep("actor_id", {
4018
+ * namespace: "namespace",
4354
4019
  * })
4355
4020
  */
4356
- async runnerConfigsDelete(runnerName, request, requestOptions) {
4021
+ async actorsSleep(actorId, request, requestOptions) {
4357
4022
  const { namespace } = request;
4358
4023
  const _queryParams = {};
4359
- _queryParams["namespace"] = namespace;
4024
+ if (namespace != null)
4025
+ _queryParams["namespace"] = namespace;
4360
4026
  const _response = await (this._options.fetcher ?? fetcher)({
4361
- url: (0, import_url_join7.default)(
4027
+ url: (0, import_url_join6.default)(
4362
4028
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4363
- `runner-configs/${encodeURIComponent(runnerName)}`
4029
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4364
4030
  ),
4365
- method: "DELETE",
4031
+ method: "POST",
4366
4032
  headers: {
4367
4033
  Authorization: await this._getAuthorizationHeader(),
4368
4034
  "X-Fern-Language": "JavaScript",
@@ -4378,7 +4044,7 @@ var RivetClient = class {
4378
4044
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4379
4045
  });
4380
4046
  if (_response.ok) {
4381
- return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4047
+ return ActorsSleepResponse.parseOrThrow(_response.body, {
4382
4048
  unrecognizedObjectKeys: "passthrough",
4383
4049
  allowUnrecognizedUnionMembers: true,
4384
4050
  allowUnrecognizedEnumValues: true,
@@ -4399,9 +4065,7 @@ var RivetClient = class {
4399
4065
  body: _response.error.rawBody
4400
4066
  });
4401
4067
  case "timeout":
4402
- throw new RivetTimeoutError(
4403
- "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4404
- );
4068
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
4405
4069
  case "unknown":
4406
4070
  throw new RivetError({
4407
4071
  message: _response.error.errorMessage
@@ -4409,26 +4073,27 @@ var RivetClient = class {
4409
4073
  }
4410
4074
  }
4411
4075
  /**
4412
- * @param {string} runnerName
4413
- * @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
4414
4081
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4415
4082
  *
4416
4083
  * @example
4417
- * await client.runnerConfigsRefreshMetadata("runner_name", {
4084
+ * await client.actorsFork("actor_id", {
4418
4085
  * namespace: "namespace",
4419
- * body: {
4420
- * "key": "value"
4421
- * }
4422
4086
  * })
4423
4087
  */
4424
- async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4425
- const { namespace, body: _body } = request;
4088
+ async actorsFork(actorId, request, requestOptions) {
4089
+ const { namespace, ..._body } = request;
4426
4090
  const _queryParams = {};
4427
- _queryParams["namespace"] = namespace;
4091
+ if (namespace != null)
4092
+ _queryParams["namespace"] = namespace;
4428
4093
  const _response = await (this._options.fetcher ?? fetcher)({
4429
- url: (0, import_url_join7.default)(
4094
+ url: (0, import_url_join6.default)(
4430
4095
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4431
- `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4096
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/fork`
4432
4097
  ),
4433
4098
  method: "POST",
4434
4099
  headers: {
@@ -4441,15 +4106,13 @@ var RivetClient = class {
4441
4106
  contentType: "application/json",
4442
4107
  queryParameters: _queryParams,
4443
4108
  requestType: "json",
4444
- body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4445
- unrecognizedObjectKeys: "strip"
4446
- }),
4109
+ body: ActorsForkRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4447
4110
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4448
4111
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4449
4112
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4450
4113
  });
4451
4114
  if (_response.ok) {
4452
- return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4115
+ return ActorsForkResponse.parseOrThrow(_response.body, {
4453
4116
  unrecognizedObjectKeys: "passthrough",
4454
4117
  allowUnrecognizedUnionMembers: true,
4455
4118
  allowUnrecognizedEnumValues: true,
@@ -4470,9 +4133,7 @@ var RivetClient = class {
4470
4133
  body: _response.error.rawBody
4471
4134
  });
4472
4135
  case "timeout":
4473
- throw new RivetTimeoutError(
4474
- "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4475
- );
4136
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/fork.");
4476
4137
  case "unknown":
4477
4138
  throw new RivetError({
4478
4139
  message: _response.error.errorMessage