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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/browser/cjs/index.js +322 -1077
  2. package/dist/browser/cjs/serialization.js +93 -379
  3. package/dist/browser/esm/index.js +322 -1077
  4. package/dist/browser/esm/serialization.js +93 -379
  5. package/dist/node/cjs/index.js +322 -1077
  6. package/dist/node/cjs/serialization.js +103 -421
  7. package/dist/node/esm/index.js +322 -1077
  8. package/dist/node/esm/serialization.js +93 -379
  9. package/package.json +2 -1
  10. package/types/Client.d.ts +7 -91
  11. package/types/api/client/requests/ActorsCreateRequest.d.ts +3 -7
  12. package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
  13. package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +4 -8
  14. package/types/api/client/requests/ActorsGetRequest.d.ts +3 -0
  15. package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
  16. package/types/api/client/requests/ActorsListRequest.d.ts +2 -5
  17. package/types/api/client/requests/ActorsRescheduleRequest.d.ts +1 -5
  18. package/types/api/client/requests/ActorsSleepRequest.d.ts +1 -5
  19. package/types/api/client/requests/index.d.ts +1 -6
  20. package/types/api/resources/authTokens/client/Client.d.ts +0 -20
  21. package/types/api/resources/authTokens/client/index.d.ts +1 -0
  22. package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +5 -1
  23. package/types/api/resources/index.d.ts +2 -5
  24. package/types/api/resources/namespaces/client/Client.d.ts +0 -1
  25. package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -2
  26. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +0 -6
  27. package/types/api/resources/pools/client/Client.d.ts +57 -0
  28. package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +3 -0
  29. package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +3 -0
  30. package/types/api/resources/{runners/client/requests/RunnersListNamesRequest.d.ts → pools/client/requests/PoolsListNodesRequest.d.ts} +2 -2
  31. package/types/api/resources/{envoys/client/requests/EnvoysListRequest.d.ts → pools/client/requests/PoolsListRequest.d.ts} +2 -4
  32. package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +8 -0
  33. package/types/api/resources/pools/client/requests/index.d.ts +5 -0
  34. package/types/api/types/Actor.d.ts +21 -27
  35. package/types/api/types/ActorName.d.ts +1 -3
  36. package/types/api/types/ActorsCreateResponse.d.ts +2 -3
  37. package/types/api/types/ActorsDeleteResponse.d.ts +1 -4
  38. package/types/api/types/ActorsGetOrCreateResponse.d.ts +1 -3
  39. package/types/api/types/ActorsGetResponse.d.ts +4 -0
  40. package/types/api/types/ActorsListNamesResponse.d.ts +1 -4
  41. package/types/api/types/ActorsListResponse.d.ts +1 -4
  42. package/types/api/types/ActorsRescheduleResponse.d.ts +1 -4
  43. package/types/api/types/ActorsSleepResponse.d.ts +1 -4
  44. package/types/api/types/AuthOperationKind.d.ts +0 -10
  45. package/types/api/types/AuthResourceKind.d.ts +1 -0
  46. package/types/api/types/AuthTargetScope.d.ts +4 -0
  47. package/types/api/types/AuthTokenCreateResponse.d.ts +5 -5
  48. package/types/api/types/AuthTokenGrant.d.ts +4 -6
  49. package/types/api/types/AuthTokenInspectResponse.d.ts +9 -7
  50. package/types/api/types/Datacenter.d.ts +1 -5
  51. package/types/api/types/DatacentersListResponse.d.ts +1 -5
  52. package/types/api/types/ErrorResponse.d.ts +10 -0
  53. package/types/api/types/MetadataGetResponse.d.ts +8 -12
  54. package/types/api/types/Namespace.d.ts +3 -7
  55. package/types/api/types/NamespaceListResponse.d.ts +1 -4
  56. package/types/api/types/NamespacesCreateResponse.d.ts +0 -3
  57. package/types/api/types/Node.d.ts +18 -0
  58. package/types/api/types/Pagination.d.ts +2 -4
  59. package/types/api/types/Pool.d.ts +14 -0
  60. package/types/api/types/PoolResponse.d.ts +4 -0
  61. package/types/api/types/PoolsDeleteResponse.d.ts +1 -0
  62. package/types/api/types/PoolsListNodesResponse.d.ts +5 -0
  63. package/types/api/types/PoolsListResponse.d.ts +5 -0
  64. package/types/api/types/RivetId.d.ts +0 -3
  65. package/types/api/types/index.d.ts +10 -38
  66. package/types/serialization/client/requests/ActorsCreateRequest.d.ts +1 -4
  67. package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +2 -5
  68. package/types/serialization/client/requests/index.d.ts +0 -2
  69. package/types/serialization/resources/index.d.ts +0 -2
  70. package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -1
  71. package/types/serialization/types/Actor.d.ts +10 -17
  72. package/types/serialization/types/ActorName.d.ts +0 -3
  73. package/types/serialization/types/ActorsCreateResponse.d.ts +1 -3
  74. package/types/serialization/types/ActorsDeleteResponse.d.ts +1 -4
  75. package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +0 -3
  76. package/types/serialization/types/ActorsGetResponse.d.ts +10 -0
  77. package/types/serialization/types/ActorsListNamesResponse.d.ts +0 -5
  78. package/types/serialization/types/ActorsListResponse.d.ts +1 -4
  79. package/types/serialization/types/ActorsRescheduleResponse.d.ts +1 -4
  80. package/types/serialization/types/ActorsSleepResponse.d.ts +1 -4
  81. package/types/serialization/types/AuthOperationKind.d.ts +0 -3
  82. package/types/serialization/types/AuthResourceKind.d.ts +7 -0
  83. package/types/serialization/types/AuthTargetScope.d.ts +10 -0
  84. package/types/serialization/types/AuthTokenCreateResponse.d.ts +2 -5
  85. package/types/serialization/types/AuthTokenGrant.d.ts +5 -8
  86. package/types/serialization/types/AuthTokenInspectResponse.d.ts +4 -8
  87. package/types/serialization/types/Datacenter.d.ts +0 -5
  88. package/types/serialization/types/DatacentersListResponse.d.ts +1 -6
  89. package/types/serialization/types/ErrorResponse.d.ts +12 -0
  90. package/types/serialization/types/MetadataGetResponse.d.ts +4 -12
  91. package/types/serialization/types/Namespace.d.ts +1 -7
  92. package/types/serialization/types/NamespaceListResponse.d.ts +1 -4
  93. package/types/serialization/types/NamespacesCreateResponse.d.ts +0 -3
  94. package/types/serialization/types/Node.d.ts +16 -0
  95. package/types/serialization/types/Pagination.d.ts +1 -4
  96. package/types/serialization/types/Pool.d.ts +14 -0
  97. package/types/serialization/types/PoolResponse.d.ts +10 -0
  98. package/types/serialization/types/PoolsDeleteResponse.d.ts +7 -0
  99. package/types/serialization/types/PoolsListNodesResponse.d.ts +12 -0
  100. package/types/serialization/types/PoolsListResponse.d.ts +12 -0
  101. package/types/serialization/types/RivetId.d.ts +0 -3
  102. package/types/serialization/types/index.d.ts +10 -38
  103. package/types/api/client/requests/ActorsKvGetRequest.d.ts +0 -12
  104. package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +0 -12
  105. package/types/api/client/requests/RunnerConfigsListRequest.d.ts +0 -21
  106. package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +0 -17
  107. package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -15
  108. package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -17
  109. package/types/api/resources/envoys/client/Client.d.ts +0 -39
  110. package/types/api/resources/envoys/client/requests/index.d.ts +0 -1
  111. package/types/api/resources/health/client/Client.d.ts +0 -36
  112. package/types/api/resources/health/client/index.d.ts +0 -1
  113. package/types/api/resources/health/index.d.ts +0 -1
  114. package/types/api/resources/runners/client/Client.d.ts +0 -54
  115. package/types/api/resources/runners/client/index.d.ts +0 -1
  116. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +0 -22
  117. package/types/api/resources/runners/client/requests/index.d.ts +0 -2
  118. package/types/api/resources/runners/index.d.ts +0 -1
  119. package/types/api/types/ActorsKvGetResponse.d.ts +0 -7
  120. package/types/api/types/ActorsRescheduleRequestBody.d.ts +0 -4
  121. package/types/api/types/ActorsSleepRequestBody.d.ts +0 -4
  122. package/types/api/types/AuthTokenResource.d.ts +0 -13
  123. package/types/api/types/AuthTokenTargetScope.d.ts +0 -5
  124. package/types/api/types/AuthTokenTargetScopeId.d.ts +0 -7
  125. package/types/api/types/CrashPolicy.d.ts +0 -9
  126. package/types/api/types/DatacenterHealth.d.ts +0 -12
  127. package/types/api/types/Envoy.d.ts +0 -18
  128. package/types/api/types/EnvoysListResponse.d.ts +0 -8
  129. package/types/api/types/HealthFanoutResponse.d.ts +0 -7
  130. package/types/api/types/HealthResponse.d.ts +0 -8
  131. package/types/api/types/HealthStatus.d.ts +0 -8
  132. package/types/api/types/Runner.d.ts +0 -21
  133. package/types/api/types/RunnerConfig.d.ts +0 -11
  134. package/types/api/types/RunnerConfigKind.d.ts +0 -5
  135. package/types/api/types/RunnerConfigKindNormal.d.ts +0 -7
  136. package/types/api/types/RunnerConfigKindNormalNormal.d.ts +0 -12
  137. package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
  138. package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -29
  139. package/types/api/types/RunnerConfigNormal.d.ts +0 -12
  140. package/types/api/types/RunnerConfigResponse.d.ts +0 -8
  141. package/types/api/types/RunnerConfigServerless.d.ts +0 -29
  142. package/types/api/types/RunnerConfigVariant.d.ts +0 -8
  143. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +0 -4
  144. package/types/api/types/RunnerConfigsListResponse.d.ts +0 -8
  145. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -7
  146. package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -4
  147. package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -4
  148. package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -5
  149. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -7
  150. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -7
  151. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -7
  152. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -6
  153. package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +0 -16
  154. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +0 -6
  155. package/types/api/types/RunnersListNamesResponse.d.ts +0 -8
  156. package/types/api/types/RunnersListResponse.d.ts +0 -8
  157. package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -13
  158. package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -13
  159. package/types/serialization/resources/authTokens/client/index.d.ts +0 -1
  160. package/types/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +0 -16
  161. package/types/serialization/resources/authTokens/client/requests/index.d.ts +0 -1
  162. package/types/serialization/resources/authTokens/index.d.ts +0 -1
  163. package/types/serialization/types/ActorsKvGetResponse.d.ts +0 -13
  164. package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +0 -10
  165. package/types/serialization/types/ActorsSleepRequestBody.d.ts +0 -10
  166. package/types/serialization/types/AuthTokenResource.d.ts +0 -10
  167. package/types/serialization/types/AuthTokenTargetScope.d.ts +0 -11
  168. package/types/serialization/types/AuthTokenTargetScopeId.d.ts +0 -13
  169. package/types/serialization/types/CrashPolicy.d.ts +0 -10
  170. package/types/serialization/types/DatacenterHealth.d.ts +0 -19
  171. package/types/serialization/types/Envoy.d.ts +0 -24
  172. package/types/serialization/types/EnvoysListResponse.d.ts +0 -15
  173. package/types/serialization/types/HealthFanoutResponse.d.ts +0 -13
  174. package/types/serialization/types/HealthResponse.d.ts +0 -14
  175. package/types/serialization/types/HealthStatus.d.ts +0 -10
  176. package/types/serialization/types/Runner.d.ts +0 -27
  177. package/types/serialization/types/RunnerConfig.d.ts +0 -17
  178. package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
  179. package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -13
  180. package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +0 -15
  181. package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
  182. package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -25
  183. package/types/serialization/types/RunnerConfigNormal.d.ts +0 -15
  184. package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
  185. package/types/serialization/types/RunnerConfigServerless.d.ts +0 -25
  186. package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
  187. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
  188. package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
  189. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
  190. package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
  191. package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
  192. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
  193. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
  194. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
  195. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
  196. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
  197. package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
  198. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
  199. package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
  200. package/types/serialization/types/RunnersListResponse.d.ts +0 -15
  201. /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
  202. /package/types/api/resources/{envoys → pools}/index.d.ts +0 -0
