@rivetkit/engine-api-full 0.0.0-sqlite-query-metrics-v2.f5d3605 → 0.0.0-sqlite-sync-3-0-1-release.95f6e2d

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
@@ -551,79 +551,18 @@ var init_NodePre18StreamWrapper = __esm({
551
551
  // src/api/index.ts
552
552
  var api_exports = {};
553
553
  __export(api_exports, {
554
- AuthOperationKind: () => AuthOperationKind,
555
- AuthTokenResource: () => AuthTokenResource,
556
- CrashPolicy: () => CrashPolicy,
557
- HealthStatus: () => HealthStatus,
558
- RunnerConfigVariant: () => RunnerConfigVariant,
559
554
  authTokens: () => authTokens_exports,
560
555
  datacenters: () => datacenters_exports,
561
- envoys: () => envoys_exports,
562
- health: () => health_exports,
563
556
  metadata: () => metadata_exports,
564
- namespaces: () => namespaces_exports,
565
- runners: () => runners_exports
557
+ namespaces: () => namespaces_exports2,
558
+ pools: () => pools_exports
566
559
  });
567
560
 
568
- // src/api/types/AuthOperationKind.ts
569
- var AuthOperationKind = {
570
- Read: "read",
571
- Update: "update",
572
- List: "list",
573
- Create: "create",
574
- Delete: "delete"
575
- };
576
-
577
- // src/api/types/AuthTokenResource.ts
578
- var AuthTokenResource = {
579
- Namespace: "namespace",
580
- Actor: "actor",
581
- Runner: "runner",
582
- RunnerConfig: "runner_config",
583
- Datacenter: "datacenter",
584
- ActorGateway: "actor_gateway",
585
- ActorKv: "actor_kv"
586
- };
587
-
588
- // src/api/types/CrashPolicy.ts
589
- var CrashPolicy = {
590
- Restart: "restart",
591
- Sleep: "sleep",
592
- Destroy: "destroy"
593
- };
594
-
595
- // src/api/types/HealthStatus.ts
596
- var HealthStatus = {
597
- Ok: "ok",
598
- Error: "error"
599
- };
600
-
601
- // src/api/types/RunnerConfigVariant.ts
602
- var RunnerConfigVariant = {
603
- Serverless: "serverless",
604
- Normal: "normal"
605
- };
606
-
607
561
  // src/api/resources/authTokens/index.ts
608
562
  var authTokens_exports = {};
609
-
610
- // src/api/resources/datacenters/index.ts
611
- var datacenters_exports = {};
612
-
613
- // src/api/resources/envoys/index.ts
614
- var envoys_exports = {};
615
-
616
- // src/api/resources/health/index.ts
617
- var health_exports = {};
618
-
619
- // src/api/resources/metadata/index.ts
620
- var metadata_exports = {};
621
-
622
- // src/api/resources/namespaces/index.ts
623
- var namespaces_exports = {};
624
-
625
- // src/api/resources/runners/index.ts
626
- var runners_exports = {};
563
+ __export(authTokens_exports, {
564
+ AuthTokens: () => AuthTokens
565
+ });
627
566
 
628
567
  // src/core/json.ts
629
568
  var toJson = (value, replacer, space) => {
@@ -2338,6 +2277,9 @@ function transformAndValidateUnion({
2338
2277
  };
2339
2278
  }
2340
2279
 
2280
+ // src/api/resources/authTokens/client/Client.ts
2281
+ import urlJoin from "url-join";
2282
+
2341
2283
  // src/serialization/index.ts
2342
2284
  var serialization_exports = {};
2343
2285
  __export(serialization_exports, {
@@ -2348,91 +2290,53 @@ __export(serialization_exports, {
2348
2290
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2349
2291
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2350
2292
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2351
- ActorsKvGetResponse: () => ActorsKvGetResponse,
2293
+ ActorsGetResponse: () => ActorsGetResponse,
2352
2294
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2353
2295
  ActorsListResponse: () => ActorsListResponse,
2354
- ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2355
2296
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2356
- ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2357
2297
  ActorsSleepResponse: () => ActorsSleepResponse,
2358
- AuthOperationKind: () => AuthOperationKind2,
2359
- AuthTokenCreateRequest: () => AuthTokenCreateRequest,
2298
+ AuthOperationKind: () => AuthOperationKind,
2299
+ AuthResourceKind: () => AuthResourceKind,
2300
+ AuthTargetScope: () => AuthTargetScope,
2360
2301
  AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2361
2302
  AuthTokenGrant: () => AuthTokenGrant,
2362
2303
  AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2363
- AuthTokenResource: () => AuthTokenResource2,
2364
- AuthTokenTargetScope: () => AuthTokenTargetScope,
2365
- AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
2366
- CrashPolicy: () => CrashPolicy2,
2367
2304
  Datacenter: () => Datacenter,
2368
- DatacenterHealth: () => DatacenterHealth,
2369
2305
  DatacentersListResponse: () => DatacentersListResponse,
2370
- Envoy: () => Envoy,
2371
- EnvoysListResponse: () => EnvoysListResponse,
2372
- HealthFanoutResponse: () => HealthFanoutResponse,
2373
- HealthResponse: () => HealthResponse,
2374
- HealthStatus: () => HealthStatus2,
2306
+ ErrorResponse: () => ErrorResponse,
2375
2307
  MetadataGetResponse: () => MetadataGetResponse,
2376
2308
  Namespace: () => Namespace,
2377
2309
  NamespaceListResponse: () => NamespaceListResponse,
2378
2310
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2379
2311
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2312
+ Node: () => Node,
2380
2313
  Pagination: () => Pagination,
2314
+ Pool: () => Pool,
2315
+ PoolResponse: () => PoolResponse,
2316
+ PoolsDeleteResponse: () => PoolsDeleteResponse,
2317
+ PoolsListNodesResponse: () => PoolsListNodesResponse,
2318
+ PoolsListResponse: () => PoolsListResponse,
2381
2319
  RivetId: () => RivetId,
2382
- Runner: () => Runner,
2383
- RunnerConfig: () => RunnerConfig,
2384
- RunnerConfigKind: () => RunnerConfigKind,
2385
- RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2386
- RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
2387
- RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2388
- RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2389
- RunnerConfigNormal: () => RunnerConfigNormal,
2390
- RunnerConfigResponse: () => RunnerConfigResponse,
2391
- RunnerConfigServerless: () => RunnerConfigServerless,
2392
- RunnerConfigVariant: () => RunnerConfigVariant2,
2393
- RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2394
- RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2395
- RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2396
- RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2397
- RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2398
- RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2399
- RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2400
- RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2401
- RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2402
- RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2403
- RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2404
- RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2405
- RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2406
- RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2407
- RunnersListNamesResponse: () => RunnersListNamesResponse,
2408
- RunnersListResponse: () => RunnersListResponse,
2409
- authTokens: () => authTokens_exports2,
2410
- namespaces: () => namespaces_exports2
2320
+ namespaces: () => namespaces_exports
2411
2321
  });
2412
2322
 
2413
2323
  // src/serialization/types/RivetId.ts
2414
2324
  var RivetId = schemas_exports.string();
2415
2325
 
2416
- // src/serialization/types/CrashPolicy.ts
2417
- var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2418
-
2419
2326
  // src/serialization/types/Actor.ts
2420
2327
  var Actor = schemas_exports.object({
2421
2328
  actorId: schemas_exports.property("actor_id", RivetId),
2422
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2423
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2424
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2425
- datacenter: schemas_exports.string(),
2426
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2427
- error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2428
- key: schemas_exports.string().optional(),
2429
2329
  name: schemas_exports.string(),
2430
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2431
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2432
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2433
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2434
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2435
- startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
2330
+ key: schemas_exports.string(),
2331
+ namespace: schemas_exports.string(),
2332
+ pool: schemas_exports.string(),
2333
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2334
+ startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
2335
+ pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
2336
+ connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
2337
+ sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
2338
+ rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
2339
+ destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
2436
2340
  });
2437
2341
 
2438
2342
  // src/serialization/types/ActorName.ts
@@ -2442,11 +2346,12 @@ var ActorName = schemas_exports.object({
2442
2346
 
2443
2347
  // src/serialization/types/ActorsCreateResponse.ts
2444
2348
  var ActorsCreateResponse = schemas_exports.object({
2445
- actor: Actor
2349
+ actor: Actor,
2350
+ created: schemas_exports.boolean()
2446
2351
  });
2447
2352
 
2448
2353
  // src/serialization/types/ActorsDeleteResponse.ts
2449
- var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2354
+ var ActorsDeleteResponse = schemas_exports.object({});
2450
2355
 
2451
2356
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2452
2357
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2454,21 +2359,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2454
2359
  created: schemas_exports.boolean()
2455
2360
  });
2456
2361
 
2457
- // src/serialization/types/ActorsKvGetResponse.ts
2458
- var ActorsKvGetResponse = schemas_exports.object({
2459
- updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2460
- value: schemas_exports.string()
2461
- });
2462
-
2463
- // src/serialization/types/Pagination.ts
2464
- var Pagination = schemas_exports.object({
2465
- cursor: schemas_exports.string().optional()
2362
+ // src/serialization/types/ActorsGetResponse.ts
2363
+ var ActorsGetResponse = schemas_exports.object({
2364
+ actor: Actor
2466
2365
  });
2467
2366
 
2468
2367
  // src/serialization/types/ActorsListNamesResponse.ts
2469
2368
  var ActorsListNamesResponse = schemas_exports.object({
2470
- names: schemas_exports.record(schemas_exports.string(), ActorName),
2471
- pagination: Pagination
2369
+ names: schemas_exports.record(schemas_exports.string(), ActorName)
2370
+ });
2371
+
2372
+ // src/serialization/types/Pagination.ts
2373
+ var Pagination = schemas_exports.object({
2374
+ cursor: schemas_exports.string().nullable()
2472
2375
  });
2473
2376
 
2474
2377
  // src/serialization/types/ActorsListResponse.ts
@@ -2477,143 +2380,76 @@ var ActorsListResponse = schemas_exports.object({
2477
2380
  pagination: Pagination
2478
2381
  });
2479
2382
 
2480
- // src/serialization/types/ActorsRescheduleRequestBody.ts
2481
- var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2482
-
2483
2383
  // src/serialization/types/ActorsRescheduleResponse.ts
2484
- var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2485
-
2486
- // src/serialization/types/ActorsSleepRequestBody.ts
2487
- var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2384
+ var ActorsRescheduleResponse = schemas_exports.object({});
2488
2385
 
2489
2386
  // src/serialization/types/ActorsSleepResponse.ts
2490
- var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2387
+ var ActorsSleepResponse = schemas_exports.object({});
2491
2388
 
2492
2389
  // src/serialization/types/AuthOperationKind.ts
2493
- var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2390
+ var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2391
+
2392
+ // src/serialization/types/AuthResourceKind.ts
2393
+ var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
2394
+
2395
+ // src/serialization/types/AuthTargetScope.ts
2396
+ var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
2397
+ id: RivetId
2398
+ })]);
2494
2399
 
2495
2400
  // src/serialization/types/AuthTokenCreateResponse.ts
2496
2401
  var AuthTokenCreateResponse = schemas_exports.object({
2497
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2402
+ token: schemas_exports.string(),
2498
2403
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2499
- token: schemas_exports.string()
2500
- });
2501
-
2502
- // src/serialization/types/AuthTokenResource.ts
2503
- var AuthTokenResource2 = schemas_exports.enum_([
2504
- "namespace",
2505
- "actor",
2506
- "runner",
2507
- "runner_config",
2508
- "datacenter",
2509
- "actor_gateway",
2510
- "actor_kv"
2511
- ]);
2512
-
2513
- // src/serialization/types/AuthTokenTargetScopeId.ts
2514
- var AuthTokenTargetScopeId = schemas_exports.object({
2515
- id: RivetId
2404
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2516
2405
  });
2517
2406
 
2518
- // src/serialization/types/AuthTokenTargetScope.ts
2519
- var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
2520
-
2521
2407
  // src/serialization/types/AuthTokenGrant.ts
2522
2408
  var AuthTokenGrant = schemas_exports.object({
2523
- operations: schemas_exports.list(AuthOperationKind2),
2524
- resource: AuthTokenResource2,
2525
- target: AuthTokenTargetScope
2409
+ resource: AuthResourceKind,
2410
+ target: AuthTargetScope,
2411
+ operations: schemas_exports.list(AuthOperationKind)
2526
2412
  });
2527
2413
 
2528
2414
  // src/serialization/types/AuthTokenInspectResponse.ts
2529
2415
  var AuthTokenInspectResponse = schemas_exports.object({
2530
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2416
+ namespace: schemas_exports.string(),
2417
+ subject: schemas_exports.string().nullable(),
2531
2418
  grants: schemas_exports.list(AuthTokenGrant),
2532
2419
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2533
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2534
- subject: schemas_exports.string().optional()
2420
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2535
2421
  });
2536
2422
 
2537
2423
  // src/serialization/types/Datacenter.ts
2538
2424
  var Datacenter = schemas_exports.object({
2539
- label: schemas_exports.number(),
2540
- name: schemas_exports.string(),
2541
- url: schemas_exports.string()
2542
- });
2543
-
2544
- // src/serialization/types/HealthResponse.ts
2545
- var HealthResponse = schemas_exports.object({
2546
- runtime: schemas_exports.string(),
2547
- status: schemas_exports.string(),
2548
- version: schemas_exports.string()
2549
- });
2550
-
2551
- // src/serialization/types/HealthStatus.ts
2552
- var HealthStatus2 = schemas_exports.enum_(["ok", "error"]);
2553
-
2554
- // src/serialization/types/DatacenterHealth.ts
2555
- var DatacenterHealth = schemas_exports.object({
2556
- datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2557
- datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2558
- error: schemas_exports.string().optional(),
2559
- response: HealthResponse.optional(),
2560
- rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2561
- status: HealthStatus2
2425
+ name: schemas_exports.string()
2562
2426
  });
2563
2427
 
2564
2428
  // src/serialization/types/DatacentersListResponse.ts
2565
2429
  var DatacentersListResponse = schemas_exports.object({
2566
- datacenters: schemas_exports.list(Datacenter),
2567
- pagination: Pagination
2568
- });
2569
-
2570
- // src/serialization/types/Envoy.ts
2571
- var Envoy = schemas_exports.object({
2572
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2573
- datacenter: schemas_exports.string(),
2574
- envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2575
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2576
- lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2577
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2578
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2579
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2580
- poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2581
- slots: schemas_exports.number(),
2582
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2583
- version: schemas_exports.number()
2430
+ datacenters: schemas_exports.list(Datacenter)
2584
2431
  });
2585
2432
 
2586
- // src/serialization/types/EnvoysListResponse.ts
2587
- var EnvoysListResponse = schemas_exports.object({
2588
- envoys: schemas_exports.list(Envoy),
2589
- pagination: Pagination
2590
- });
2591
-
2592
- // src/serialization/types/HealthFanoutResponse.ts
2593
- var HealthFanoutResponse = schemas_exports.object({
2594
- datacenters: schemas_exports.list(DatacenterHealth)
2433
+ // src/serialization/types/ErrorResponse.ts
2434
+ var ErrorResponse = schemas_exports.object({
2435
+ group: schemas_exports.string(),
2436
+ code: schemas_exports.string(),
2437
+ message: schemas_exports.string(),
2438
+ metadata: schemas_exports.unknown().optional()
2595
2439
  });
2596
2440
 
2597
2441
  // src/serialization/types/MetadataGetResponse.ts
2598
2442
  var MetadataGetResponse = schemas_exports.object({
2599
- buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2600
- cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2601
- cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2602
- envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
2603
- epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
2604
- gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2605
- runtime: schemas_exports.string(),
2606
- rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2607
- rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2608
- version: schemas_exports.string()
2443
+ runtime: schemas_exports.stringLiteral("engine"),
2444
+ version: schemas_exports.string(),
2445
+ envoyProtocolVersion: schemas_exports.number(),
2446
+ actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
2609
2447
  });
2610
2448
 
2611
2449
  // src/serialization/types/Namespace.ts
2612
2450
  var Namespace = schemas_exports.object({
2613
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2614
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2615
2451
  name: schemas_exports.string(),
2616
- namespaceId: schemas_exports.property("namespace_id", RivetId)
2452
+ createTs: schemas_exports.property("create_ts", schemas_exports.number())
2617
2453
  });
2618
2454
 
2619
2455
  // src/serialization/types/NamespaceListResponse.ts
@@ -2627,258 +2463,76 @@ var NamespacesCreateResponse = schemas_exports.object({
2627
2463
  namespace: Namespace
2628
2464
  });
2629
2465
 
2630
- // src/serialization/types/Runner.ts
2631
- var Runner = schemas_exports.object({
2632
- createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2633
- datacenter: schemas_exports.string(),
2634
- drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2466
+ // src/serialization/types/Node.ts
2467
+ var Node = schemas_exports.object({
2635
2468
  key: schemas_exports.string(),
2636
- lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2469
+ pool: schemas_exports.string(),
2470
+ namespace: schemas_exports.string(),
2471
+ datacenter: schemas_exports.string(),
2472
+ version: schemas_exports.number(),
2473
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2637
2474
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2638
- lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2639
- metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2640
- name: schemas_exports.string(),
2641
- namespaceId: schemas_exports.property("namespace_id", RivetId),
2642
- remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2643
- runnerId: schemas_exports.property("runner_id", RivetId),
2644
- stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2645
- totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2646
- version: schemas_exports.number()
2647
- });
2648
-
2649
- // src/serialization/types/RunnerConfigNormal.ts
2650
- var RunnerConfigNormal = schemas_exports.object({
2651
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2652
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2653
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2654
- drainOnVersionUpgrade: schemas_exports.property(
2655
- "drain_on_version_upgrade",
2656
- schemas_exports.boolean().optional()
2657
- )
2658
- });
2659
-
2660
- // src/serialization/types/RunnerConfigServerless.ts
2661
- var RunnerConfigServerless = schemas_exports.object({
2662
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2663
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2664
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2665
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2666
- drainOnVersionUpgrade: schemas_exports.property(
2667
- "drain_on_version_upgrade",
2668
- schemas_exports.boolean().optional()
2669
- ),
2670
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2671
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2672
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2673
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2674
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2675
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2676
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2677
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2678
- url: schemas_exports.string()
2679
- });
2680
-
2681
- // src/serialization/types/RunnerConfig.ts
2682
- var RunnerConfig = schemas_exports.object({
2683
- normal: RunnerConfigNormal.optional(),
2684
- serverless: RunnerConfigServerless.optional(),
2685
- drainOnVersionUpgrade: schemas_exports.property(
2686
- "drain_on_version_upgrade",
2687
- schemas_exports.boolean().optional()
2688
- ),
2689
- metadata: schemas_exports.unknown().optional()
2690
- });
2691
-
2692
- // src/serialization/types/RunnerConfigKindNormalNormal.ts
2693
- var RunnerConfigKindNormalNormal = schemas_exports.object({
2694
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2695
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2696
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2697
- drainOnVersionUpgrade: schemas_exports.property(
2698
- "drain_on_version_upgrade",
2699
- schemas_exports.boolean().optional()
2700
- )
2701
- });
2702
-
2703
- // src/serialization/types/RunnerConfigKindNormal.ts
2704
- var RunnerConfigKindNormal = schemas_exports.object({
2705
- normal: RunnerConfigKindNormalNormal
2706
- });
2707
-
2708
- // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2709
- var RunnerConfigKindServerlessServerless = schemas_exports.object({
2710
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2711
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2712
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2713
- drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2714
- drainOnVersionUpgrade: schemas_exports.property(
2715
- "drain_on_version_upgrade",
2716
- schemas_exports.boolean().optional()
2717
- ),
2718
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2719
- maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2720
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2721
- metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2722
- minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2723
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2724
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2725
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2726
- url: schemas_exports.string()
2727
- });
2728
-
2729
- // src/serialization/types/RunnerConfigKindServerless.ts
2730
- var RunnerConfigKindServerless = schemas_exports.object({
2731
- serverless: RunnerConfigKindServerlessServerless
2732
- });
2733
-
2734
- // src/serialization/types/RunnerConfigKind.ts
2735
- var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2736
-
2737
- // src/serialization/types/RunnerConfigResponse.ts
2738
- var RunnerConfigResponse = schemas_exports.object({
2739
- protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2740
- runnerPoolError: schemas_exports.property(
2741
- "runner_pool_error",
2742
- schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2743
- )
2744
- }).extend(RunnerConfig);
2745
-
2746
- // src/serialization/types/RunnerConfigVariant.ts
2747
- var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2748
-
2749
- // src/serialization/types/RunnerConfigsDeleteResponse.ts
2750
- var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2751
-
2752
- // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2753
- var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2754
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2755
- });
2756
-
2757
- // src/serialization/types/RunnerConfigsListResponse.ts
2758
- var RunnerConfigsListResponse = schemas_exports.object({
2759
- pagination: Pagination,
2760
- runnerConfigs: schemas_exports.property(
2761
- "runner_configs",
2762
- schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2763
- )
2764
- });
2765
-
2766
- // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2767
- var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2768
-
2769
- // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2770
- var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2771
-
2772
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2773
- var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2774
- version: schemas_exports.string()
2475
+ connected: schemas_exports.boolean(),
2476
+ stopping: schemas_exports.boolean()
2775
2477
  });
2776
2478
 
2777
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2778
- var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2779
- success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2780
- });
2781
-
2782
- // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2783
- var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2784
- details: schemas_exports.string().optional(),
2785
- message: schemas_exports.string(),
2786
- metadata: schemas_exports.unknown().optional()
2787
- });
2788
-
2789
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2790
- var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2791
- error: RunnerConfigsServerlessMetadataError
2479
+ // src/serialization/types/Pool.ts
2480
+ var Pool = schemas_exports.object({
2481
+ name: schemas_exports.string(),
2482
+ drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2483
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2484
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2485
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2486
+ metadata: schemas_exports.unknown()
2792
2487
  });
