@rivetkit/engine-api-full 0.0.0-sqlite-query-metrics-v2.f5d3605 → 0.0.0-sqlite-query-metrics-v3.1dff84f

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