@@ -547,79 +547,18 @@ var init_NodePre18StreamWrapper = __esm({
547
547
  // src/api/index.ts
548
548
  var api_exports = {};
549
549
  __export(api_exports, {
550
- AuthOperationKind: () => AuthOperationKind,
551
- AuthTokenResource: () => AuthTokenResource,
552
- CrashPolicy: () => CrashPolicy,
553
- HealthStatus: () => HealthStatus,
554
- RunnerConfigVariant: () => RunnerConfigVariant,
555
550
  authTokens: () => authTokens_exports,
556
551
  datacenters: () => datacenters_exports,
557
- envoys: () => envoys_exports,
558
- health: () => health_exports,
559
552
  metadata: () => metadata_exports,
560
- namespaces: () => namespaces_exports,
561
- runners: () => runners_exports
553
+ namespaces: () => namespaces_exports2,
554
+ pools: () => pools_exports
562
555
  });
563
556
 
564
- // src/api/types/AuthOperationKind.ts
565
- var AuthOperationKind = {
566
- Read: "read",
567
- Update: "update",
568
- List: "list",
569
- Create: "create",
570
- Delete: "delete"
571
- };
572
-
573
- // src/api/types/AuthTokenResource.ts
574
- var AuthTokenResource = {
575
- Namespace: "namespace",
576
- Actor: "actor",
577
- Runner: "runner",
578
- RunnerConfig: "runner_config",
579
- Datacenter: "datacenter",
580
- ActorGateway: "actor_gateway",
581
- ActorKv: "actor_kv"
582
- };
583
-
584
- // src/api/types/CrashPolicy.ts
585
- var CrashPolicy = {
586
- Restart: "restart",
587
- Sleep: "sleep",
588
- Destroy: "destroy"
589
- };
590
-
591
- // src/api/types/HealthStatus.ts
592
- var HealthStatus = {
593
- Ok: "ok",
594
- Error: "error"
595
- };
596
-
597
- // src/api/types/RunnerConfigVariant.ts
598
- var RunnerConfigVariant = {
599
- Serverless: "serverless",
600
- Normal: "normal"
601
- };
602
-
603
557
  // src/api/resources/authTokens/index.ts
604
558
  var authTokens_exports = {};
605
-
606
- // src/api/resources/datacenters/index.ts
607
- var datacenters_exports = {};
608
-
609
- // src/api/resources/envoys/index.ts
610
- var envoys_exports = {};
611
-
612
- // src/api/resources/health/index.ts
613
- var health_exports = {};
614
-
615
- // src/api/resources/metadata/index.ts
616
- var metadata_exports = {};
617
-
618
- // src/api/resources/namespaces/index.ts
619
- var namespaces_exports = {};
620
-
621
- // src/api/resources/runners/index.ts
622
- var runners_exports = {};
559
+ __export(authTokens_exports, {
560
+ AuthTokens: () => AuthTokens
561
+ });
623
562
 
624
563
  // src/core/json.ts
625
564
  var toJson = (value, replacer, space) => {
@@ -2333,6 +2272,9 @@ function transformAndValidateUnion({
2333
2272
  };
2334
2273
  }
2335
2274
 
2275
+ // src/api/resources/authTokens/client/Client.ts
2276
+ import urlJoin from "url-join";
2277
+
2336
2278
  // src/serialization/index.ts
2337
2279
  var serialization_exports = {};
2338
2280
  __export(serialization_exports, {
@@ -2343,91 +2285,53 @@ __export(serialization_exports, {
2343
2285
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2344
2286
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2345
2287
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2346
- ActorsKvGetResponse: () => ActorsKvGetResponse,
2288
+ ActorsGetResponse: () => ActorsGetResponse,
2347
2289
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2348
2290
  ActorsListResponse: () => ActorsListResponse,
2349
- ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2350
2291
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2351
- ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2352
2292
  ActorsSleepResponse: () => ActorsSleepResponse,
2353
- AuthOperationKind: () => AuthOperationKind2,
2354
- AuthTokenCreateRequest: () => AuthTokenCreateRequest,
2293
+ AuthOperationKind: () => AuthOperationKind,
2294
+ AuthResourceKind: () => AuthResourceKind,
2295
+ AuthTargetScope: () => AuthTargetScope,
2355
2296
  AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2356
2297
  AuthTokenGrant: () => AuthTokenGrant,
2357
2298
  AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2358
- AuthTokenResource: () => AuthTokenResource2,
2359
- AuthTokenTargetScope: () => AuthTokenTargetScope,
2360
- AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
2361
- CrashPolicy: () => CrashPolicy2,
2362
2299
  Datacenter: () => Datacenter,
2363
- DatacenterHealth: () => DatacenterHealth,
2364
2300
  DatacentersListResponse: () => DatacentersListResponse,
2365
- Envoy: () => Envoy,
2366
- EnvoysListResponse: () => EnvoysListResponse,
2367
- HealthFanoutResponse: () => HealthFanoutResponse,
2368
- HealthResponse: () => HealthResponse,
2369
- HealthStatus: () => HealthStatus2,
2301
+ ErrorResponse: () => ErrorResponse,
2370
2302
  MetadataGetResponse: () => MetadataGetResponse,
2371
2303
  Namespace: () => Namespace,
2372
2304
  NamespaceListResponse: () => NamespaceListResponse,
2373
2305
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2374
2306
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2307
+ Node: () => Node,
2375
2308
  Pagination: () => Pagination,
2309
+ Pool: () => Pool,
2310
+ PoolResponse: () => PoolResponse,
2311
+ PoolsDeleteResponse: () => PoolsDeleteResponse,
2312
+ PoolsListNodesResponse: () => PoolsListNodesResponse,
2313
+ PoolsListResponse: () => PoolsListResponse,
2376
2314
  RivetId: () => RivetId,
2377
- Runner: () => Runner,
2378
- RunnerConfig: () => RunnerConfig,
2379
- RunnerConfigKind: () => RunnerConfigKind,
2380
- RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2381
- RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
2382
- RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2383
- RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2384
- RunnerConfigNormal: () => RunnerConfigNormal,
2385
- RunnerConfigResponse: () => RunnerConfigResponse,
2386
- RunnerConfigServerless: () => RunnerConfigServerless,
2387
- RunnerConfigVariant: () => RunnerConfigVariant2,
2388
- RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2389
- RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2390
- RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2391
- RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2392
- RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2393
- RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2394
- RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2395
- RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2396
- RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2397
- RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2398
- RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2399
- RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2400
- RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2401
- RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2402
- RunnersListNamesResponse: () => RunnersListNamesResponse,
2403
- RunnersListResponse: () => RunnersListResponse,
2404
- authTokens: () => authTokens_exports2,
2405
- namespaces: () => namespaces_exports2
2315
+ namespaces: () => namespaces_exports
2406
2316
  });
2407
2317
 
2408
2318
  // src/serialization/types/RivetId.ts
2409
2319
  var RivetId = schemas_exports.string();
2410
2320
 
2411
- // src/serialization/types/CrashPolicy.ts
2412
- var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2413
-
2414
2321
  // src/serialization/types/Actor.ts
2415
2322
  var Actor = schemas_exports.object({
2416
2323
  actorId: schemas_exports.property("actor_id", RivetId),
2417
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2418
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2419
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2420
- datacenter: schemas_exports.string(),
2421
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2422
- error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2423
- key: schemas_exports.string().optional(),
2424
2324
  name: schemas_exports.string(),
2425
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2426
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2427
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2428
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2429
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2430
- startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
2325
+ key: schemas_exports.string(),
2326
+ namespace: schemas_exports.string(),
2327
+ pool: schemas_exports.string(),
2328
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2329
+ startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
2330
+ pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
2331
+ connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
2332
+ sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
2333
+ rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
2334
+ destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
2431
2335
  });
2432
2336
 
2433
2337
  // src/serialization/types/ActorName.ts
@@ -2437,11 +2341,12 @@ var ActorName = schemas_exports.object({
2437
2341
 
2438
2342
  // src/serialization/types/ActorsCreateResponse.ts
2439
2343
  var ActorsCreateResponse = schemas_exports.object({
2440
- actor: Actor
2344
+ actor: Actor,
2345
+ created: schemas_exports.boolean()
2441
2346
  });
2442
2347
 
2443
2348
  // src/serialization/types/ActorsDeleteResponse.ts
2444
- var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2349
+ var ActorsDeleteResponse = schemas_exports.object({});
2445
2350
 
2446
2351
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2447
2352
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2449,21 +2354,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2449
2354
  created: schemas_exports.boolean()
2450
2355
  });
2451
2356
 
2452
- // src/serialization/types/ActorsKvGetResponse.ts
2453
- var ActorsKvGetResponse = schemas_exports.object({
2454
- updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2455
- value: schemas_exports.string()
2456
- });
2457
-
2458
- // src/serialization/types/Pagination.ts
2459
- var Pagination = schemas_exports.object({
2460
- cursor: schemas_exports.string().optional()
2357
+ // src/serialization/types/ActorsGetResponse.ts
2358
+ var ActorsGetResponse = schemas_exports.object({
2359
+ actor: Actor
2461
2360
  });
2462
2361
 
2463
2362
  // src/serialization/types/ActorsListNamesResponse.ts
2464
2363
  var ActorsListNamesResponse = schemas_exports.object({
2465
- names: schemas_exports.record(schemas_exports.string(), ActorName),
2466
- pagination: Pagination
2364
+ names: schemas_exports.record(schemas_exports.string(), ActorName)
2365
+ });
2366
+
2367
+ // src/serialization/types/Pagination.ts
2368
+ var Pagination = schemas_exports.object({
2369
+ cursor: schemas_exports.string().nullable()
2467
2370
  });
2468
2371
 
2469
2372
  // src/serialization/types/ActorsListResponse.ts
@@ -2472,143 +2375,76 @@ var ActorsListResponse = schemas_exports.object({
2472
2375
  pagination: Pagination
2473
2376
  });
2474
2377
 
2475
- // src/serialization/types/ActorsRescheduleRequestBody.ts
2476
- var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2477
-
2478
2378
  // src/serialization/types/ActorsRescheduleResponse.ts
2479
- var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2480
-
2481
- // src/serialization/types/ActorsSleepRequestBody.ts
2482
- var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2379
+ var ActorsRescheduleResponse = schemas_exports.object({});
2483
2380
 
2484
2381
  // src/serialization/types/ActorsSleepResponse.ts
2485
- var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2382
+ var ActorsSleepResponse = schemas_exports.object({});
2486
2383
 
2487
2384
  // src/serialization/types/AuthOperationKind.ts
2488
- var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2385
+ var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2386
+
2387
+ // src/serialization/types/AuthResourceKind.ts
2388
+ var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
2389
+
2390
+ // src/serialization/types/AuthTargetScope.ts
2391
+ var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
2392
+ id: RivetId
2393
+ })]);
2489
2394
 
2490
2395
  // src/serialization/types/AuthTokenCreateResponse.ts
2491
2396
  var AuthTokenCreateResponse = schemas_exports.object({
2492
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2397
+ token: schemas_exports.string(),
2493
2398
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2494
- token: schemas_exports.string()
2495
- });
2496
-
2497
- // src/serialization/types/AuthTokenResource.ts
2498
- var AuthTokenResource2 = schemas_exports.enum_([
2499
- "namespace",
2500
- "actor",
2501
- "runner",
2502
- "runner_config",
2503
- "datacenter",
2504
- "actor_gateway",
2505
- "actor_kv"
2506
- ]);
2507
-
2508
- // src/serialization/types/AuthTokenTargetScopeId.ts
2509
- var AuthTokenTargetScopeId = schemas_exports.object({
2510
- id: RivetId
2399
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2511
2400
  });
2512
2401
 
2513
- // src/serialization/types/AuthTokenTargetScope.ts
2514
- var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
2515
-
2516
2402
  // src/serialization/types/AuthTokenGrant.ts
2517
2403
  var AuthTokenGrant = schemas_exports.object({
2518
- operations: schemas_exports.list(AuthOperationKind2),
2519
- resource: AuthTokenResource2,
2520
- target: AuthTokenTargetScope
2404
+ resource: AuthResourceKind,
2405
+ target: AuthTargetScope,
2406
+ operations: schemas_exports.list(AuthOperationKind)
2521
2407
  });
2522
2408
 
2523
2409
  // src/serialization/types/AuthTokenInspectResponse.ts
2524
2410
  var AuthTokenInspectResponse = schemas_exports.object({
2525
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2411
+ namespace: schemas_exports.string(),
2412
+ subject: schemas_exports.string().nullable(),
2526
2413
  grants: schemas_exports.list(AuthTokenGrant),
2527
2414
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2528
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2529
- subject: schemas_exports.string().optional()
2415
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2530
2416
  });
2531
2417
 
2532
2418
  // src/serialization/types/Datacenter.ts
2533
2419
  var Datacenter = schemas_exports.object({
2534
- label: schemas_exports.number(),
2535
- name: schemas_exports.string(),
2536
- url: schemas_exports.string()
2537
- });
2538
-
2539
- // src/serialization/types/HealthResponse.ts
2540
- var HealthResponse = schemas_exports.object({
2541
- runtime: schemas_exports.string(),
2542
- status: schemas_exports.string(),
2543
- version: schemas_exports.string()
2544
- });
2545
-
2546
- // src/serialization/types/HealthStatus.ts
2547
- var HealthStatus2 = schemas_exports.enum_(["ok", "error"]);
2548
-
2549
- // src/serialization/types/DatacenterHealth.ts
2550
- var DatacenterHealth = schemas_exports.object({
2551
- datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2552
- datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2553
- error: schemas_exports.string().optional(),
2554
- response: HealthResponse.optional(),
2555
- rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2556
- status: HealthStatus2
2420
+ name: schemas_exports.string()
2557
2421
  });
2558
2422
 
2559
2423
  // src/serialization/types/DatacentersListResponse.ts
2560
2424
  var DatacentersListResponse = schemas_exports.object({
2561
- datacenters: schemas_exports.list(Datacenter),
2562
- pagination: Pagination
2563
- });
2564
-
2565
- // src/serialization/types/Envoy.ts
2566
- var Envoy = schemas_exports.object({
2567
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2568
- datacenter: schemas_exports.string(),
2569
- envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2570
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2571
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2572
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2573
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2574
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2575
- poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2576
- slots: schemas_exports.number(),
2577
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2578
- version: schemas_exports.number()
2425
+ datacenters: schemas_exports.list(Datacenter)
2579
2426
  });
2580
2427
 
2581
- // src/serialization/types/EnvoysListResponse.ts
2582
- var EnvoysListResponse = schemas_exports.object({
2583
- envoys: schemas_exports.list(Envoy),
2584
- pagination: Pagination
2585
- });
2586
-
2587
- // src/serialization/types/HealthFanoutResponse.ts
2588
- var HealthFanoutResponse = schemas_exports.object({
2589
- datacenters: schemas_exports.list(DatacenterHealth)
2428
+ // src/serialization/types/ErrorResponse.ts
2429
+ var ErrorResponse = schemas_exports.object({
2430
+ group: schemas_exports.string(),
2431
+ code: schemas_exports.string(),
2432
+ message: schemas_exports.string(),
2433
+ metadata: schemas_exports.unknown().optional()
2590
2434
  });
2591
2435
 
2592
2436
  // src/serialization/types/MetadataGetResponse.ts
2593
2437
  var MetadataGetResponse = schemas_exports.object({
2594
- buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2595
- cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2596
- cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2597
- envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
2598
- epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
2599
- gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2600
- runtime: schemas_exports.string(),
2601
- rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2602
- rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2603
- version: schemas_exports.string()
2438
+ runtime: schemas_exports.stringLiteral("engine"),
2439
+ version: schemas_exports.string(),
2440
+ envoyProtocolVersion: schemas_exports.number(),
2441
+ actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
2604
2442
  });
2605
2443
 
2606
2444
  // src/serialization/types/Namespace.ts
2607
2445
  var Namespace = schemas_exports.object({
2608
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2609
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2610
2446
  name: schemas_exports.string(),
2611
- namespaceId: schemas_exports.property("namespace_id", RivetId)
2447
+ createTs: schemas_exports.property("create_ts", schemas_exports.number())
2612
2448
  });
2613
2449
 
2614
2450
  // src/serialization/types/NamespaceListResponse.ts
@@ -2622,258 +2458,75 @@ var NamespacesCreateResponse = schemas_exports.object({
2622
2458
  namespace: Namespace
2623
2459
  });
2624
2460
 
2625
- // src/serialization/types/Runner.ts
2626
- var Runner = schemas_exports.object({
2627
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2628
- datacenter: schemas_exports.string(),
2629
- drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2461
+ // src/serialization/types/Node.ts
2462
+ var Node = schemas_exports.object({
2630
2463
  key: schemas_exports.string(),
2631
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2464
+ pool: schemas_exports.string(),
2465
+ namespace: schemas_exports.string(),
2466
+ datacenter: schemas_exports.string(),
2467
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2632
2468
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2633
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2634
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2635
- name: schemas_exports.string(),
2636
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2637
- remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2638
- runnerId: schemas_exports.property("runner_id", RivetId),
2639
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2640
- totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2641
- version: schemas_exports.number()
2642
- });
2643
-
2644
- // src/serialization/types/RunnerConfigNormal.ts
2645
- var RunnerConfigNormal = schemas_exports.object({
2646
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2647
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2648
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2649
- drainOnVersionUpgrade: schemas_exports.property(
2650
- "drain_on_version_upgrade",
2651
- schemas_exports.boolean().optional()
2652
- )
2653
- });
2654
-
2655
- // src/serialization/types/RunnerConfigServerless.ts
2656
- var RunnerConfigServerless = schemas_exports.object({
2657
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2658
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2659
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2660
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2661
- drainOnVersionUpgrade: schemas_exports.property(
2662
- "drain_on_version_upgrade",
2663
- schemas_exports.boolean().optional()
2664
- ),
2665
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2666
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2667
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2668
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2669
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2670
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2671
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2672
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2673
- url: schemas_exports.string()
2674
- });
2675
-
2676
- // src/serialization/types/RunnerConfig.ts
2677
- var RunnerConfig = schemas_exports.object({
2678
- normal: RunnerConfigNormal.optional(),
2679
- serverless: RunnerConfigServerless.optional(),
2680
- drainOnVersionUpgrade: schemas_exports.property(
2681
- "drain_on_version_upgrade",
2682
- schemas_exports.boolean().optional()
2683
- ),
2684
- metadata: schemas_exports.unknown().optional()
2685
- });
2686
-
2687
- // src/serialization/types/RunnerConfigKindNormalNormal.ts
2688
- var RunnerConfigKindNormalNormal = schemas_exports.object({
2689
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2690
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2691
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2692
- drainOnVersionUpgrade: schemas_exports.property(
2693
- "drain_on_version_upgrade",
2694
- schemas_exports.boolean().optional()
2695
- )
2696
- });
2697
-
2698
- // src/serialization/types/RunnerConfigKindNormal.ts
2699
- var RunnerConfigKindNormal = schemas_exports.object({
2700
- normal: RunnerConfigKindNormalNormal
2701
- });
2702
-
2703
- // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2704
- var RunnerConfigKindServerlessServerless = schemas_exports.object({
2705
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2706
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2707
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2708
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2709
- drainOnVersionUpgrade: schemas_exports.property(
2710
- "drain_on_version_upgrade",
2711
- schemas_exports.boolean().optional()
2712
- ),
2713
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2714
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2715
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2716
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2717
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2718
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2719
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2720
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2721
- url: schemas_exports.string()
2722
- });
2723
-
2724
- // src/serialization/types/RunnerConfigKindServerless.ts
2725
- var RunnerConfigKindServerless = schemas_exports.object({
2726
- serverless: RunnerConfigKindServerlessServerless
2727
- });
2728
-
2729
- // src/serialization/types/RunnerConfigKind.ts
2730
- var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2731
-
2732
- // src/serialization/types/RunnerConfigResponse.ts
2733
- var RunnerConfigResponse = schemas_exports.object({
2734
- protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2735
- runnerPoolError: schemas_exports.property(
2736
- "runner_pool_error",
2737
- schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2738
- )
2739
- }).extend(RunnerConfig);
2740
-
2741
- // src/serialization/types/RunnerConfigVariant.ts
2742
- var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2743
-
2744
- // src/serialization/types/RunnerConfigsDeleteResponse.ts
2745
- var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2746
-
2747
- // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2748
- var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2749
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2750
- });
2751
-
2752
- // src/serialization/types/RunnerConfigsListResponse.ts
2753
- var RunnerConfigsListResponse = schemas_exports.object({
2754
- pagination: Pagination,
2755
- runnerConfigs: schemas_exports.property(
2756
- "runner_configs",
2757
- schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2758
- )
2759
- });
2760
-
2761
- // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2762
- var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2763
-
2764
- // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2765
- var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2766
-
2767
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2768
- var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2769
- version: schemas_exports.string()
2469
+ connected: schemas_exports.boolean(),
2470
+ stopping: schemas_exports.boolean()
2770
2471
  });
2771
2472
 
2772
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2773
- var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2774
- success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2775
- });
2776
-
2777
- // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2778
- var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2779
- details: schemas_exports.string().optional(),
2780
- message: schemas_exports.string(),
2781
- metadata: schemas_exports.unknown().optional()
2782
- });
2783
-
2784
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2785
- var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2786
- error: RunnerConfigsServerlessMetadataError
2473
+ // src/serialization/types/Pool.ts
2474
+ var Pool = schemas_exports.object({
2475
+ name: schemas_exports.string(),
2476
+ drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2477
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2478
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2479
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2480
+ metadata: schemas_exports.unknown()
2787
2481
  });