2793
2488
 
2794
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2795
- var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2796
- failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2489
+ // src/serialization/types/PoolResponse.ts
2490
+ var PoolResponse = schemas_exports.object({
2491
+ pool: Pool
2797
2492
  });
2798
2493
 
2799
- // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2800
- var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2801
- RunnerConfigsServerlessHealthCheckResponseSuccess,
2802
- RunnerConfigsServerlessHealthCheckResponseFailure
2803
- ]);
2804
-
2805
- // src/serialization/types/RunnerConfigsUpsertResponse.ts
2806
- var RunnerConfigsUpsertResponse = schemas_exports.object({
2807
- endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2808
- });
2494
+ // src/serialization/types/PoolsDeleteResponse.ts
2495
+ var PoolsDeleteResponse = schemas_exports.object({});
2809
2496
 
2810
- // src/serialization/types/RunnersListNamesResponse.ts
2811
- var RunnersListNamesResponse = schemas_exports.object({
2812
- names: schemas_exports.list(schemas_exports.string()),
2497
+ // src/serialization/types/PoolsListNodesResponse.ts
2498
+ var PoolsListNodesResponse = schemas_exports.object({
2499
+ nodes: schemas_exports.list(Node),
2813
2500
  pagination: Pagination
2814
2501
  });
2815
2502
 
2816
- // src/serialization/types/RunnersListResponse.ts
2817
- var RunnersListResponse = schemas_exports.object({
2503
+ // src/serialization/types/PoolsListResponse.ts
2504
+ var PoolsListResponse = schemas_exports.object({
2818
2505
  pagination: Pagination,
2819
- runners: schemas_exports.list(Runner)
2506
+ pools: schemas_exports.list(Pool)
2820
2507
  });
2821
2508
 
2822
2509
  // src/serialization/client/requests/ActorsCreateRequest.ts
2823
2510
  var ActorsCreateRequest = schemas_exports.object({
2824
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2825
- datacenter: schemas_exports.string().optional(),
2826
2511
  input: schemas_exports.string().optional(),
2827
2512
  key: schemas_exports.string().optional(),
2828
2513
  name: schemas_exports.string(),
2829
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2514
+ pool: schemas_exports.string().optional()
2830
2515
  });
2831
2516
 
2832
2517
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2833
2518
  var ActorsGetOrCreateRequest = schemas_exports.object({
2834
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2835
- datacenter: schemas_exports.string().optional(),
2836
2519
  input: schemas_exports.string().optional(),
2837
- key: schemas_exports.string(),
2520
+ key: schemas_exports.string().optional(),
2838
2521
  name: schemas_exports.string(),
2839
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2840
- });
2841
-
2842
- // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2843
- var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2844
- headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2845
- url: schemas_exports.string()
2846
- });
2847
-
2848
- // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2849
- var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2850
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2851
- });
2852
-
2853
- // src/serialization/resources/authTokens/index.ts
2854
- var authTokens_exports2 = {};
2855
- __export(authTokens_exports2, {
2856
- AuthTokenCreateRequest: () => AuthTokenCreateRequest
2857
- });
2858
-
2859
- // src/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.ts
2860
- var AuthTokenCreateRequest = schemas_exports.object({
2861
- duration: schemas_exports.number().optional(),
2862
- grants: schemas_exports.list(AuthTokenGrant),
2863
- namespace: schemas_exports.string(),
2864
- subject: schemas_exports.string().optional()
2522
+ pool: schemas_exports.string().optional()
2865
2523
  });