2788
2482
 
2789
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2790
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2791
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2483
+ // src/serialization/types/PoolResponse.ts
2484
+ var PoolResponse = schemas_exports.object({
2485
+ pool: Pool
2792
2486
  });
2793
2487
 
2794
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2795
- var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2796
- RunnerConfigsServerlessHealthCheckResponseSuccess,
2797
- RunnerConfigsServerlessHealthCheckResponseFailure
2798
- ]);
2799
-
2800
- // src/serialization/types/RunnerConfigsUpsertResponse.ts
2801
- var RunnerConfigsUpsertResponse = schemas_exports.object({
2802
- endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2803
- });
2488
+ // src/serialization/types/PoolsDeleteResponse.ts
2489
+ var PoolsDeleteResponse = schemas_exports.object({});
2804
2490
 
2805
- // src/serialization/types/RunnersListNamesResponse.ts
2806
- var RunnersListNamesResponse = schemas_exports.object({
2807
- names: schemas_exports.list(schemas_exports.string()),
2491
+ // src/serialization/types/PoolsListNodesResponse.ts
2492
+ var PoolsListNodesResponse = schemas_exports.object({
2493
+ nodes: schemas_exports.list(Node),
2808
2494
  pagination: Pagination
2809
2495
  });
2810
2496
 
2811
- // src/serialization/types/RunnersListResponse.ts
2812
- var RunnersListResponse = schemas_exports.object({
2497
+ // src/serialization/types/PoolsListResponse.ts
2498
+ var PoolsListResponse = schemas_exports.object({
2813
2499
  pagination: Pagination,
2814
- runners: schemas_exports.list(Runner)
2500
+ pools: schemas_exports.list(Pool)
2815
2501
  });
2816
2502
 
2817
2503
  // src/serialization/client/requests/ActorsCreateRequest.ts
2818
2504
  var ActorsCreateRequest = schemas_exports.object({
2819
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2820
- datacenter: schemas_exports.string().optional(),
2821
2505
  input: schemas_exports.string().optional(),
2822
2506
  key: schemas_exports.string().optional(),
2823
2507
  name: schemas_exports.string(),
2824
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2508
+ pool: schemas_exports.string().optional()
2825
2509
  });
2826
2510
 
2827
2511
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2828
2512
  var ActorsGetOrCreateRequest = schemas_exports.object({
2829
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2830
- datacenter: schemas_exports.string().optional(),
2831
2513
  input: schemas_exports.string().optional(),
2832
- key: schemas_exports.string(),
2514
+ key: schemas_exports.string().optional(),
2833
2515
  name: schemas_exports.string(),
2834
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2835
- });
2836
-
2837
- // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2838
- var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2839
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2840
- url: schemas_exports.string()
2841
- });
2842
-
2843
- // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2844
- var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2845
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2846
- });
2847
-
2848
- // src/serialization/resources/authTokens/index.ts
2849
- var authTokens_exports2 = {};
2850
- __export(authTokens_exports2, {
2851
- AuthTokenCreateRequest: () => AuthTokenCreateRequest
2852
- });
2853
-
2854
- // src/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.ts
2855
- var AuthTokenCreateRequest = schemas_exports.object({
2856
- duration: schemas_exports.number().optional(),
2857
- grants: schemas_exports.list(AuthTokenGrant),
2858
- namespace: schemas_exports.string(),
2859
- subject: schemas_exports.string().optional()
2516
+ pool: schemas_exports.string().optional()
2860
2517
  });