2866
2524
 
2867
2525
  // src/serialization/resources/namespaces/index.ts
2868
- var namespaces_exports2 = {};
2869
- __export(namespaces_exports2, {
2526
+ var namespaces_exports = {};
2527
+ __export(namespaces_exports, {
2870
2528
  NamespacesCreateRequest: () => NamespacesCreateRequest
2871
2529
  });
2872
2530
 
2873
2531
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2874
2532
  var NamespacesCreateRequest = schemas_exports.object({
2875
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2876
2533
  name: schemas_exports.string()
2877
2534
  });
2878
2535
 
2879
- // src/Client.ts
2880
- import urlJoin8 from "url-join";
2881
-
2882
2536
  // src/errors/RivetError.ts
2883
2537
  var RivetError = class _RivetError extends Error {
2884
2538
  statusCode;
@@ -2921,25 +2575,10 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2921
2575
  };
2922
2576
 
2923
2577
  // src/api/resources/authTokens/client/Client.ts
2924
- import urlJoin from "url-join";
2925
2578
  var AuthTokens = class {
2926
2579
  constructor(_options) {
2927
2580
  this._options = _options;
2928
2581
  }
2929
- /**
2930
- * @param {Rivet.AuthTokenCreateRequest} request
2931
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2932
- *
2933
- * @example
2934
- * await client.authTokens.create({
2935
- * grants: [{
2936
- * operations: ["read"],
2937
- * resource: "namespace",
2938
- * target: "any"
2939
- * }],
2940
- * namespace: "namespace"
2941
- * })
2942
- */
2943
2582
  async create(request, requestOptions) {
2944
2583
  const _response = await (this._options.fetcher ?? fetcher)({
2945
2584
  url: urlJoin(
@@ -2956,7 +2595,12 @@ var AuthTokens = class {
2956
2595
  },
2957
2596
  contentType: "application/json",
2958
2597
  requestType: "json",
2959
- body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2598
+ body: {
2599
+ namespace: request.namespace,
2600
+ duration: request.duration,
2601
+ subject: request.subject,
2602
+ grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2603
+ },
2960
2604
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2961
2605
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2962
2606
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -2990,12 +2634,6 @@ var AuthTokens = class {
2990
2634
  });
2991
2635
  }
2992
2636
  }
2993
- /**
2994
- * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2995
- *
2996
- * @example
2997
- * await client.authTokens.inspect()
2998
- */
2999
2637
  async inspect(requestOptions) {
3000
2638
  const _response = await (this._options.fetcher ?? fetcher)({
3001
2639
  url: urlJoin(
@@ -3050,6 +2688,21 @@ var AuthTokens = class {
3050
2688
  }
3051
2689
  };
3052
2690
 
2691
+ // src/api/resources/datacenters/index.ts
2692
+ var datacenters_exports = {};
2693
+
2694
+ // src/api/resources/metadata/index.ts
2695
+ var metadata_exports = {};
2696
+
2697
+ // src/api/resources/namespaces/index.ts
2698
+ var namespaces_exports2 = {};
2699
+
2700
+ // src/api/resources/pools/index.ts
2701
+ var pools_exports = {};
2702
+
2703
+ // src/Client.ts
2704
+ import urlJoin6 from "url-join";
2705
+
3053
2706
  // src/api/resources/datacenters/client/Client.ts
3054
2707
  import urlJoin2 from "url-join";
3055
2708
  var Datacenters = class {
@@ -3116,45 +2769,23 @@ var Datacenters = class {
3116
2769
  }
3117
2770
  };
3118
2771
 
3119
- // src/api/resources/envoys/client/Client.ts
2772
+ // src/api/resources/metadata/client/Client.ts
3120
2773
  import urlJoin3 from "url-join";
3121
- var Envoys = class {
2774
+ var Metadata = class {
3122
2775
  constructor(_options) {
3123
2776
  this._options = _options;
3124
2777
  }
3125
2778
  /**
3126
- * @param {Rivet.EnvoysListRequest} request
3127
- * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2779
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3128
2780
  *
3129
2781
  * @example
3130
- * await client.envoys.list({
3131
- * namespace: "namespace"
3132
- * })
2782
+ * await client.metadata.get()
3133
2783
  */
3134
- async list(request, requestOptions) {
3135
- const { namespace, name, envoyKey, limit, cursor } = request;
3136
- const _queryParams = {};
3137
- _queryParams["namespace"] = namespace;
3138
- if (name != null) {
3139
- _queryParams["name"] = name;
3140
- }
3141
- if (envoyKey != null) {
3142
- if (Array.isArray(envoyKey)) {
3143
- _queryParams["envoy_key"] = envoyKey.map((item) => item);
3144
- } else {
3145
- _queryParams["envoy_key"] = envoyKey;
3146
- }
3147
- }
3148
- if (limit != null) {
3149
- _queryParams["limit"] = limit.toString();
3150
- }
3151
- if (cursor != null) {
3152
- _queryParams["cursor"] = cursor;
3153
- }
2784
+ async get(requestOptions) {
3154
2785
  const _response = await (this._options.fetcher ?? fetcher)({
3155
2786
  url: urlJoin3(
3156
2787
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3157
- "envoys"
2788
+ "metadata"
3158
2789
  ),
3159
2790
  method: "GET",
3160
2791
  headers: {
@@ -3165,14 +2796,13 @@ var Envoys = class {
3165
2796
  ...requestOptions == null ? void 0 : requestOptions.headers
3166
2797
  },
3167
2798
  contentType: "application/json",
3168
- queryParameters: _queryParams,
3169
2799
  requestType: "json",
3170
2800
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3171
2801
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3172
2802
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3173
2803
  });
3174
2804
  if (_response.ok) {
3175
- return EnvoysListResponse.parseOrThrow(_response.body, {
2805
+ return MetadataGetResponse.parseOrThrow(_response.body, {
3176
2806
  unrecognizedObjectKeys: "passthrough",
3177
2807
  allowUnrecognizedUnionMembers: true,
3178
2808
  allowUnrecognizedEnumValues: true,
@@ -3193,7 +2823,7 @@ var Envoys = class {
3193
2823
  body: _response.error.rawBody
3194
2824
  });
3195
2825
  case "timeout":
3196
- throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2826
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3197
2827
  case "unknown":
3198
2828
  throw new RivetError({
3199
2829
  message: _response.error.errorMessage
@@ -3205,23 +2835,35 @@ var Envoys = class {
3205
2835
  }
3206
2836
  };
3207
2837
 
3208
- // src/api/resources/health/client/Client.ts
2838
+ // src/api/resources/namespaces/client/Client.ts
3209
2839
  import urlJoin4 from "url-join";
3210
- var Health = class {
2840
+ var Namespaces = class {
3211
2841
  constructor(_options) {
3212
2842
  this._options = _options;
3213
2843
  }
3214
2844
  /**
3215
- * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2845
+ * @param {Rivet.NamespacesListRequest} request
2846
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3216
2847
  *
3217
2848
  * @example
3218
- * await client.health.fanout()
2849
+ * await client.namespaces.list()
3219
2850
  */
3220
- async fanout(requestOptions) {
2851
+ async list(request = {}, requestOptions) {
2852
+ const { limit, cursor, name } = request;
2853
+ const _queryParams = {};
2854
+ if (limit != null) {
2855
+ _queryParams["limit"] = limit.toString();
2856
+ }
2857
+ if (cursor != null) {
2858
+ _queryParams["cursor"] = cursor;
2859
+ }
2860
+ if (name != null) {
2861
+ _queryParams["name"] = name;
2862
+ }
3221
2863
  const _response = await (this._options.fetcher ?? fetcher)({
3222
2864
  url: urlJoin4(
3223
2865
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3224
- "health/fanout"
2866
+ "namespaces"
3225
2867
  ),
3226
2868
  method: "GET",
3227
2869
  headers: {
@@ -3232,13 +2874,14 @@ var Health = class {
3232
2874
  ...requestOptions == null ? void 0 : requestOptions.headers
3233
2875
  },
3234
2876
  contentType: "application/json",
2877
+ queryParameters: _queryParams,
3235
2878
  requestType: "json",
3236
2879
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3237
2880
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3238
2881
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3239
2882
  });
3240
2883
  if (_response.ok) {
3241
- return HealthFanoutResponse.parseOrThrow(_response.body, {
2884
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3242
2885
  unrecognizedObjectKeys: "passthrough",
3243
2886
  allowUnrecognizedUnionMembers: true,
3244
2887
  allowUnrecognizedEnumValues: true,
@@ -3259,37 +2902,29 @@ var Health = class {
3259
2902
  body: _response.error.rawBody
3260
2903
  });
3261
2904
  case "timeout":
3262
- throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2905
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3263
2906
  case "unknown":
3264
2907
  throw new RivetError({
3265
2908
  message: _response.error.errorMessage
3266
2909
  });
3267
2910
  }
3268
2911
  }
3269
- async _getAuthorizationHeader() {
3270
- return `Bearer ${await Supplier.get(this._options.token)}`;
3271
- }
3272
- };
3273
-
3274
- // src/api/resources/metadata/client/Client.ts
3275
- import urlJoin5 from "url-join";
3276
- var Metadata = class {
3277
- constructor(_options) {
3278
- this._options = _options;
3279
- }
3280
2912
  /**
3281
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2913
+ * @param {Rivet.NamespacesCreateRequest} request
2914
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3282
2915
  *
3283
2916
  * @example
3284
- * await client.metadata.get()
2917
+ * await client.namespaces.create({
2918
+ * name: "name"
2919
+ * })
3285
2920
  */
3286
- async get(requestOptions) {
2921
+ async create(request, requestOptions) {
3287
2922
  const _response = await (this._options.fetcher ?? fetcher)({
3288
- url: urlJoin5(
2923
+ url: urlJoin4(
3289
2924
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3290
- "metadata"
2925
+ "namespaces"
3291
2926
  ),
3292
- method: "GET",
2927
+ method: "POST",
3293
2928
  headers: {
3294
2929
  Authorization: await this._getAuthorizationHeader(),
3295
2930
  "X-Fern-Language": "JavaScript",
@@ -3299,12 +2934,13 @@ var Metadata = class {
3299
2934
  },
3300
2935
  contentType: "application/json",
3301
2936
  requestType: "json",
2937
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3302
2938
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3303
2939
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3304
2940
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3305
2941
  });
3306
2942
  if (_response.ok) {
3307
- return MetadataGetResponse.parseOrThrow(_response.body, {
2943
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3308
2944
  unrecognizedObjectKeys: "passthrough",
3309
2945
  allowUnrecognizedUnionMembers: true,
3310
2946
  allowUnrecognizedEnumValues: true,
@@ -3325,7 +2961,7 @@ var Metadata = class {
3325
2961
  body: _response.error.rawBody
3326
2962
  });
3327
2963
  case "timeout":
3328
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2964
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3329
2965
  case "unknown":
3330
2966
  throw new RivetError({
3331
2967
  message: _response.error.errorMessage
@@ -3337,47 +2973,38 @@ var Metadata = class {
3337
2973
  }
3338
2974
  };
3339
2975
 
3340
- // src/api/resources/namespaces/client/Client.ts
3341
- import urlJoin6 from "url-join";
3342
- var Namespaces = class {
2976
+ // src/api/resources/pools/client/Client.ts
2977
+ import urlJoin5 from "url-join";
2978
+ var Pools = class {
3343
2979
  constructor(_options) {
3344
2980
  this._options = _options;
3345
2981
  }
3346
2982
  /**
3347
- * @param {Rivet.NamespacesListRequest} request
3348
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
2983
+ * Lists the namespace's pools by name. Changes apply on each node's next connection.
2984
+ *
2985
+ * @param {Rivet.PoolsListRequest} request
2986
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3349
2987
  *
3350
2988
  * @example
3351
- * await client.namespaces.list()
2989
+ * await client.pools.list({
2990
+ * namespace: "namespace"
2991
+ * })
3352
2992
  */
3353
- async list(request = {}, requestOptions) {
3354
- const { limit, cursor, name, namespaceIds, namespaceId } = request;
2993
+ async list(request, requestOptions) {
2994
+ const { namespace, limit, cursor } = request;
3355
2995
  const _queryParams = {};
2996
+ if (namespace != null)
2997
+ _queryParams["namespace"] = namespace;
3356
2998
  if (limit != null) {
3357
2999
  _queryParams["limit"] = limit.toString();
3358
3000
  }
3359
3001
  if (cursor != null) {
3360
3002
  _queryParams["cursor"] = cursor;
3361
3003
  }
3362
- if (name != null) {
3363
- _queryParams["name"] = name;
3364
- }
3365
- if (namespaceIds != null) {
3366
- _queryParams["namespace_ids"] = namespaceIds;
3367
- }
3368
- if (namespaceId != null) {
3369
- if (Array.isArray(namespaceId)) {
3370
- _queryParams["namespace_id"] = namespaceId.map(
3371
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3372
- );
3373
- } else {
3374
- _queryParams["namespace_id"] = namespaceId;
3375
- }
3376
- }
3377
3004
  const _response = await (this._options.fetcher ?? fetcher)({
3378
- url: urlJoin6(
3005
+ url: urlJoin5(
3379
3006
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3380
- "namespaces"
3007
+ "pools"
3381
3008
  ),
3382
3009
  method: "GET",
3383
3010
  headers: {
@@ -3395,7 +3022,7 @@ var Namespaces = class {
3395
3022
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3396
3023
  });
3397
3024
  if (_response.ok) {
3398
- return NamespaceListResponse.parseOrThrow(_response.body, {
3025
+ return PoolsListResponse.parseOrThrow(_response.body, {
3399
3026
  unrecognizedObjectKeys: "passthrough",
3400
3027
  allowUnrecognizedUnionMembers: true,
3401
3028
  allowUnrecognizedEnumValues: true,
@@ -3416,7 +3043,7 @@ var Namespaces = class {
3416
3043
  body: _response.error.rawBody
3417
3044
  });
3418
3045
  case "timeout":
3419
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3046
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3420
3047
  case "unknown":
3421
3048
  throw new RivetError({
3422
3049
  message: _response.error.errorMessage
@@ -3424,22 +3051,34 @@ var Namespaces = class {
3424
3051
  }
3425
3052
  }
3426
3053
  /**
3427
- * @param {Rivet.NamespacesCreateRequest} request
3428
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3054
+ * Lists the live nodes of a pool in node key order.
3055
+ *
3056
+ * @param {string} pool
3057
+ * @param {Rivet.PoolsListNodesRequest} request
3058
+ * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3429
3059
  *
3430
3060
  * @example
3431
- * await client.namespaces.create({
3432
- * displayName: "display_name",
3433
- * name: "name"
3061
+ * await client.pools.listNodes("pool", {
3062
+ * namespace: "namespace"
3434
3063
  * })
3435
3064
  */
3436
- async create(request, requestOptions) {
3065
+ async listNodes(pool, request, requestOptions) {
3066
+ const { namespace, limit, cursor } = request;
3067
+ const _queryParams = {};
3068
+ if (namespace != null)
3069
+ _queryParams["namespace"] = namespace;
3070
+ if (limit != null) {
3071
+ _queryParams["limit"] = limit.toString();
3072
+ }
3073
+ if (cursor != null) {
3074
+ _queryParams["cursor"] = cursor;
3075
+ }
3437
3076
  const _response = await (this._options.fetcher ?? fetcher)({
3438
- url: urlJoin6(
3077
+ url: urlJoin5(
3439
3078
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3440
- "namespaces"
3079
+ `pools/${encodeURIComponent(pool)}/nodes`
3441
3080
  ),
3442
- method: "POST",
3081
+ method: "GET",
3443
3082
  headers: {
3444
3083
  Authorization: await this._getAuthorizationHeader(),
3445
3084
  "X-Fern-Language": "JavaScript",
@@ -3448,14 +3087,14 @@ var Namespaces = class {
3448
3087
  ...requestOptions == null ? void 0 : requestOptions.headers
3449
3088
  },
3450
3089
  contentType: "application/json",
3090
+ queryParameters: _queryParams,
3451
3091
  requestType: "json",
3452
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3453
3092
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3454
3093
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3455
3094
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3456
3095
  });
3457
3096
  if (_response.ok) {
3458
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3097
+ return PoolsListNodesResponse.parseOrThrow(_response.body, {
3459
3098
  unrecognizedObjectKeys: "passthrough",
3460
3099
  allowUnrecognizedUnionMembers: true,
3461
3100
  allowUnrecognizedEnumValues: true,
@@ -3476,65 +3115,21 @@ var Namespaces = class {
3476
3115
  body: _response.error.rawBody
3477
3116
  });
3478
3117
  case "timeout":
3479
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3118
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3480
3119
  case "unknown":
3481
3120
  throw new RivetError({
3482
3121
  message: _response.error.errorMessage
3483
3122
  });
3484
3123
  }
3485
3124
  }
3486
- async _getAuthorizationHeader() {
3487
- return `Bearer ${await Supplier.get(this._options.token)}`;
3488
- }
3489
- };
3490
-
3491
- // src/api/resources/runners/client/Client.ts
3492
- import urlJoin7 from "url-join";
3493
- var Runners = class {
3494
- constructor(_options) {
3495
- this._options = _options;
3496
- }
3497
- /**
3498
- * @param {Rivet.RunnersListRequest} request
3499
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3500
- *
3501
- * @example
3502
- * await client.runners.list({
3503
- * namespace: "namespace"
3504
- * })
3505
- */
3506
- async list(request, requestOptions) {
3507
- const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3125
+ async get(name, request = {}, requestOptions) {
3508
3126
  const _queryParams = {};
3509
- _queryParams["namespace"] = namespace;
3510
- if (name != null) {
3511
- _queryParams["name"] = name;
3512
- }
3513
- if (runnerIds != null) {
3514
- _queryParams["runner_ids"] = runnerIds;
3515
- }
3516
- if (runnerId != null) {
3517
- if (Array.isArray(runnerId)) {
3518
- _queryParams["runner_id"] = runnerId.map(
3519
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3520
- );
3521
- } else {
3522
- _queryParams["runner_id"] = runnerId;
3523
- }
3524
- }
3525
- if (includeStopped != null) {
3526
- _queryParams["include_stopped"] = includeStopped.toString();
3527
- }
3528
- if (limit != null) {
3529
- _queryParams["limit"] = limit.toString();
3530
- }
3531
- if (cursor != null) {
3532
- _queryParams["cursor"] = cursor;
3533
- }
3127
+ if (request.namespace != null)
3128
+ _queryParams["namespace"] = request.namespace;
3534
3129
  const _response = await (this._options.fetcher ?? fetcher)({
3535
- url: urlJoin7(
3130
+ url: urlJoin5(
3536
3131
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3537
- "runners"
3132
+ `pools/${encodeURIComponent(name)}`
3538
3133
  ),
3539
3134
  method: "GET",
3540
3135
  headers: {
@@ -3552,7 +3147,7 @@ var Runners = class {
3552
3147
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3553
3148
  });
3554
3149
  if (_response.ok) {
3555
- return RunnersListResponse.parseOrThrow(_response.body, {
3150
+ return PoolResponse.parseOrThrow(_response.body, {
3556
3151
  unrecognizedObjectKeys: "passthrough",
3557
3152
  allowUnrecognizedUnionMembers: true,
3558
3153
  allowUnrecognizedEnumValues: true,
@@ -3573,43 +3168,23 @@ var Runners = class {
3573
3168
  body: _response.error.rawBody
3574
3169
  });
3575
3170
  case "timeout":
3576
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3171
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3577
3172
  case "unknown":
3578
3173
  throw new RivetError({
3579
3174
  message: _response.error.errorMessage
3580
3175
  });
3581
3176
  }
3582
3177
  }
3583
- /**
3584
- * 2 round trips:
3585
- *
3586
- * - GET /runners/names (fanout)
3587
- * - [api-peer] namespace::ops::resolve_for_name_global
3588
- *
3589
- * @param {Rivet.RunnersListNamesRequest} request
3590
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3591
- *
3592
- * @example
3593
- * await client.runners.listNames({
3594
- * namespace: "namespace"
3595
- * })
3596
- */
3597
- async listNames(request, requestOptions) {
3598
- const { namespace, limit, cursor } = request;
3178
+ async upsert(name, request, requestOptions) {
3599
3179
  const _queryParams = {};
3600
- _queryParams["namespace"] = namespace;
3601
- if (limit != null) {
3602
- _queryParams["limit"] = limit.toString();
3603
- }
3604
- if (cursor != null) {
3605
- _queryParams["cursor"] = cursor;
3606
- }
3180
+ if (request.namespace != null)
3181
+ _queryParams["namespace"] = request.namespace;
3607
3182
  const _response = await (this._options.fetcher ?? fetcher)({
3608
- url: urlJoin7(
3183
+ url: urlJoin5(
3609
3184
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3610
- "runners/names"
3185
+ `pools/${encodeURIComponent(name)}`
3611
3186
  ),
3612
- method: "GET",
3187
+ method: "PUT",
3613
3188
  headers: {
3614
3189
  Authorization: await this._getAuthorizationHeader(),
3615
3190
  "X-Fern-Language": "JavaScript",
@@ -3620,12 +3195,19 @@ var Runners = class {
3620
3195
  contentType: "application/json",
3621
3196
  queryParameters: _queryParams,
3622
3197
  requestType: "json",
3198
+ body: {
3199
+ drain_on_version_upgrade: request.drainOnVersionUpgrade,
3200
+ actor_eviction_delay: request.actorEvictionDelay,
3201
+ actor_eviction_period: request.actorEvictionPeriod,
3202
+ actor_eviction_rate: request.actorEvictionRate,
3203
+ metadata: request.metadata
3204
+ },
3623
3205
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3624
3206
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3625
3207
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3626
3208
  });
3627
3209
  if (_response.ok) {
3628
- return RunnersListNamesResponse.parseOrThrow(_response.body, {
3210
+ return PoolResponse.parseOrThrow(_response.body, {
3629
3211
  unrecognizedObjectKeys: "passthrough",
3630
3212
  allowUnrecognizedUnionMembers: true,
3631
3213
  allowUnrecognizedEnumValues: true,
@@ -3646,7 +3228,54 @@ var Runners = class {
3646
3228
  body: _response.error.rawBody
3647
3229
  });
3648
3230
  case "timeout":
3649
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3231
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3232
+ case "unknown":
3233
+ throw new RivetError({
3234
+ message: _response.error.errorMessage
3235
+ });
3236
+ }
3237
+ }
3238
+ async delete(name, request = {}, requestOptions) {
3239
+ const _queryParams = {};
3240
+ if (request.namespace != null)
3241
+ _queryParams["namespace"] = request.namespace;
3242
+ const _response = await (this._options.fetcher ?? fetcher)({
3243
+ url: urlJoin5(
3244
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3245
+ `pools/${encodeURIComponent(name)}`
3246
+ ),
3247
+ method: "DELETE",
3248
+ headers: {
3249
+ Authorization: await this._getAuthorizationHeader(),
3250
+ "X-Fern-Language": "JavaScript",
3251
+ "X-Fern-Runtime": RUNTIME.type,
3252
+ "X-Fern-Runtime-Version": RUNTIME.version,
3253
+ ...requestOptions == null ? void 0 : requestOptions.headers
3254
+ },
3255
+ contentType: "application/json",
3256
+ queryParameters: _queryParams,
3257
+ requestType: "json",
3258
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3259
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3260
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3261
+ });
3262
+ if (_response.ok) {
3263
+ return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3264
+ }
3265
+ if (_response.error.reason === "status-code") {
3266
+ throw new RivetError({
3267
+ statusCode: _response.error.statusCode,
3268
+ body: _response.error.body
3269
+ });
3270
+ }
3271
+ switch (_response.error.reason) {
3272
+ case "non-json":
3273
+ throw new RivetError({
3274
+ statusCode: _response.error.statusCode,
3275
+ body: _response.error.rawBody
3276
+ });
3277
+ case "timeout":
3278
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3650
3279
  case "unknown":
3651
3280
  throw new RivetError({
3652
3281
  message: _response.error.errorMessage
@@ -3665,31 +3294,23 @@ var RivetClient = class {
3665
3294
  }
3666
3295
  _authTokens;
3667
3296
  _datacenters;
3668
- _envoys;
3669
- _health;
3670
3297
  _metadata;
3671
3298
  _namespaces;
3672
- _runners;
3299
+ _pools;
3673
3300
  get authTokens() {
3674
3301
  return this._authTokens ?? (this._authTokens = new AuthTokens(this._options));
3675
3302
  }
3676
3303
  get datacenters() {
3677
3304
  return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3678
3305
  }
3679
- get envoys() {
3680
- return this._envoys ?? (this._envoys = new Envoys(this._options));
3681
- }
3682
- get health() {
3683
- return this._health ?? (this._health = new Health(this._options));
3684
- }
3685
3306
  get metadata() {
3686
3307
  return this._metadata ?? (this._metadata = new Metadata(this._options));
3687
3308
  }
3688
3309
  get namespaces() {
3689
3310
  return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3690
3311
  }
3691
- get runners() {
3692
- return this._runners ?? (this._runners = new Runners(this._options));
3312
+ get pools() {
3313
+ return this._pools ?? (this._pools = new Pools(this._options));
3693
3314
  }
3694
3315
  /**
3695
3316
  * **If key is some & `include_destroyed` is false**
@@ -3726,7 +3347,8 @@ var RivetClient = class {
3726
3347
  async actorsList(request, requestOptions) {
3727
3348
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3728
3349
  const _queryParams = {};
3729
- _queryParams["namespace"] = namespace;
3350
+ if (namespace != null)
3351
+ _queryParams["namespace"] = namespace;
3730
3352
  if (name != null) {
3731
3353
  _queryParams["name"] = name;
3732
3354
  }
@@ -3736,15 +3358,8 @@ var RivetClient = class {
3736
3358
  if (actorIds != null) {
3737
3359
  _queryParams["actor_ids"] = actorIds;
3738
3360
  }
3739
- if (actorId != null) {
3740
- if (Array.isArray(actorId)) {
3741
- _queryParams["actor_id"] = actorId.map(
3742
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3743
- );
3744
- } else {
3745
- _queryParams["actor_id"] = actorId;
3746
- }
3747
- }
3361
+ if (actorId != null)
3362
+ _queryParams["actor_id"] = actorId;
3748
3363
  if (includeDestroyed != null) {
3749
3364
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3750
3365
  }
@@ -3755,7 +3370,7 @@ var RivetClient = class {
3755
3370
  _queryParams["cursor"] = cursor;
3756
3371
  }
3757
3372
  const _response = await (this._options.fetcher ?? fetcher)({
3758
- url: urlJoin8(
3373
+ url: urlJoin6(
3759
3374
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3760
3375
  "actors"
3761
3376
  ),
@@ -3827,17 +3442,17 @@ var RivetClient = class {
3827
3442
  * @example
3828
3443
  * await client.actorsCreate({
3829
3444
  * namespace: "namespace",
3830
- * crashPolicy: "restart",
3831
3445
  * name: "name",
3832
- * runnerNameSelector: "runner_name_selector"
3446
+ * pool: "pool"
3833
3447
  * })
3834
3448
  */
3835
3449
  async actorsCreate(request, requestOptions) {
3836
3450
  const { namespace, ..._body } = request;
3837
3451
  const _queryParams = {};
3838
- _queryParams["namespace"] = namespace;
3452
+ if (namespace != null)
3453
+ _queryParams["namespace"] = namespace;
3839
3454
  const _response = await (this._options.fetcher ?? fetcher)({
3840
- url: urlJoin8(
3455
+ url: urlJoin6(
3841
3456
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3842
3457
  "actors"
3843
3458
  ),
@@ -3919,18 +3534,18 @@ var RivetClient = class {
3919
3534
  * @example
3920
3535
  * await client.actorsGetOrCreate({
3921
3536
  * namespace: "namespace",
3922
- * crashPolicy: "restart",
3923
3537
  * key: "key",
3924
3538
  * name: "name",
3925
- * runnerNameSelector: "runner_name_selector"
3539
+ * pool: "pool"
3926
3540
  * })
3927
3541
  */
3928
3542
  async actorsGetOrCreate(request, requestOptions) {
3929
3543
  const { namespace, ..._body } = request;
3930
3544
  const _queryParams = {};
3931
- _queryParams["namespace"] = namespace;
3545
+ if (namespace != null)
3546
+ _queryParams["namespace"] = namespace;
3932
3547
  const _response = await (this._options.fetcher ?? fetcher)({
3933
- url: urlJoin8(
3548
+ url: urlJoin6(
3934
3549
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3935
3550
  "actors"
3936
3551
  ),
@@ -3996,7 +3611,8 @@ var RivetClient = class {
3996
3611
  async actorsListNames(request, requestOptions) {
3997
3612
  const { namespace, limit, cursor } = request;
3998
3613
  const _queryParams = {};
3999
- _queryParams["namespace"] = namespace;
3614
+ if (namespace != null)
3615
+ _queryParams["namespace"] = namespace;
4000
3616
  if (limit != null) {
4001
3617
  _queryParams["limit"] = limit.toString();
4002
3618
  }
@@ -4004,7 +3620,7 @@ var RivetClient = class {
4004
3620
  _queryParams["cursor"] = cursor;
4005
3621
  }
4006
3622
  const _response = await (this._options.fetcher ?? fetcher)({
4007
- url: urlJoin8(
3623
+ url: urlJoin6(
4008
3624
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4009
3625
  "actors/names"
4010
3626
  ),
@@ -4067,16 +3683,18 @@ var RivetClient = class {
4067
3683
  * namespace: "namespace"
4068
3684
  * })
4069
3685
  */
4070
- async actorsDelete(actorId, request, requestOptions) {
3686
+ /** Returns one actor by ID. */
3687
+ async actorsGet(actorId, request, requestOptions) {
4071
3688
  const { namespace } = request;
4072
3689
  const _queryParams = {};
4073
- _queryParams["namespace"] = namespace;
3690
+ if (namespace != null)
3691
+ _queryParams["namespace"] = namespace;
4074
3692
  const _response = await (this._options.fetcher ?? fetcher)({
4075
- url: urlJoin8(
3693
+ url: urlJoin6(
4076
3694
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4077
3695
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4078
3696
  ),
4079
- method: "DELETE",
3697
+ method: "GET",
4080
3698
  headers: {
4081
3699
  Authorization: await this._getAuthorizationHeader(),
4082
3700
  "X-Fern-Language": "JavaScript",
@@ -4092,7 +3710,7 @@ var RivetClient = class {
4092
3710
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4093
3711
  });
4094
3712
  if (_response.ok) {
4095
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
3713
+ return ActorsGetResponse.parseOrThrow(_response.body, {
4096
3714
  unrecognizedObjectKeys: "passthrough",
4097
3715
  allowUnrecognizedUnionMembers: true,
4098
3716
  allowUnrecognizedEnumValues: true,
@@ -4113,34 +3731,24 @@ var RivetClient = class {
4113
3731
  body: _response.error.rawBody
4114
3732
  });
4115
3733
  case "timeout":
4116
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3734
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4117
3735
  case "unknown":
4118
3736
  throw new RivetError({
4119
3737
  message: _response.error.errorMessage
4120
3738
  });
4121
3739
  }
4122
3740
  }
4123
- /**
4124
- * @param {Rivet.RivetId} actorId
4125
- * @param {string} key
4126
- * @param {Rivet.ActorsKvGetRequest} request
4127
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4128
- *
4129
- * @example
4130
- * await client.actorsKvGet("actor_id", "key", {
4131
- * namespace: "namespace"
4132
- * })
4133
- */
4134
- async actorsKvGet(actorId, key, request, requestOptions) {
3741
+ async actorsDelete(actorId, request, requestOptions) {
4135
3742
  const { namespace } = request;
4136
3743
  const _queryParams = {};
4137
- _queryParams["namespace"] = namespace;
3744
+ if (namespace != null)
3745
+ _queryParams["namespace"] = namespace;
4138
3746
  const _response = await (this._options.fetcher ?? fetcher)({
4139
- url: urlJoin8(
3747
+ url: urlJoin6(
4140
3748
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4141
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3749
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4142
3750
  ),
4143
- method: "GET",
3751
+ method: "DELETE",
4144
3752
  headers: {
4145
3753
  Authorization: await this._getAuthorizationHeader(),
4146
3754
  "X-Fern-Language": "JavaScript",
@@ -4156,7 +3764,7 @@ var RivetClient = class {
4156
3764
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4157
3765
  });
4158
3766
  if (_response.ok) {
4159
- return ActorsKvGetResponse.parseOrThrow(_response.body, {
3767
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
4160
3768
  unrecognizedObjectKeys: "passthrough",
4161
3769
  allowUnrecognizedUnionMembers: true,
4162
3770
  allowUnrecognizedEnumValues: true,
@@ -4177,9 +3785,7 @@ var RivetClient = class {
4177
3785
  body: _response.error.rawBody
4178
3786
  });
4179
3787
  case "timeout":
4180
- throw new RivetTimeoutError(
4181
- "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4182
- );
3788
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4183
3789
  case "unknown":
4184
3790
  throw new RivetError({
4185
3791
  message: _response.error.errorMessage
@@ -4194,17 +3800,15 @@ var RivetClient = class {
4194
3800
  * @example
4195
3801
  * await client.actorsReschedule("actor_id", {
4196
3802
  * namespace: "namespace",
4197
- * body: {
4198
- * "key": "value"
4199
- * }
4200
3803
  * })
4201
3804
  */
4202
3805
  async actorsReschedule(actorId, request, requestOptions) {
4203
- const { namespace, body: _body } = request;
3806
+ const { namespace } = request;
4204
3807
  const _queryParams = {};
4205
- _queryParams["namespace"] = namespace;
3808
+ if (namespace != null)
3809
+ _queryParams["namespace"] = namespace;
4206
3810
  const _response = await (this._options.fetcher ?? fetcher)({
4207
- url: urlJoin8(
3811
+ url: urlJoin6(
4208
3812
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4209
3813
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
4210
3814
  ),
@@ -4219,7 +3823,6 @@ var RivetClient = class {
4219
3823
  contentType: "application/json",
4220
3824
  queryParameters: _queryParams,
4221
3825
  requestType: "json",
4222
- body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4223
3826
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4224
3827
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4225
3828
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4261,17 +3864,15 @@ var RivetClient = class {
4261
3864
  * @example
4262
3865
  * await client.actorsSleep("actor_id", {
4263
3866
  * namespace: "namespace",
4264
- * body: {
4265
- * "key": "value"
4266
- * }
4267
3867
  * })
4268
3868
  */
4269
3869
  async actorsSleep(actorId, request, requestOptions) {
4270
- const { namespace, body: _body } = request;
3870
+ const { namespace } = request;
4271
3871
  const _queryParams = {};
4272
- _queryParams["namespace"] = namespace;
3872
+ if (namespace != null)
3873
+ _queryParams["namespace"] = namespace;
4273
3874
  const _response = await (this._options.fetcher ?? fetcher)({
4274
- url: urlJoin8(
3875
+ url: urlJoin6(
4275
3876
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4276
3877
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
4277
3878
  ),
@@ -4286,7 +3887,6 @@ var RivetClient = class {
4286
3887
  contentType: "application/json",
4287
3888
  queryParameters: _queryParams,
4288
3889
  requestType: "json",
4289
- body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4290
3890
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4291
3891
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4292
3892
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -4320,360 +3920,6 @@ var RivetClient = class {
4320
3920
  });
4321
3921
  }
4322
3922
  }
4323
- /**
4324
- * @param {Rivet.RunnerConfigsListRequest} request
4325
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4326
- *
4327
- * @example
4328
- * await client.runnerConfigsList({
4329
- * namespace: "namespace"
4330
- * })
4331
- */
4332
- async runnerConfigsList(request, requestOptions) {
4333
- const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
4334
- const _queryParams = {};
4335
- _queryParams["namespace"] = namespace;
4336
- if (limit != null) {
4337
- _queryParams["limit"] = limit.toString();
4338
- }
4339
- if (cursor != null) {
4340
- _queryParams["cursor"] = cursor;
4341
- }
4342
- if (variant != null) {
4343
- _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4344
- unrecognizedObjectKeys: "strip"
4345
- });
4346
- }
4347
- if (runnerNames != null) {
4348
- _queryParams["runner_names"] = runnerNames;
4349
- }
4350
- if (runnerName != null) {
4351
- if (Array.isArray(runnerName)) {
4352
- _queryParams["runner_name"] = runnerName.map((item) => item);
4353
- } else {
4354
- _queryParams["runner_name"] = runnerName;
4355
- }
4356
- }
4357
- const _response = await (this._options.fetcher ?? fetcher)({
4358
- url: urlJoin8(
4359
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4360
- "runner-configs"
4361
- ),
4362
- method: "GET",
4363
- headers: {
4364
- Authorization: await this._getAuthorizationHeader(),
4365
- "X-Fern-Language": "JavaScript",
4366
- "X-Fern-Runtime": RUNTIME.type,
4367
- "X-Fern-Runtime-Version": RUNTIME.version,
4368
- ...requestOptions == null ? void 0 : requestOptions.headers
4369
- },
4370
- contentType: "application/json",
4371
- queryParameters: _queryParams,
4372
- requestType: "json",
4373
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4374
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4375
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4376
- });
4377
- if (_response.ok) {
4378
- return RunnerConfigsListResponse.parseOrThrow(_response.body, {
4379
- unrecognizedObjectKeys: "passthrough",
4380
- allowUnrecognizedUnionMembers: true,
4381
- allowUnrecognizedEnumValues: true,
4382
- skipValidation: true,
4383
- breadcrumbsPrefix: ["response"]
4384
- });
4385
- }
4386
- if (_response.error.reason === "status-code") {
4387
- throw new RivetError({
4388
- statusCode: _response.error.statusCode,
4389
- body: _response.error.body
4390
- });
4391
- }
4392
- switch (_response.error.reason) {
4393
- case "non-json":
4394
- throw new RivetError({
4395
- statusCode: _response.error.statusCode,
4396
- body: _response.error.rawBody
4397
- });
4398
- case "timeout":
4399
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
4400
- case "unknown":
4401
- throw new RivetError({
4402
- message: _response.error.errorMessage
4403
- });
4404
- }
4405
- }
4406
- /**
4407
- * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4408
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4409
- *
4410
- * @example
4411
- * await client.runnerConfigsServerlessHealthCheck({
4412
- * namespace: "namespace",
4413
- * url: "url"
4414
- * })
4415
- */
4416
- async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4417
- const { namespace, ..._body } = request;
4418
- const _queryParams = {};
4419
- _queryParams["namespace"] = namespace;
4420
- const _response = await (this._options.fetcher ?? fetcher)({
4421
- url: urlJoin8(
4422
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4423
- "runner-configs/serverless-health-check"
4424
- ),
4425
- method: "POST",
4426
- headers: {
4427
- Authorization: await this._getAuthorizationHeader(),
4428
- "X-Fern-Language": "JavaScript",
4429
- "X-Fern-Runtime": RUNTIME.type,
4430
- "X-Fern-Runtime-Version": RUNTIME.version,
4431
- ...requestOptions == null ? void 0 : requestOptions.headers
4432
- },
4433
- contentType: "application/json",
4434
- queryParameters: _queryParams,
4435
- requestType: "json",
4436
- body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4437
- unrecognizedObjectKeys: "strip"
4438
- }),
4439
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4440
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4441
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4442
- });
4443
- if (_response.ok) {
4444
- return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
4445
- unrecognizedObjectKeys: "passthrough",
4446
- allowUnrecognizedUnionMembers: true,
4447
- allowUnrecognizedEnumValues: true,
4448
- skipValidation: true,
4449
- breadcrumbsPrefix: ["response"]
4450
- });
4451
- }
4452
- if (_response.error.reason === "status-code") {
4453
- throw new RivetError({
4454
- statusCode: _response.error.statusCode,
4455
- body: _response.error.body
4456
- });
4457
- }
4458
- switch (_response.error.reason) {
4459
- case "non-json":
4460
- throw new RivetError({
4461
- statusCode: _response.error.statusCode,
4462
- body: _response.error.rawBody
4463
- });
4464
- case "timeout":
4465
- throw new RivetTimeoutError(
4466
- "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4467
- );
4468
- case "unknown":
4469
- throw new RivetError({
4470
- message: _response.error.errorMessage
4471
- });
4472
- }
4473
- }
4474
- /**
4475
- * @param {string} runnerName
4476
- * @param {Rivet.RunnerConfigsUpsertRequestBody} request
4477
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4478
- *
4479
- * @example
4480
- * await client.runnerConfigsUpsert("runner_name", {
4481
- * namespace: "namespace",
4482
- * datacenters: {
4483
- * "key": {}
4484
- * }
4485
- * })
4486
- */
4487
- async runnerConfigsUpsert(runnerName, request, requestOptions) {
4488
- const { namespace, ..._body } = request;
4489
- const _queryParams = {};
4490
- _queryParams["namespace"] = namespace;
4491
- const _response = await (this._options.fetcher ?? fetcher)({
4492
- url: urlJoin8(
4493
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4494
- `runner-configs/${encodeURIComponent(runnerName)}`
4495
- ),
4496
- method: "PUT",
4497
- headers: {
4498
- Authorization: await this._getAuthorizationHeader(),
4499
- "X-Fern-Language": "JavaScript",
4500
- "X-Fern-Runtime": RUNTIME.type,
4501
- "X-Fern-Runtime-Version": RUNTIME.version,
4502
- ...requestOptions == null ? void 0 : requestOptions.headers
4503
- },
4504
- contentType: "application/json",
4505
- queryParameters: _queryParams,
4506
- requestType: "json",
4507
- body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4508
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4509
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4510
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4511
- });
4512
- if (_response.ok) {
4513
- return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
4514
- unrecognizedObjectKeys: "passthrough",
4515
- allowUnrecognizedUnionMembers: true,
4516
- allowUnrecognizedEnumValues: true,
4517
- skipValidation: true,
4518
- breadcrumbsPrefix: ["response"]
4519
- });
4520
- }
4521
- if (_response.error.reason === "status-code") {
4522
- throw new RivetError({
4523
- statusCode: _response.error.statusCode,
4524
- body: _response.error.body
4525
- });
4526
- }
4527
- switch (_response.error.reason) {
4528
- case "non-json":
4529
- throw new RivetError({
4530
- statusCode: _response.error.statusCode,
4531
- body: _response.error.rawBody
4532
- });
4533
- case "timeout":
4534
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
4535
- case "unknown":
4536
- throw new RivetError({
4537
- message: _response.error.errorMessage
4538
- });
4539
- }
4540
- }
4541
- /**
4542
- * @param {string} runnerName
4543
- * @param {Rivet.RunnerConfigsDeleteRequest} request
4544
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4545
- *
4546
- * @example
4547
- * await client.runnerConfigsDelete("runner_name", {
4548
- * namespace: "namespace"
4549
- * })
4550
- */
4551
- async runnerConfigsDelete(runnerName, request, requestOptions) {
4552
- const { namespace } = request;
4553
- const _queryParams = {};
4554
- _queryParams["namespace"] = namespace;
4555
- const _response = await (this._options.fetcher ?? fetcher)({
4556
- url: urlJoin8(
4557
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4558
- `runner-configs/${encodeURIComponent(runnerName)}`
4559
- ),
4560
- method: "DELETE",
4561
- headers: {
4562
- Authorization: await this._getAuthorizationHeader(),
4563
- "X-Fern-Language": "JavaScript",
4564
- "X-Fern-Runtime": RUNTIME.type,
4565
- "X-Fern-Runtime-Version": RUNTIME.version,
4566
- ...requestOptions == null ? void 0 : requestOptions.headers
4567
- },
4568
- contentType: "application/json",
4569
- queryParameters: _queryParams,
4570
- requestType: "json",
4571
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4572
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4573
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4574
- });
4575
- if (_response.ok) {
4576
- return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4577
- unrecognizedObjectKeys: "passthrough",
4578
- allowUnrecognizedUnionMembers: true,
4579
- allowUnrecognizedEnumValues: true,
4580
- skipValidation: true,
4581
- breadcrumbsPrefix: ["response"]
4582
- });
4583
- }
4584
- if (_response.error.reason === "status-code") {
4585
- throw new RivetError({
4586
- statusCode: _response.error.statusCode,
4587
- body: _response.error.body
4588
- });
4589
- }
4590
- switch (_response.error.reason) {
4591
- case "non-json":
4592
- throw new RivetError({
4593
- statusCode: _response.error.statusCode,
4594
- body: _response.error.rawBody
4595
- });
4596
- case "timeout":
4597
- throw new RivetTimeoutError(
4598
- "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4599
- );
4600
- case "unknown":
4601
- throw new RivetError({
4602
- message: _response.error.errorMessage
4603
- });
4604
- }
4605
- }
4606
- /**
4607
- * @param {string} runnerName
4608
- * @param {Rivet.RunnerConfigsRefreshMetadataRequest} request
4609
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4610
- *
4611
- * @example
4612
- * await client.runnerConfigsRefreshMetadata("runner_name", {
4613
- * namespace: "namespace",
4614
- * body: {
4615
- * "key": "value"
4616
- * }
4617
- * })
4618
- */
4619
- async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4620
- const { namespace, body: _body } = request;
4621
- const _queryParams = {};
4622
- _queryParams["namespace"] = namespace;
4623
- const _response = await (this._options.fetcher ?? fetcher)({
4624
- url: urlJoin8(
4625
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4626
- `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4627
- ),
4628
- method: "POST",
4629
- headers: {
4630
- Authorization: await this._getAuthorizationHeader(),
4631
- "X-Fern-Language": "JavaScript",
4632
- "X-Fern-Runtime": RUNTIME.type,
4633
- "X-Fern-Runtime-Version": RUNTIME.version,
4634
- ...requestOptions == null ? void 0 : requestOptions.headers
4635
- },
4636
- contentType: "application/json",
4637
- queryParameters: _queryParams,
4638
- requestType: "json",
4639
- body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4640
- unrecognizedObjectKeys: "strip"
4641
- }),
4642
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4643
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4644
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4645
- });
4646
- if (_response.ok) {
4647
- return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4648
- unrecognizedObjectKeys: "passthrough",
4649
- allowUnrecognizedUnionMembers: true,
4650
- allowUnrecognizedEnumValues: true,
4651
- skipValidation: true,
4652
- breadcrumbsPrefix: ["response"]
4653
- });
4654
- }
4655
- if (_response.error.reason === "status-code") {
4656
- throw new RivetError({
4657
- statusCode: _response.error.statusCode,
4658
- body: _response.error.body
4659
- });
4660
- }
4661
- switch (_response.error.reason) {
4662
- case "non-json":
4663
- throw new RivetError({
4664
- statusCode: _response.error.statusCode,
4665
- body: _response.error.rawBody
4666
- });
4667
- case "timeout":
4668
- throw new RivetTimeoutError(
4669
- "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4670
- );
4671
- case "unknown":
4672
- throw new RivetError({
4673
- message: _response.error.errorMessage
4674
- });
4675
- }
4676
- }
4677
3923
  async _getAuthorizationHeader() {
4678
3924
  return `Bearer ${await Supplier.get(this._options.token)}`;
4679
3925
  }