2861
2518
 
2862
2519
  // src/serialization/resources/namespaces/index.ts
2863
- var namespaces_exports2 = {};
2864
- __export(namespaces_exports2, {
2520
+ var namespaces_exports = {};
2521
+ __export(namespaces_exports, {
2865
2522
  NamespacesCreateRequest: () => NamespacesCreateRequest
2866
2523
  });
2867
2524
 
2868
2525
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2869
2526
  var NamespacesCreateRequest = schemas_exports.object({
2870
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2871
2527
  name: schemas_exports.string()
2872
2528
  });
2873
2529
 
2874
- // src/Client.ts
2875
- import urlJoin8 from "url-join";
2876
-
2877
2530
  // src/errors/RivetError.ts
2878
2531
  var RivetError = class _RivetError extends Error {
2879
2532
  statusCode;
@@ -2916,25 +2569,10 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2916
2569
  };
2917
2570
 
2918
2571
  // src/api/resources/authTokens/client/Client.ts
2919
- import urlJoin from "url-join";
2920
2572
  var AuthTokens = class {
2921
2573
  constructor(_options) {
2922
2574
  this._options = _options;
2923
2575
  }
2924
- /**
2925
- * @param {Rivet.AuthTokenCreateRequest} request
2926
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2927
- *
2928
- * @example
2929
- * await client.authTokens.create({
2930
- * grants: [{
2931
- * operations: ["read"],
2932
- * resource: "namespace",
2933
- * target: "any"
2934
- * }],
2935
- * namespace: "namespace"
2936
- * })
2937
- */
2938
2576
  async create(request, requestOptions) {
2939
2577
  const _response = await (this._options.fetcher ?? fetcher)({
2940
2578
  url: urlJoin(
@@ -2951,7 +2589,12 @@ var AuthTokens = class {
2951
2589
  },
2952
2590
  contentType: "application/json",
2953
2591
  requestType: "json",
2954
- body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2592
+ body: {
2593
+ namespace: request.namespace,
2594
+ duration: request.duration,
2595
+ subject: request.subject,
2596
+ grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2597
+ },
2955
2598
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2956
2599
  maxRetries: requestOptions?.maxRetries,
2957
2600
  abortSignal: requestOptions?.abortSignal
@@ -2985,12 +2628,6 @@ var AuthTokens = class {
2985
2628
  });
2986
2629
  }
2987
2630
  }
2988
- /**
2989
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2990
- *
2991
- * @example
2992
- * await client.authTokens.inspect()
2993
- */
2994
2631
  async inspect(requestOptions) {
2995
2632
  const _response = await (this._options.fetcher ?? fetcher)({
2996
2633
  url: urlJoin(
@@ -3045,6 +2682,21 @@ var AuthTokens = class {
3045
2682
  }
3046
2683
  };
3047
2684
 
2685
+ // src/api/resources/datacenters/index.ts
2686
+ var datacenters_exports = {};
2687
+
2688
+ // src/api/resources/metadata/index.ts
2689
+ var metadata_exports = {};
2690
+
2691
+ // src/api/resources/namespaces/index.ts
2692
+ var namespaces_exports2 = {};
2693
+
2694
+ // src/api/resources/pools/index.ts
2695
+ var pools_exports = {};
2696
+
2697
+ // src/Client.ts
2698
+ import urlJoin6 from "url-join";
2699
+
3048
2700
  // src/api/resources/datacenters/client/Client.ts
3049
2701
  import urlJoin2 from "url-join";
3050
2702
  var Datacenters = class {
@@ -3111,45 +2763,23 @@ var Datacenters = class {
3111
2763
  }
3112
2764
  };
3113
2765
 
3114
- // src/api/resources/envoys/client/Client.ts
2766
+ // src/api/resources/metadata/client/Client.ts
3115
2767
  import urlJoin3 from "url-join";
3116
- var Envoys = class {
2768
+ var Metadata = class {
3117
2769
  constructor(_options) {
3118
2770
  this._options = _options;
3119
2771
  }
3120
2772
  /**
3121
- * @param {Rivet.EnvoysListRequest} request
3122
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2773
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3123
2774
  *
3124
2775
  * @example
3125
- * await client.envoys.list({
3126
- * namespace: "namespace"
3127
- * })
2776
+ * await client.metadata.get()
3128
2777
  */
3129
- async list(request, requestOptions) {
3130
- const { namespace, name, envoyKey, limit, cursor } = request;
3131
- const _queryParams = {};
3132
- _queryParams["namespace"] = namespace;
3133
- if (name != null) {
3134
- _queryParams["name"] = name;
3135
- }
3136
- if (envoyKey != null) {
3137
- if (Array.isArray(envoyKey)) {
3138
- _queryParams["envoy_key"] = envoyKey.map((item) => item);
3139
- } else {
3140
- _queryParams["envoy_key"] = envoyKey;
3141
- }
3142
- }
3143
- if (limit != null) {
3144
- _queryParams["limit"] = limit.toString();
3145
- }
3146
- if (cursor != null) {
3147
- _queryParams["cursor"] = cursor;
3148
- }
2778
+ async get(requestOptions) {
3149
2779
  const _response = await (this._options.fetcher ?? fetcher)({
3150
2780
  url: urlJoin3(
3151
2781
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3152
- "envoys"
2782
+ "metadata"
3153
2783
  ),
3154
2784
  method: "GET",
3155
2785
  headers: {
@@ -3160,14 +2790,13 @@ var Envoys = class {
3160
2790
  ...requestOptions?.headers
3161
2791
  },
3162
2792
  contentType: "application/json",
3163
- queryParameters: _queryParams,
3164
2793
  requestType: "json",
3165
2794
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3166
2795
  maxRetries: requestOptions?.maxRetries,
3167
2796
  abortSignal: requestOptions?.abortSignal
3168
2797
  });
3169
2798
  if (_response.ok) {
3170
- return EnvoysListResponse.parseOrThrow(_response.body, {
2799
+ return MetadataGetResponse.parseOrThrow(_response.body, {
3171
2800
  unrecognizedObjectKeys: "passthrough",
3172
2801
  allowUnrecognizedUnionMembers: true,
3173
2802
  allowUnrecognizedEnumValues: true,
@@ -3188,7 +2817,7 @@ var Envoys = class {
3188
2817
  body: _response.error.rawBody
3189
2818
  });
3190
2819
  case "timeout":
3191
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2820
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3192
2821
  case "unknown":
3193
2822
  throw new RivetError({
3194
2823
  message: _response.error.errorMessage
@@ -3200,23 +2829,35 @@ var Envoys = class {
3200
2829
  }
3201
2830
  };
3202
2831
 
3203
- // src/api/resources/health/client/Client.ts
2832
+ // src/api/resources/namespaces/client/Client.ts
3204
2833
  import urlJoin4 from "url-join";
3205
- var Health = class {
2834
+ var Namespaces = class {
3206
2835
  constructor(_options) {
3207
2836
  this._options = _options;
3208
2837
  }
3209
2838
  /**
3210
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2839
+ * @param {Rivet.NamespacesListRequest} request
2840
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3211
2841
  *
3212
2842
  * @example
3213
- * await client.health.fanout()
2843
+ * await client.namespaces.list()
3214
2844
  */
3215
- async fanout(requestOptions) {
2845
+ async list(request = {}, requestOptions) {
2846
+ const { limit, cursor, name } = request;
2847
+ const _queryParams = {};
2848
+ if (limit != null) {
2849
+ _queryParams["limit"] = limit.toString();
2850
+ }
2851
+ if (cursor != null) {
2852
+ _queryParams["cursor"] = cursor;
2853
+ }
2854
+ if (name != null) {
2855
+ _queryParams["name"] = name;
2856
+ }
3216
2857
  const _response = await (this._options.fetcher ?? fetcher)({
3217
2858
  url: urlJoin4(
3218
2859
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3219
- "health/fanout"
2860
+ "namespaces"
3220
2861
  ),
3221
2862
  method: "GET",
3222
2863
  headers: {
@@ -3227,13 +2868,14 @@ var Health = class {
3227
2868
  ...requestOptions?.headers
3228
2869
  },
3229
2870
  contentType: "application/json",
2871
+ queryParameters: _queryParams,
3230
2872
  requestType: "json",
3231
2873
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3232
2874
  maxRetries: requestOptions?.maxRetries,
3233
2875
  abortSignal: requestOptions?.abortSignal
3234
2876
  });
3235
2877
  if (_response.ok) {
3236
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2878
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3237
2879
  unrecognizedObjectKeys: "passthrough",
3238
2880
  allowUnrecognizedUnionMembers: true,
3239
2881
  allowUnrecognizedEnumValues: true,
@@ -3254,37 +2896,29 @@ var Health = class {
3254
2896
  body: _response.error.rawBody
3255
2897
  });
3256
2898
  case "timeout":
3257
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2899
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3258
2900
  case "unknown":
3259
2901
  throw new RivetError({
3260
2902
  message: _response.error.errorMessage
3261
2903
  });
3262
2904
  }
3263
2905
  }
3264
- async _getAuthorizationHeader() {
3265
- return `Bearer ${await Supplier.get(this._options.token)}`;
3266
- }
3267
- };
3268
-
3269
- // src/api/resources/metadata/client/Client.ts
3270
- import urlJoin5 from "url-join";
3271
- var Metadata = class {
3272
- constructor(_options) {
3273
- this._options = _options;
3274
- }
3275
2906
  /**
3276
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2907
+ * @param {Rivet.NamespacesCreateRequest} request
2908
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3277
2909
  *
3278
2910
  * @example
3279
- * await client.metadata.get()
2911
+ * await client.namespaces.create({
2912
+ * name: "name"
2913
+ * })
3280
2914
  */
3281
- async get(requestOptions) {
2915
+ async create(request, requestOptions) {
3282
2916
  const _response = await (this._options.fetcher ?? fetcher)({
3283
- url: urlJoin5(
2917
+ url: urlJoin4(
3284
2918
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3285
- "metadata"
2919
+ "namespaces"
3286
2920
  ),
3287
- method: "GET",
2921
+ method: "POST",
3288
2922
  headers: {
3289
2923
  Authorization: await this._getAuthorizationHeader(),
3290
2924
  "X-Fern-Language": "JavaScript",
@@ -3294,12 +2928,13 @@ var Metadata = class {
3294
2928
  },
3295
2929
  contentType: "application/json",
3296
2930
  requestType: "json",
2931
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3297
2932
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3298
2933
  maxRetries: requestOptions?.maxRetries,
3299
2934
  abortSignal: requestOptions?.abortSignal
3300
2935
  });
3301
2936
  if (_response.ok) {
3302
- return MetadataGetResponse.parseOrThrow(_response.body, {
2937
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3303
2938
  unrecognizedObjectKeys: "passthrough",
3304
2939
  allowUnrecognizedUnionMembers: true,
3305
2940
  allowUnrecognizedEnumValues: true,
@@ -3320,7 +2955,7 @@ var Metadata = class {
3320
2955
  body: _response.error.rawBody
3321
2956
  });
3322
2957
  case "timeout":
3323
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2958
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3324
2959
  case "unknown":
3325
2960
  throw new RivetError({
3326
2961
  message: _response.error.errorMessage
@@ -3332,47 +2967,38 @@ var Metadata = class {
3332
2967
  }
3333
2968
  };
3334
2969
 
3335
- // src/api/resources/namespaces/client/Client.ts
3336
- import urlJoin6 from "url-join";
3337
- var Namespaces = class {
2970
+ // src/api/resources/pools/client/Client.ts
2971
+ import urlJoin5 from "url-join";
2972
+ var Pools = class {
3338
2973
  constructor(_options) {
3339
2974
  this._options = _options;
3340
2975
  }
3341
2976
  /**
3342
- * @param {Rivet.NamespacesListRequest} request
3343
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
2977
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
2978
+ *
2979
+ * @param {Rivet.PoolsListRequest} request
2980
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3344
2981
  *
3345
2982
  * @example
3346
- * await client.namespaces.list()
2983
+ * await client.pools.list({
2984
+ * namespace: "namespace"
2985
+ * })
3347
2986
  */
3348
- async list(request = {}, requestOptions) {
3349
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
2987
+ async list(request, requestOptions) {
2988
+ const { namespace, limit, cursor } = request;
3350
2989
  const _queryParams = {};
2990
+ if (namespace != null)
2991
+ _queryParams["namespace"] = namespace;
3351
2992
  if (limit != null) {
3352
2993
  _queryParams["limit"] = limit.toString();
3353
2994
  }
3354
2995
  if (cursor != null) {
3355
2996
  _queryParams["cursor"] = cursor;
3356
2997
  }
3357
- if (name != null) {
3358
- _queryParams["name"] = name;
3359
- }
3360
- if (namespaceIds != null) {
3361
- _queryParams["namespace_ids"] = namespaceIds;
3362
- }
3363
- if (namespaceId != null) {
3364
- if (Array.isArray(namespaceId)) {
3365
- _queryParams["namespace_id"] = namespaceId.map(
3366
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3367
- );
3368
- } else {
3369
- _queryParams["namespace_id"] = namespaceId;
3370
- }
3371
- }
3372
2998
  const _response = await (this._options.fetcher ?? fetcher)({
3373
- url: urlJoin6(
2999
+ url: urlJoin5(
3374
3000
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3375
- "namespaces"
3001
+ "pools"
3376
3002
  ),
3377
3003
  method: "GET",
3378
3004
  headers: {
@@ -3390,7 +3016,7 @@ var Namespaces = class {
3390
3016
  abortSignal: requestOptions?.abortSignal
3391
3017
  });
3392
3018
  if (_response.ok) {
3393
- return NamespaceListResponse.parseOrThrow(_response.body, {
3019
+ return PoolsListResponse.parseOrThrow(_response.body, {
3394
3020
  unrecognizedObjectKeys: "passthrough",
3395
3021
  allowUnrecognizedUnionMembers: true,
3396
3022
  allowUnrecognizedEnumValues: true,
@@ -3411,7 +3037,7 @@ var Namespaces = class {
3411
3037
  body: _response.error.rawBody
3412
3038
  });
3413
3039
  case "timeout":
3414
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3040
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3415
3041
  case "unknown":
3416
3042
  throw new RivetError({
3417
3043
  message: _response.error.errorMessage
@@ -3419,22 +3045,34 @@ var Namespaces = class {
3419
3045
  }
3420
3046
  }
3421
3047
  /**
3422
- * @param {Rivet.NamespacesCreateRequest} request
3423
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3048
+ * Lists the live nodes of a pool in node key order.
3049
+ *
3050
+ * @param {string} pool
3051
+ * @param {Rivet.PoolsListNodesRequest} request
3052
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3424
3053
  *
3425
3054
  * @example
3426
- * await client.namespaces.create({
3427
- * displayName: "display_name",
3428
- * name: "name"
3055
+ * await client.pools.listNodes("pool", {
3056
+ * namespace: "namespace"
3429
3057
  * })
3430
3058
  */
3431
- async create(request, requestOptions) {
3059
+ async listNodes(pool, request, requestOptions) {
3060
+ const { namespace, limit, cursor } = request;
3061
+ const _queryParams = {};
3062
+ if (namespace != null)
3063
+ _queryParams["namespace"] = namespace;
3064
+ if (limit != null) {
3065
+ _queryParams["limit"] = limit.toString();
3066
+ }
3067
+ if (cursor != null) {
3068
+ _queryParams["cursor"] = cursor;
3069
+ }
3432
3070
  const _response = await (this._options.fetcher ?? fetcher)({
3433
- url: urlJoin6(
3071
+ url: urlJoin5(
3434
3072
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3435
- "namespaces"
3073
+ `pools/${encodeURIComponent(pool)}/nodes`
3436
3074
  ),
3437
- method: "POST",
3075
+ method: "GET",
3438
3076
  headers: {
3439
3077
  Authorization: await this._getAuthorizationHeader(),
3440
3078
  "X-Fern-Language": "JavaScript",
@@ -3443,14 +3081,14 @@ var Namespaces = class {
3443
3081
  ...requestOptions?.headers
3444
3082
  },
3445
3083
  contentType: "application/json",
3084
+ queryParameters: _queryParams,
3446
3085
  requestType: "json",
3447
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3448
3086
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3449
3087
  maxRetries: requestOptions?.maxRetries,
3450
3088
  abortSignal: requestOptions?.abortSignal
3451
3089
  });
3452
3090
  if (_response.ok) {
3453
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3091
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3454
3092
  unrecognizedObjectKeys: "passthrough",
3455
3093
  allowUnrecognizedUnionMembers: true,
3456
3094
  allowUnrecognizedEnumValues: true,
@@ -3471,65 +3109,21 @@ var Namespaces = class {
3471
3109
  body: _response.error.rawBody
3472
3110
  });
3473
3111
  case "timeout":
3474
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3112
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3475
3113
  case "unknown":
3476
3114
  throw new RivetError({
3477
3115
  message: _response.error.errorMessage
3478
3116
  });
3479
3117
  }
3480
3118
  }
3481
- async _getAuthorizationHeader() {
3482
- return `Bearer ${await Supplier.get(this._options.token)}`;
3483
- }
3484
- };
3485
-
3486
- // src/api/resources/runners/client/Client.ts
3487
- import urlJoin7 from "url-join";
3488
- var Runners = class {
3489
- constructor(_options) {
3490
- this._options = _options;
3491
- }
3492
- /**
3493
- * @param {Rivet.RunnersListRequest} request
3494
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3495
- *
3496
- * @example
3497
- * await client.runners.list({
3498
- * namespace: "namespace"
3499
- * })
3500
- */
3501
- async list(request, requestOptions) {
3502
- const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3119
+ async get(name, request = {}, requestOptions) {
3503
3120
  const _queryParams = {};
3504
- _queryParams["namespace"] = namespace;
3505
- if (name != null) {
3506
- _queryParams["name"] = name;
3507
- }
3508
- if (runnerIds != null) {
3509
- _queryParams["runner_ids"] = runnerIds;
3510
- }
3511
- if (runnerId != null) {
3512
- if (Array.isArray(runnerId)) {
3513
- _queryParams["runner_id"] = runnerId.map(
3514
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3515
- );
3516
- } else {
3517
- _queryParams["runner_id"] = runnerId;
3518
- }
3519
- }
3520
- if (includeStopped != null) {
3521
- _queryParams["include_stopped"] = includeStopped.toString();
3522
- }
3523
- if (limit != null) {
3524
- _queryParams["limit"] = limit.toString();
3525
- }
3526
- if (cursor != null) {
3527
- _queryParams["cursor"] = cursor;
3528
- }
3121
+ if (request.namespace != null)
3122
+ _queryParams["namespace"] = request.namespace;
3529
3123
  const _response = await (this._options.fetcher ?? fetcher)({
3530
- url: urlJoin7(
3124
+ url: urlJoin5(
3531
3125
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3532
- "runners"
3126
+ `pools/${encodeURIComponent(name)}`
3533
3127
  ),
3534
3128
  method: "GET",
3535
3129
  headers: {
@@ -3547,7 +3141,7 @@ var Runners = class {
3547
3141
  abortSignal: requestOptions?.abortSignal
3548
3142
  });
3549
3143
  if (_response.ok) {
3550
- return RunnersListResponse.parseOrThrow(_response.body, {
3144
+ return PoolResponse.parseOrThrow(_response.body, {
3551
3145
  unrecognizedObjectKeys: "passthrough",
3552
3146
  allowUnrecognizedUnionMembers: true,
3553
3147
  allowUnrecognizedEnumValues: true,
@@ -3568,43 +3162,23 @@ var Runners = class {
3568
3162
  body: _response.error.rawBody
3569
3163
  });
3570
3164
  case "timeout":
3571
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3165
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3572
3166
  case "unknown":
3573
3167
  throw new RivetError({
3574
3168
  message: _response.error.errorMessage
3575
3169
  });
3576
3170
  }
3577
3171
  }
3578
- /**
3579
- * 2 round trips:
3580
- *
3581
- * - GET /runners/names (fanout)
3582
- * - [api-peer] namespace::ops::resolve_for_name_global
3583
- *
3584
- * @param {Rivet.RunnersListNamesRequest} request
3585
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3586
- *
3587
- * @example
3588
- * await client.runners.listNames({
3589
- * namespace: "namespace"
3590
- * })
3591
- */
3592
- async listNames(request, requestOptions) {
3593
- const { namespace, limit, cursor } = request;
3172
+ async upsert(name, request, requestOptions) {
3594
3173
  const _queryParams = {};
3595
- _queryParams["namespace"] = namespace;
3596
- if (limit != null) {
3597
- _queryParams["limit"] = limit.toString();
3598
- }
3599
- if (cursor != null) {
3600
- _queryParams["cursor"] = cursor;
3601
- }
3174
+ if (request.namespace != null)
3175
+ _queryParams["namespace"] = request.namespace;
3602
3176
  const _response = await (this._options.fetcher ?? fetcher)({
3603
- url: urlJoin7(
3177
+ url: urlJoin5(
3604
3178
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3605
- "runners/names"
3179
+ `pools/${encodeURIComponent(name)}`
3606
3180
  ),
3607
- method: "GET",
3181
+ method: "PUT",
3608
3182
  headers: {
3609
3183
  Authorization: await this._getAuthorizationHeader(),
3610
3184
  "X-Fern-Language": "JavaScript",
@@ -3615,12 +3189,19 @@ var Runners = class {
3615
3189
  contentType: "application/json",
3616
3190
  queryParameters: _queryParams,
3617
3191
  requestType: "json",
3192
+ body: {
3193
+ drain_on_version_upgrade: request.drainOnVersionUpgrade,
3194
+ actor_eviction_delay: request.actorEvictionDelay,
3195
+ actor_eviction_period: request.actorEvictionPeriod,
3196
+ actor_eviction_rate: request.actorEvictionRate,
3197
+ metadata: request.metadata
3198
+ },
3618
3199
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3619
3200
  maxRetries: requestOptions?.maxRetries,
3620
3201
  abortSignal: requestOptions?.abortSignal
3621
3202
  });
3622
3203
  if (_response.ok) {
3623
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3204
+ return PoolResponse.parseOrThrow(_response.body, {
3624
3205
  unrecognizedObjectKeys: "passthrough",
3625
3206
  allowUnrecognizedUnionMembers: true,
3626
3207
  allowUnrecognizedEnumValues: true,
@@ -3641,7 +3222,54 @@ var Runners = class {
3641
3222
  body: _response.error.rawBody
3642
3223
  });
3643
3224
  case "timeout":
3644
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3225
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3226
+ case "unknown":
3227
+ throw new RivetError({
3228
+ message: _response.error.errorMessage
3229
+ });
3230
+ }
3231
+ }
3232
+ async delete(name, request = {}, requestOptions) {
3233
+ const _queryParams = {};
3234
+ if (request.namespace != null)
3235
+ _queryParams["namespace"] = request.namespace;
3236
+ const _response = await (this._options.fetcher ?? fetcher)({
3237
+ url: urlJoin5(
3238
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3239
+ `pools/${encodeURIComponent(name)}`
3240
+ ),
3241
+ method: "DELETE",
3242
+ headers: {
3243
+ Authorization: await this._getAuthorizationHeader(),
3244
+ "X-Fern-Language": "JavaScript",
3245
+ "X-Fern-Runtime": RUNTIME.type,
3246
+ "X-Fern-Runtime-Version": RUNTIME.version,
3247
+ ...requestOptions?.headers
3248
+ },
3249
+ contentType: "application/json",
3250
+ queryParameters: _queryParams,
3251
+ requestType: "json",
3252
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3253
+ maxRetries: requestOptions?.maxRetries,
3254
+ abortSignal: requestOptions?.abortSignal
3255
+ });
3256
+ if (_response.ok) {
3257
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3258
+ }
3259
+ if (_response.error.reason === "status-code") {
3260
+ throw new RivetError({
3261
+ statusCode: _response.error.statusCode,
3262
+ body: _response.error.body
3263
+ });
3264
+ }
3265
+ switch (_response.error.reason) {
3266
+ case "non-json":
3267
+ throw new RivetError({
3268
+ statusCode: _response.error.statusCode,
3269
+ body: _response.error.rawBody
3270
+ });
3271
+ case "timeout":
3272
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3645
3273
  case "unknown":
3646
3274
  throw new RivetError({
3647
3275
  message: _response.error.errorMessage
@@ -3660,31 +3288,23 @@ var RivetClient = class {
3660
3288
  }
3661
3289
  _authTokens;
3662
3290
  _datacenters;
3663
- _envoys;
3664
- _health;
3665
3291
  _metadata;
3666
3292
  _namespaces;
3667
- _runners;
3293
+ _pools;
3668
3294
  get authTokens() {
3669
3295
  return this._authTokens ??= new AuthTokens(this._options);
3670
3296
  }
3671
3297
  get datacenters() {
3672
3298
  return this._datacenters ??= new Datacenters(this._options);
3673
3299
  }
3674
- get envoys() {
3675
- return this._envoys ??= new Envoys(this._options);
3676
- }
3677
- get health() {
3678
- return this._health ??= new Health(this._options);
3679
- }
3680
3300
  get metadata() {
3681
3301
  return this._metadata ??= new Metadata(this._options);
3682
3302
  }
3683
3303
  get namespaces() {
3684
3304
  return this._namespaces ??= new Namespaces(this._options);
3685
3305
  }
3686
- get runners() {
3687
- return this._runners ??= new Runners(this._options);
3306
+ get pools() {
3307
+ return this._pools ??= new Pools(this._options);
3688
3308
  }
3689
3309
  /**
3690
3310
  * **If key is some & `include_destroyed` is false**
@@ -3721,7 +3341,8 @@ var RivetClient = class {
3721
3341
  async actorsList(request, requestOptions) {
3722
3342
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3723
3343
  const _queryParams = {};
3724
- _queryParams["namespace"] = namespace;
3344
+ if (namespace != null)
3345
+ _queryParams["namespace"] = namespace;
3725
3346
  if (name != null) {
3726
3347
  _queryParams["name"] = name;
3727
3348
  }
@@ -3731,15 +3352,8 @@ var RivetClient = class {
3731
3352
  if (actorIds != null) {
3732
3353
  _queryParams["actor_ids"] = actorIds;
3733
3354
  }
3734
- if (actorId != null) {
3735
- if (Array.isArray(actorId)) {
3736
- _queryParams["actor_id"] = actorId.map(
3737
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3738
- );
3739
- } else {
3740
- _queryParams["actor_id"] = actorId;
3741
- }
3742
- }
3355
+ if (actorId != null)
3356
+ _queryParams["actor_id"] = actorId;
3743
3357
  if (includeDestroyed != null) {
3744
3358
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3745
3359
  }
@@ -3750,7 +3364,7 @@ var RivetClient = class {
3750
3364
  _queryParams["cursor"] = cursor;
3751
3365
  }
3752
3366
  const _response = await (this._options.fetcher ?? fetcher)({
3753
- url: urlJoin8(
3367
+ url: urlJoin6(
3754
3368
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3755
3369
  "actors"
3756
3370
  ),
@@ -3822,17 +3436,17 @@ var RivetClient = class {
3822
3436
  * @example
3823
3437
  * await client.actorsCreate({
3824
3438
  * namespace: "namespace",
3825
- * crashPolicy: "restart",
3826
3439
  * name: "name",
3827
- * runnerNameSelector: "runner_name_selector"
3440
+ * pool: "pool"
3828
3441
  * })
3829
3442
  */
3830
3443
  async actorsCreate(request, requestOptions) {
3831
3444
  const { namespace, ..._body } = request;
3832
3445
  const _queryParams = {};
3833
- _queryParams["namespace"] = namespace;
3446
+ if (namespace != null)
3447
+ _queryParams["namespace"] = namespace;
3834
3448
  const _response = await (this._options.fetcher ?? fetcher)({
3835
- url: urlJoin8(
3449
+ url: urlJoin6(
3836
3450
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3837
3451
  "actors"
3838
3452
  ),
@@ -3914,18 +3528,18 @@ var RivetClient = class {
3914
3528
  * @example
3915
3529
  * await client.actorsGetOrCreate({
3916
3530
  * namespace: "namespace",
3917
- * crashPolicy: "restart",
3918
3531
  * key: "key",
3919
3532
  * name: "name",
3920
- * runnerNameSelector: "runner_name_selector"
3533
+ * pool: "pool"
3921
3534
  * })
3922
3535
  */
3923
3536
  async actorsGetOrCreate(request, requestOptions) {
3924
3537
  const { namespace, ..._body } = request;
3925
3538
  const _queryParams = {};
3926
- _queryParams["namespace"] = namespace;
3539
+ if (namespace != null)
3540
+ _queryParams["namespace"] = namespace;
3927
3541
  const _response = await (this._options.fetcher ?? fetcher)({
3928
- url: urlJoin8(
3542
+ url: urlJoin6(
3929
3543
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3930
3544
  "actors"
3931
3545
  ),
@@ -3991,7 +3605,8 @@ var RivetClient = class {
3991
3605
  async actorsListNames(request, requestOptions) {
3992
3606
  const { namespace, limit, cursor } = request;
3993
3607
  const _queryParams = {};
3994
- _queryParams["namespace"] = namespace;
3608
+ if (namespace != null)
3609
+ _queryParams["namespace"] = namespace;
3995
3610
  if (limit != null) {
3996
3611
  _queryParams["limit"] = limit.toString();
3997
3612
  }
@@ -3999,7 +3614,7 @@ var RivetClient = class {
3999
3614
  _queryParams["cursor"] = cursor;
4000
3615
  }
4001
3616
  const _response = await (this._options.fetcher ?? fetcher)({
4002
- url: urlJoin8(
3617
+ url: urlJoin6(
4003
3618
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4004
3619
  "actors/names"
4005
3620
  ),
@@ -4062,16 +3677,18 @@ var RivetClient = class {
4062
3677
  * namespace: "namespace"
4063
3678
  * })
4064
3679
  */
4065
- async actorsDelete(actorId, request, requestOptions) {
3680
+ /** Returns one actor by ID. */
3681
+ async actorsGet(actorId, request, requestOptions) {
4066
3682
  const { namespace } = request;
4067
3683
  const _queryParams = {};
4068
- _queryParams["namespace"] = namespace;
3684
+ if (namespace != null)
3685
+ _queryParams["namespace"] = namespace;
4069
3686
  const _response = await (this._options.fetcher ?? fetcher)({
4070
- url: urlJoin8(
3687
+ url: urlJoin6(
4071
3688
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4072
3689
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4073
3690
  ),
4074
- method: "DELETE",
3691
+ method: "GET",
4075
3692
  headers: {
4076
3693
  Authorization: await this._getAuthorizationHeader(),
4077
3694
  "X-Fern-Language": "JavaScript",
@@ -4087,7 +3704,7 @@ var RivetClient = class {
4087
3704
  abortSignal: requestOptions?.abortSignal
4088
3705
  });
4089
3706
  if (_response.ok) {
4090
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3707
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4091
3708
  unrecognizedObjectKeys: "passthrough",
4092
3709
  allowUnrecognizedUnionMembers: true,
4093
3710
  allowUnrecognizedEnumValues: true,
@@ -4108,34 +3725,24 @@ var RivetClient = class {
4108
3725
  body: _response.error.rawBody
4109
3726
  });
4110
3727
  case "timeout":
4111
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3728
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4112
3729
  case "unknown":
4113
3730
  throw new RivetError({
4114
3731
  message: _response.error.errorMessage
4115
3732
  });
4116
3733
  }
4117
3734
  }
4118
- /**
4119
- * @param {Rivet.RivetId} actorId
4120
- * @param {string} key
4121
- * @param {Rivet.ActorsKvGetRequest} request
4122
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4123
- *
4124
- * @example
4125
- * await client.actorsKvGet("actor_id", "key", {
4126
- * namespace: "namespace"
4127
- * })
4128
- */
4129
- async actorsKvGet(actorId, key, request, requestOptions) {
3735
+ async actorsDelete(actorId, request, requestOptions) {
4130
3736
  const { namespace } = request;
4131
3737
  const _queryParams = {};
4132
- _queryParams["namespace"] = namespace;
3738
+ if (namespace != null)
3739
+ _queryParams["namespace"] = namespace;
4133
3740
  const _response = await (this._options.fetcher ?? fetcher)({
4134
- url: urlJoin8(
3741
+ url: urlJoin6(
4135
3742
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4136
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3743
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4137
3744
  ),
4138
- method: "GET",
3745
+ method: "DELETE",
4139
3746
  headers: {
4140
3747
  Authorization: await this._getAuthorizationHeader(),
4141
3748
  "X-Fern-Language": "JavaScript",
@@ -4151,7 +3758,7 @@ var RivetClient = class {
4151
3758
  abortSignal: requestOptions?.abortSignal
4152
3759
  });
4153
3760
  if (_response.ok) {
4154
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3761
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4155
3762
  unrecognizedObjectKeys: "passthrough",
4156
3763
  allowUnrecognizedUnionMembers: true,
4157
3764
  allowUnrecognizedEnumValues: true,
@@ -4172,9 +3779,7 @@ var RivetClient = class {
4172
3779
  body: _response.error.rawBody
4173
3780
  });
4174
3781
  case "timeout":
4175
- throw new RivetTimeoutError(
4176
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4177
- );
3782
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4178
3783
  case "unknown":
4179
3784
  throw new RivetError({
4180
3785
  message: _response.error.errorMessage
@@ -4189,17 +3794,15 @@ var RivetClient = class {
4189
3794
  * @example
4190
3795
  * await client.actorsReschedule("actor_id", {
4191
3796
  * namespace: "namespace",
4192
- * body: {
4193
- * "key": "value"
4194
- * }
4195
3797
  * })
4196
3798
  */
4197
3799
  async actorsReschedule(actorId, request, requestOptions) {
4198
- const { namespace, body: _body } = request;
3800
+ const { namespace } = request;
4199
3801
  const _queryParams = {};
4200
- _queryParams["namespace"] = namespace;
3802
+ if (namespace != null)
3803
+ _queryParams["namespace"] = namespace;
4201
3804
  const _response = await (this._options.fetcher ?? fetcher)({
4202
- url: urlJoin8(
3805
+ url: urlJoin6(
4203
3806
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4204
3807
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4205
3808
  ),
@@ -4214,7 +3817,6 @@ var RivetClient = class {
4214
3817
  contentType: "application/json",
4215
3818
  queryParameters: _queryParams,
4216
3819
  requestType: "json",
4217
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4218
3820
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4219
3821
  maxRetries: requestOptions?.maxRetries,
4220
3822
  abortSignal: requestOptions?.abortSignal
@@ -4256,17 +3858,15 @@ var RivetClient = class {
4256
3858
  * @example
4257
3859
  * await client.actorsSleep("actor_id", {
4258
3860
  * namespace: "namespace",
4259
- * body: {
4260
- * "key": "value"
4261
- * }
4262
3861
  * })
4263
3862
  */
4264
3863
  async actorsSleep(actorId, request, requestOptions) {
4265
- const { namespace, body: _body } = request;
3864
+ const { namespace } = request;
4266
3865
  const _queryParams = {};
4267
- _queryParams["namespace"] = namespace;
3866
+ if (namespace != null)
3867
+ _queryParams["namespace"] = namespace;
4268
3868
  const _response = await (this._options.fetcher ?? fetcher)({
4269
- url: urlJoin8(
3869
+ url: urlJoin6(
4270
3870
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4271
3871
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4272
3872
  ),
@@ -4281,7 +3881,6 @@ var RivetClient = class {
4281
3881
  contentType: "application/json",
4282
3882
  queryParameters: _queryParams,
4283
3883
  requestType: "json",
4284
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4285
3884
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4286
3885
  maxRetries: requestOptions?.maxRetries,
4287
3886
  abortSignal: requestOptions?.abortSignal
@@ -4315,360 +3914,6 @@ var RivetClient = class {
4315
3914
  });
4316
3915
  }
4317
3916
  }
4318
- /**
4319
- * @param {Rivet.RunnerConfigsListRequest} request
4320
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4321
- *
4322
- * @example
4323
- * await client.runnerConfigsList({
4324
- * namespace: "namespace"
4325
- * })
4326
- */
4327
- async runnerConfigsList(request, requestOptions) {
4328
- const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
4329
- const _queryParams = {};
4330
- _queryParams["namespace"] = namespace;
4331
- if (limit != null) {
4332
- _queryParams["limit"] = limit.toString();
4333
- }
4334
- if (cursor != null) {
4335
- _queryParams["cursor"] = cursor;
4336
- }
4337
- if (variant != null) {
4338
- _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4339
- unrecognizedObjectKeys: "strip"
4340
- });
4341
- }
4342
- if (runnerNames != null) {
4343
- _queryParams["runner_names"] = runnerNames;
4344
- }
4345
- if (runnerName != null) {
4346
- if (Array.isArray(runnerName)) {
4347
- _queryParams["runner_name"] = runnerName.map((item) => item);
4348
- } else {
4349
- _queryParams["runner_name"] = runnerName;
4350
- }
4351
- }
4352
- const _response = await (this._options.fetcher ?? fetcher)({
4353
- url: urlJoin8(
4354
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4355
- "runner-configs"
4356
- ),
4357
- method: "GET",
4358
- headers: {
4359
- Authorization: await this._getAuthorizationHeader(),
4360
- "X-Fern-Language": "JavaScript",
4361
- "X-Fern-Runtime": RUNTIME.type,
4362
- "X-Fern-Runtime-Version": RUNTIME.version,
4363
- ...requestOptions?.headers
4364
- },
4365
- contentType: "application/json",
4366
- queryParameters: _queryParams,
4367
- requestType: "json",
4368
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4369
- maxRetries: requestOptions?.maxRetries,
4370
- abortSignal: requestOptions?.abortSignal
4371
- });
4372
- if (_response.ok) {
4373
- return RunnerConfigsListResponse.parseOrThrow(_response.body, {
4374
- unrecognizedObjectKeys: "passthrough",
4375
- allowUnrecognizedUnionMembers: true,
4376
- allowUnrecognizedEnumValues: true,
4377
- skipValidation: true,
4378
- breadcrumbsPrefix: ["response"]
4379
- });
4380
- }
4381
- if (_response.error.reason === "status-code") {
4382
- throw new RivetError({
4383
- statusCode: _response.error.statusCode,
4384
- body: _response.error.body
4385
- });
4386
- }
4387
- switch (_response.error.reason) {
4388
- case "non-json":
4389
- throw new RivetError({
4390
- statusCode: _response.error.statusCode,
4391
- body: _response.error.rawBody
4392
- });
4393
- case "timeout":
4394
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
4395
- case "unknown":
4396
- throw new RivetError({
4397
- message: _response.error.errorMessage
4398
- });
4399
- }
4400
- }
4401
- /**
4402
- * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4403
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4404
- *
4405
- * @example
4406
- * await client.runnerConfigsServerlessHealthCheck({
4407
- * namespace: "namespace",
4408
- * url: "url"
4409
- * })
4410
- */
4411
- async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4412
- const { namespace, ..._body } = request;
4413
- const _queryParams = {};
4414
- _queryParams["namespace"] = namespace;
4415
- const _response = await (this._options.fetcher ?? fetcher)({
4416
- url: urlJoin8(
4417
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4418
- "runner-configs/serverless-health-check"
4419
- ),
4420
- method: "POST",
4421
- headers: {
4422
- Authorization: await this._getAuthorizationHeader(),
4423
- "X-Fern-Language": "JavaScript",
4424
- "X-Fern-Runtime": RUNTIME.type,
4425
- "X-Fern-Runtime-Version": RUNTIME.version,
4426
- ...requestOptions?.headers
4427
- },
4428
- contentType: "application/json",
4429
- queryParameters: _queryParams,
4430
- requestType: "json",
4431
- body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4432
- unrecognizedObjectKeys: "strip"
4433
- }),
4434
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4435
- maxRetries: requestOptions?.maxRetries,
4436
- abortSignal: requestOptions?.abortSignal
4437
- });
4438
- if (_response.ok) {
4439
- return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
4440
- unrecognizedObjectKeys: "passthrough",
4441
- allowUnrecognizedUnionMembers: true,
4442
- allowUnrecognizedEnumValues: true,
4443
- skipValidation: true,
4444
- breadcrumbsPrefix: ["response"]
4445
- });
4446
- }
4447
- if (_response.error.reason === "status-code") {
4448
- throw new RivetError({
4449
- statusCode: _response.error.statusCode,
4450
- body: _response.error.body
4451
- });
4452
- }
4453
- switch (_response.error.reason) {
4454
- case "non-json":
4455
- throw new RivetError({
4456
- statusCode: _response.error.statusCode,
4457
- body: _response.error.rawBody
4458
- });
4459
- case "timeout":
4460
- throw new RivetTimeoutError(
4461
- "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4462
- );
4463
- case "unknown":
4464
- throw new RivetError({
4465
- message: _response.error.errorMessage
4466
- });
4467
- }
4468
- }
4469
- /**
4470
- * @param {string} runnerName
4471
- * @param {Rivet.RunnerConfigsUpsertRequestBody} request
4472
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4473
- *
4474
- * @example
4475
- * await client.runnerConfigsUpsert("runner_name", {
4476
- * namespace: "namespace",
4477
- * datacenters: {
4478
- * "key": {}
4479
- * }
4480
- * })
4481
- */
4482
- async runnerConfigsUpsert(runnerName, request, requestOptions) {
4483
- const { namespace, ..._body } = request;
4484
- const _queryParams = {};
4485
- _queryParams["namespace"] = namespace;
4486
- const _response = await (this._options.fetcher ?? fetcher)({
4487
- url: urlJoin8(
4488
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4489
- `runner-configs/${encodeURIComponent(runnerName)}`
4490
- ),
4491
- method: "PUT",
4492
- headers: {
4493
- Authorization: await this._getAuthorizationHeader(),
4494
- "X-Fern-Language": "JavaScript",
4495
- "X-Fern-Runtime": RUNTIME.type,
4496
- "X-Fern-Runtime-Version": RUNTIME.version,
4497
- ...requestOptions?.headers
4498
- },
4499
- contentType: "application/json",
4500
- queryParameters: _queryParams,
4501
- requestType: "json",
4502
- body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4503
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4504
- maxRetries: requestOptions?.maxRetries,
4505
- abortSignal: requestOptions?.abortSignal
4506
- });
4507
- if (_response.ok) {
4508
- return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
4509
- unrecognizedObjectKeys: "passthrough",
4510
- allowUnrecognizedUnionMembers: true,
4511
- allowUnrecognizedEnumValues: true,
4512
- skipValidation: true,
4513
- breadcrumbsPrefix: ["response"]
4514
- });
4515
- }
4516
- if (_response.error.reason === "status-code") {
4517
- throw new RivetError({
4518
- statusCode: _response.error.statusCode,
4519
- body: _response.error.body
4520
- });
4521
- }
4522
- switch (_response.error.reason) {
4523
- case "non-json":
4524
- throw new RivetError({
4525
- statusCode: _response.error.statusCode,
4526
- body: _response.error.rawBody
4527
- });
4528
- case "timeout":
4529
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
4530
- case "unknown":
4531
- throw new RivetError({
4532
- message: _response.error.errorMessage
4533
- });
4534
- }
4535
- }
4536
- /**
4537
- * @param {string} runnerName
4538
- * @param {Rivet.RunnerConfigsDeleteRequest} request
4539
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4540
- *
4541
- * @example
4542
- * await client.runnerConfigsDelete("runner_name", {
4543
- * namespace: "namespace"
4544
- * })
4545
- */
4546
- async runnerConfigsDelete(runnerName, request, requestOptions) {
4547
- const { namespace } = request;
4548
- const _queryParams = {};
4549
- _queryParams["namespace"] = namespace;
4550
- const _response = await (this._options.fetcher ?? fetcher)({
4551
- url: urlJoin8(
4552
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4553
- `runner-configs/${encodeURIComponent(runnerName)}`
4554
- ),
4555
- method: "DELETE",
4556
- headers: {
4557
- Authorization: await this._getAuthorizationHeader(),
4558
- "X-Fern-Language": "JavaScript",
4559
- "X-Fern-Runtime": RUNTIME.type,
4560
- "X-Fern-Runtime-Version": RUNTIME.version,
4561
- ...requestOptions?.headers
4562
- },
4563
- contentType: "application/json",
4564
- queryParameters: _queryParams,
4565
- requestType: "json",
4566
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4567
- maxRetries: requestOptions?.maxRetries,
4568
- abortSignal: requestOptions?.abortSignal
4569
- });
4570
- if (_response.ok) {
4571
- return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4572
- unrecognizedObjectKeys: "passthrough",
4573
- allowUnrecognizedUnionMembers: true,
4574
- allowUnrecognizedEnumValues: true,
4575
- skipValidation: true,
4576
- breadcrumbsPrefix: ["response"]
4577
- });
4578
- }
4579
- if (_response.error.reason === "status-code") {
4580
- throw new RivetError({
4581
- statusCode: _response.error.statusCode,
4582
- body: _response.error.body
4583
- });
4584
- }
4585
- switch (_response.error.reason) {
4586
- case "non-json":
4587
- throw new RivetError({
4588
- statusCode: _response.error.statusCode,
4589
- body: _response.error.rawBody
4590
- });
4591
- case "timeout":
4592
- throw new RivetTimeoutError(
4593
- "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4594
- );
4595
- case "unknown":
4596
- throw new RivetError({
4597
- message: _response.error.errorMessage
4598
- });
4599
- }
4600
- }
4601
- /**
4602
- * @param {string} runnerName
4603
- * @param {Rivet.RunnerConfigsRefreshMetadataRequest} request
4604
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4605
- *
4606
- * @example
4607
- * await client.runnerConfigsRefreshMetadata("runner_name", {
4608
- * namespace: "namespace",
4609
- * body: {
4610
- * "key": "value"
4611
- * }
4612
- * })
4613
- */
4614
- async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4615
- const { namespace, body: _body } = request;
4616
- const _queryParams = {};
4617
- _queryParams["namespace"] = namespace;
4618
- const _response = await (this._options.fetcher ?? fetcher)({
4619
- url: urlJoin8(
4620
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4621
- `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4622
- ),
4623
- method: "POST",
4624
- headers: {
4625
- Authorization: await this._getAuthorizationHeader(),
4626
- "X-Fern-Language": "JavaScript",
4627
- "X-Fern-Runtime": RUNTIME.type,
4628
- "X-Fern-Runtime-Version": RUNTIME.version,
4629
- ...requestOptions?.headers
4630
- },
4631
- contentType: "application/json",
4632
- queryParameters: _queryParams,
4633
- requestType: "json",
4634
- body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4635
- unrecognizedObjectKeys: "strip"
4636
- }),
4637
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4638
- maxRetries: requestOptions?.maxRetries,
4639
- abortSignal: requestOptions?.abortSignal
4640
- });
4641
- if (_response.ok) {
4642
- return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4643
- unrecognizedObjectKeys: "passthrough",
4644
- allowUnrecognizedUnionMembers: true,
4645
- allowUnrecognizedEnumValues: true,
4646
- skipValidation: true,
4647
- breadcrumbsPrefix: ["response"]
4648
- });
4649
- }
4650
- if (_response.error.reason === "status-code") {
4651
- throw new RivetError({
4652
- statusCode: _response.error.statusCode,
4653
- body: _response.error.body
4654
- });
4655
- }
4656
- switch (_response.error.reason) {
4657
- case "non-json":
4658
- throw new RivetError({
4659
- statusCode: _response.error.statusCode,
4660
- body: _response.error.rawBody
4661
- });
4662
- case "timeout":
4663
- throw new RivetTimeoutError(
4664
- "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4665
- );
4666
- case "unknown":
4667
- throw new RivetError({
4668
- message: _response.error.errorMessage
4669
- });
4670
- }
4671
- }
4672
3917
  async _getAuthorizationHeader() {
4673
3918
  return `Bearer ${await Supplier.get(this._options.token)}`;
4674
3919
  }