@rivetkit/engine-api-full 2.0.33 → 2.0.34-rc.2

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 (55) hide show
  1. package/dist/browser/cjs/index.js +156 -10
  2. package/dist/browser/cjs/serialization.js +140 -1
  3. package/dist/browser/esm/index.js +156 -10
  4. package/dist/browser/esm/serialization.js +140 -1
  5. package/dist/node/index.js +156 -10
  6. package/dist/node/serialization.js +158 -1
  7. package/package.json +1 -1
  8. package/types/Client.d.ts +9 -4
  9. package/types/api/client/requests/ActorsDeleteRequest.d.ts +4 -2
  10. package/types/api/client/requests/ActorsKvGetRequest.d.ts +12 -0
  11. package/types/api/client/requests/index.d.ts +1 -0
  12. package/types/api/types/Actor.d.ts +2 -0
  13. package/types/api/types/ActorError.d.ts +20 -0
  14. package/types/api/types/ActorErrorCrashed.d.ts +11 -0
  15. package/types/api/types/ActorErrorCrashedCrashed.d.ts +9 -0
  16. package/types/api/types/ActorErrorRunnerConnectionLost.d.ts +11 -0
  17. package/types/api/types/ActorErrorRunnerConnectionLostRunnerConnectionLost.d.ts +10 -0
  18. package/types/api/types/ActorErrorRunnerDrainingTimeout.d.ts +11 -0
  19. package/types/api/types/ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout.d.ts +10 -0
  20. package/types/api/types/ActorErrorRunnerNoResponse.d.ts +11 -0
  21. package/types/api/types/ActorErrorRunnerNoResponseRunnerNoResponse.d.ts +10 -0
  22. package/types/api/types/ActorErrorRunnerPoolError.d.ts +11 -0
  23. package/types/api/types/RunnerConfig.d.ts +1 -0
  24. package/types/api/types/RunnerConfigResponse.d.ts +7 -0
  25. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +1 -1
  26. package/types/api/types/RunnerPoolError.d.ts +14 -0
  27. package/types/api/types/RunnerPoolErrorServerlessConnectionError.d.ts +11 -0
  28. package/types/api/types/RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError.d.ts +9 -0
  29. package/types/api/types/RunnerPoolErrorServerlessHttpError.d.ts +11 -0
  30. package/types/api/types/RunnerPoolErrorServerlessHttpErrorServerlessHttpError.d.ts +10 -0
  31. package/types/api/types/RunnerPoolErrorServerlessInvalidPayload.d.ts +11 -0
  32. package/types/api/types/RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload.d.ts +9 -0
  33. package/types/api/types/index.d.ts +18 -0
  34. package/types/serialization/types/Actor.d.ts +2 -0
  35. package/types/serialization/types/ActorError.d.ts +15 -0
  36. package/types/serialization/types/ActorErrorCrashed.d.ts +13 -0
  37. package/types/serialization/types/ActorErrorCrashedCrashed.d.ts +12 -0
  38. package/types/serialization/types/ActorErrorRunnerConnectionLost.d.ts +13 -0
  39. package/types/serialization/types/ActorErrorRunnerConnectionLostRunnerConnectionLost.d.ts +13 -0
  40. package/types/serialization/types/ActorErrorRunnerDrainingTimeout.d.ts +13 -0
  41. package/types/serialization/types/ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout.d.ts +13 -0
  42. package/types/serialization/types/ActorErrorRunnerNoResponse.d.ts +13 -0
  43. package/types/serialization/types/ActorErrorRunnerNoResponseRunnerNoResponse.d.ts +13 -0
  44. package/types/serialization/types/ActorErrorRunnerPoolError.d.ts +13 -0
  45. package/types/serialization/types/RunnerConfig.d.ts +1 -0
  46. package/types/serialization/types/RunnerConfigResponse.d.ts +14 -0
  47. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +2 -2
  48. package/types/serialization/types/RunnerPoolError.d.ts +13 -0
  49. package/types/serialization/types/RunnerPoolErrorServerlessConnectionError.d.ts +13 -0
  50. package/types/serialization/types/RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError.d.ts +12 -0
  51. package/types/serialization/types/RunnerPoolErrorServerlessHttpError.d.ts +13 -0
  52. package/types/serialization/types/RunnerPoolErrorServerlessHttpErrorServerlessHttpError.d.ts +13 -0
  53. package/types/serialization/types/RunnerPoolErrorServerlessInvalidPayload.d.ts +13 -0
  54. package/types/serialization/types/RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload.d.ts +12 -0
  55. package/types/serialization/types/index.d.ts +18 -0
@@ -2345,6 +2345,16 @@ function transformAndValidateUnion({
2345
2345
  var serialization_exports = {};
2346
2346
  __export(serialization_exports, {
2347
2347
  Actor: () => Actor,
2348
+ ActorError: () => ActorError,
2349
+ ActorErrorCrashed: () => ActorErrorCrashed,
2350
+ ActorErrorCrashedCrashed: () => ActorErrorCrashedCrashed,
2351
+ ActorErrorRunnerConnectionLost: () => ActorErrorRunnerConnectionLost,
2352
+ ActorErrorRunnerConnectionLostRunnerConnectionLost: () => ActorErrorRunnerConnectionLostRunnerConnectionLost,
2353
+ ActorErrorRunnerDrainingTimeout: () => ActorErrorRunnerDrainingTimeout,
2354
+ ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout: () => ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout,
2355
+ ActorErrorRunnerNoResponse: () => ActorErrorRunnerNoResponse,
2356
+ ActorErrorRunnerNoResponseRunnerNoResponse: () => ActorErrorRunnerNoResponseRunnerNoResponse,
2357
+ ActorErrorRunnerPoolError: () => ActorErrorRunnerPoolError,
2348
2358
  ActorName: () => ActorName,
2349
2359
  ActorsCreateRequest: () => ActorsCreateRequest,
2350
2360
  ActorsCreateResponse: () => ActorsCreateResponse,
@@ -2374,6 +2384,7 @@ __export(serialization_exports, {
2374
2384
  RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2375
2385
  RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2376
2386
  RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2387
+ RunnerConfigResponse: () => RunnerConfigResponse,
2377
2388
  RunnerConfigServerless: () => RunnerConfigServerless,
2378
2389
  RunnerConfigVariant: () => RunnerConfigVariant2,
2379
2390
  RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
@@ -2399,6 +2410,13 @@ __export(serialization_exports, {
2399
2410
  RunnerConfigsServerlessMetadataErrorRequestTimedOut: () => RunnerConfigsServerlessMetadataErrorRequestTimedOut,
2400
2411
  RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2401
2412
  RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2413
+ RunnerPoolError: () => RunnerPoolError,
2414
+ RunnerPoolErrorServerlessConnectionError: () => RunnerPoolErrorServerlessConnectionError,
2415
+ RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError: () => RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError,
2416
+ RunnerPoolErrorServerlessHttpError: () => RunnerPoolErrorServerlessHttpError,
2417
+ RunnerPoolErrorServerlessHttpErrorServerlessHttpError: () => RunnerPoolErrorServerlessHttpErrorServerlessHttpError,
2418
+ RunnerPoolErrorServerlessInvalidPayload: () => RunnerPoolErrorServerlessInvalidPayload,
2419
+ RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload: () => RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload,
2402
2420
  RunnersListNamesResponse: () => RunnersListNamesResponse,
2403
2421
  RunnersListResponse: () => RunnersListResponse,
2404
2422
  namespaces: () => namespaces_exports2
@@ -2410,6 +2428,117 @@ var RivetId = schemas_exports.string();
2410
2428
  // src/serialization/types/CrashPolicy.ts
2411
2429
  var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2412
2430
 
2431
+ // src/serialization/types/RunnerPoolErrorServerlessHttpErrorServerlessHttpError.ts
2432
+ var RunnerPoolErrorServerlessHttpErrorServerlessHttpError = schemas_exports.object({
2433
+ body: schemas_exports.string(),
2434
+ statusCode: schemas_exports.property("status_code", schemas_exports.number())
2435
+ });
2436
+
2437
+ // src/serialization/types/RunnerPoolErrorServerlessHttpError.ts
2438
+ var RunnerPoolErrorServerlessHttpError = schemas_exports.object({
2439
+ serverlessHttpError: schemas_exports.property(
2440
+ "serverless_http_error",
2441
+ RunnerPoolErrorServerlessHttpErrorServerlessHttpError
2442
+ )
2443
+ });
2444
+
2445
+ // src/serialization/types/RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError.ts
2446
+ var RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError = schemas_exports.object({
2447
+ message: schemas_exports.string()
2448
+ });
2449
+
2450
+ // src/serialization/types/RunnerPoolErrorServerlessConnectionError.ts
2451
+ var RunnerPoolErrorServerlessConnectionError = schemas_exports.object({
2452
+ serverlessConnectionError: schemas_exports.property(
2453
+ "serverless_connection_error",
2454
+ RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError
2455
+ )
2456
+ });
2457
+
2458
+ // src/serialization/types/RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload.ts
2459
+ var RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload = schemas_exports.object({
2460
+ message: schemas_exports.string()
2461
+ });
2462
+
2463
+ // src/serialization/types/RunnerPoolErrorServerlessInvalidPayload.ts
2464
+ var RunnerPoolErrorServerlessInvalidPayload = schemas_exports.object({
2465
+ serverlessInvalidPayload: schemas_exports.property(
2466
+ "serverless_invalid_payload",
2467
+ RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload
2468
+ )
2469
+ });
2470
+
2471
+ // src/serialization/types/RunnerPoolError.ts
2472
+ var RunnerPoolError = schemas_exports.undiscriminatedUnion([
2473
+ RunnerPoolErrorServerlessHttpError,
2474
+ schemas_exports.stringLiteral("serverless_stream_ended_early"),
2475
+ RunnerPoolErrorServerlessConnectionError,
2476
+ schemas_exports.stringLiteral("serverless_invalid_base64"),
2477
+ RunnerPoolErrorServerlessInvalidPayload,
2478
+ schemas_exports.stringLiteral("internal_error")
2479
+ ]);
2480
+
2481
+ // src/serialization/types/ActorErrorRunnerPoolError.ts
2482
+ var ActorErrorRunnerPoolError = schemas_exports.object({
2483
+ runnerPoolError: schemas_exports.property("runner_pool_error", RunnerPoolError)
2484
+ });
2485
+
2486
+ // src/serialization/types/ActorErrorRunnerNoResponseRunnerNoResponse.ts
2487
+ var ActorErrorRunnerNoResponseRunnerNoResponse = schemas_exports.object({
2488
+ runnerId: schemas_exports.property("runner_id", RivetId)
2489
+ });
2490
+
2491
+ // src/serialization/types/ActorErrorRunnerNoResponse.ts
2492
+ var ActorErrorRunnerNoResponse = schemas_exports.object({
2493
+ runnerNoResponse: schemas_exports.property("runner_no_response", ActorErrorRunnerNoResponseRunnerNoResponse)
2494
+ });
2495
+
2496
+ // src/serialization/types/ActorErrorRunnerConnectionLostRunnerConnectionLost.ts
2497
+ var ActorErrorRunnerConnectionLostRunnerConnectionLost = schemas_exports.object({
2498
+ runnerId: schemas_exports.property("runner_id", RivetId)
2499
+ });
2500
+
2501
+ // src/serialization/types/ActorErrorRunnerConnectionLost.ts
2502
+ var ActorErrorRunnerConnectionLost = schemas_exports.object({
2503
+ runnerConnectionLost: schemas_exports.property(
2504
+ "runner_connection_lost",
2505
+ ActorErrorRunnerConnectionLostRunnerConnectionLost
2506
+ )
2507
+ });
2508
+
2509
+ // src/serialization/types/ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout.ts
2510
+ var ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout = schemas_exports.object({
2511
+ runnerId: schemas_exports.property("runner_id", RivetId)
2512
+ });
2513
+
2514
+ // src/serialization/types/ActorErrorRunnerDrainingTimeout.ts
2515
+ var ActorErrorRunnerDrainingTimeout = schemas_exports.object({
2516
+ runnerDrainingTimeout: schemas_exports.property(
2517
+ "runner_draining_timeout",
2518
+ ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout
2519
+ )
2520
+ });
2521
+
2522
+ // src/serialization/types/ActorErrorCrashedCrashed.ts
2523
+ var ActorErrorCrashedCrashed = schemas_exports.object({
2524
+ message: schemas_exports.string().optional()
2525
+ });
2526
+
2527
+ // src/serialization/types/ActorErrorCrashed.ts
2528
+ var ActorErrorCrashed = schemas_exports.object({
2529
+ crashed: ActorErrorCrashedCrashed
2530
+ });
2531
+
2532
+ // src/serialization/types/ActorError.ts
2533
+ var ActorError = schemas_exports.undiscriminatedUnion([
2534
+ ActorErrorRunnerPoolError,
2535
+ schemas_exports.stringLiteral("no_capacity"),
2536
+ ActorErrorRunnerNoResponse,
2537
+ ActorErrorRunnerConnectionLost,
2538
+ ActorErrorRunnerDrainingTimeout,
2539
+ ActorErrorCrashed
2540
+ ]);
2541
+
2413
2542
  // src/serialization/types/Actor.ts
2414
2543
  var Actor = schemas_exports.object({
2415
2544
  actorId: schemas_exports.property("actor_id", RivetId),
@@ -2418,6 +2547,7 @@ var Actor = schemas_exports.object({
2418
2547
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2419
2548
  datacenter: schemas_exports.string(),
2420
2549
  destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2550
+ error: ActorError.optional(),
2421
2551
  key: schemas_exports.string().optional(),
2422
2552
  name: schemas_exports.string(),
2423
2553
  namespaceId: schemas_exports.property("namespace_id", RivetId),
@@ -2573,6 +2703,10 @@ var RunnerConfigServerless = schemas_exports.object({
2573
2703
  var RunnerConfig = schemas_exports.object({
2574
2704
  normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2575
2705
  serverless: RunnerConfigServerless.optional(),
2706
+ drainOnVersionUpgrade: schemas_exports.property(
2707
+ "drain_on_version_upgrade",
2708
+ schemas_exports.boolean().optional()
2709
+ ),
2576
2710
  metadata: schemas_exports.unknown().optional()
2577
2711
  });
2578
2712
 
@@ -2600,6 +2734,11 @@ var RunnerConfigKindServerless = schemas_exports.object({
2600
2734
  // src/serialization/types/RunnerConfigKind.ts
2601
2735
  var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2602
2736
 
2737
+ // src/serialization/types/RunnerConfigResponse.ts
2738
+ var RunnerConfigResponse = schemas_exports.object({
2739
+ runnerPoolError: schemas_exports.property("runner_pool_error", RunnerPoolError.optional())
2740
+ }).extend(RunnerConfig);
2741
+
2603
2742
  // src/serialization/types/RunnerConfigVariant.ts
2604
2743
  var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2605
2744
 
@@ -2608,7 +2747,7 @@ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(
2608
2747
 
2609
2748
  // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2610
2749
  var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2611
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2750
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2612
2751
  });
2613
2752
 
2614
2753
  // src/serialization/types/RunnerConfigsListResponse.ts
@@ -2981,7 +3120,7 @@ var Metadata = class {
2981
3120
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2982
3121
  "metadata"
2983
3122
  ),
2984
- method: "DELETE",
3123
+ method: "GET",
2985
3124
  headers: {
2986
3125
  Authorization: await this._getAuthorizationHeader(),
2987
3126
  "X-Fern-Language": "JavaScript",
@@ -3017,7 +3156,7 @@ var Metadata = class {
3017
3156
  body: _response.error.rawBody
3018
3157
  });
3019
3158
  case "timeout":
3020
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /metadata.");
3159
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3021
3160
  case "unknown":
3022
3161
  throw new RivetError({
3023
3162
  message: _response.error.errorMessage
@@ -3747,14 +3886,14 @@ var RivetClient = class {
3747
3886
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3748
3887
  *
3749
3888
  * @example
3750
- * await client.actorsDelete("actor_id")
3889
+ * await client.actorsDelete("actor_id", {
3890
+ * namespace: "namespace"
3891
+ * })
3751
3892
  */
3752
- async actorsDelete(actorId, request = {}, requestOptions) {
3893
+ async actorsDelete(actorId, request, requestOptions) {
3753
3894
  const { namespace } = request;
3754
3895
  const _queryParams = {};
3755
- if (namespace != null) {
3756
- _queryParams["namespace"] = namespace;
3757
- }
3896
+ _queryParams["namespace"] = namespace;
3758
3897
  const _response = await (this._options.fetcher ?? fetcher)({
3759
3898
  url: (0, import_url_join6.default)(
3760
3899
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
@@ -3807,12 +3946,18 @@ var RivetClient = class {
3807
3946
  /**
3808
3947
  * @param {Rivet.RivetId} actorId
3809
3948
  * @param {string} key
3949
+ * @param {Rivet.ActorsKvGetRequest} request
3810
3950
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3811
3951
  *
3812
3952
  * @example
3813
- * await client.actorsKvGet("actor_id", "key")
3953
+ * await client.actorsKvGet("actor_id", "key", {
3954
+ * namespace: "namespace"
3955
+ * })
3814
3956
  */
3815
- async actorsKvGet(actorId, key, requestOptions) {
3957
+ async actorsKvGet(actorId, key, request, requestOptions) {
3958
+ const { namespace } = request;
3959
+ const _queryParams = {};
3960
+ _queryParams["namespace"] = namespace;
3816
3961
  const _response = await (this._options.fetcher ?? fetcher)({
3817
3962
  url: (0, import_url_join6.default)(
3818
3963
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
@@ -3827,6 +3972,7 @@ var RivetClient = class {
3827
3972
  ...requestOptions == null ? void 0 : requestOptions.headers
3828
3973
  },
3829
3974
  contentType: "application/json",
3975
+ queryParameters: _queryParams,
3830
3976
  requestType: "json",
3831
3977
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3832
3978
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
@@ -31,6 +31,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var serialization_exports = {};
32
32
  __export(serialization_exports, {
33
33
  Actor: () => Actor,
34
+ ActorError: () => ActorError,
35
+ ActorErrorCrashed: () => ActorErrorCrashed,
36
+ ActorErrorCrashedCrashed: () => ActorErrorCrashedCrashed,
37
+ ActorErrorRunnerConnectionLost: () => ActorErrorRunnerConnectionLost,
38
+ ActorErrorRunnerConnectionLostRunnerConnectionLost: () => ActorErrorRunnerConnectionLostRunnerConnectionLost,
39
+ ActorErrorRunnerDrainingTimeout: () => ActorErrorRunnerDrainingTimeout,
40
+ ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout: () => ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout,
41
+ ActorErrorRunnerNoResponse: () => ActorErrorRunnerNoResponse,
42
+ ActorErrorRunnerNoResponseRunnerNoResponse: () => ActorErrorRunnerNoResponseRunnerNoResponse,
43
+ ActorErrorRunnerPoolError: () => ActorErrorRunnerPoolError,
34
44
  ActorName: () => ActorName,
35
45
  ActorsCreateRequest: () => ActorsCreateRequest,
36
46
  ActorsCreateResponse: () => ActorsCreateResponse,
@@ -60,6 +70,7 @@ __export(serialization_exports, {
60
70
  RunnerConfigKindNormal: () => RunnerConfigKindNormal,
61
71
  RunnerConfigKindServerless: () => RunnerConfigKindServerless,
62
72
  RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
73
+ RunnerConfigResponse: () => RunnerConfigResponse,
63
74
  RunnerConfigServerless: () => RunnerConfigServerless,
64
75
  RunnerConfigVariant: () => RunnerConfigVariant,
65
76
  RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
@@ -85,6 +96,13 @@ __export(serialization_exports, {
85
96
  RunnerConfigsServerlessMetadataErrorRequestTimedOut: () => RunnerConfigsServerlessMetadataErrorRequestTimedOut,
86
97
  RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
87
98
  RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
99
+ RunnerPoolError: () => RunnerPoolError,
100
+ RunnerPoolErrorServerlessConnectionError: () => RunnerPoolErrorServerlessConnectionError,
101
+ RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError: () => RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError,
102
+ RunnerPoolErrorServerlessHttpError: () => RunnerPoolErrorServerlessHttpError,
103
+ RunnerPoolErrorServerlessHttpErrorServerlessHttpError: () => RunnerPoolErrorServerlessHttpErrorServerlessHttpError,
104
+ RunnerPoolErrorServerlessInvalidPayload: () => RunnerPoolErrorServerlessInvalidPayload,
105
+ RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload: () => RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload,
88
106
  RunnersListNamesResponse: () => RunnersListNamesResponse,
89
107
  RunnersListResponse: () => RunnersListResponse,
90
108
  namespaces: () => namespaces_exports
@@ -1560,6 +1578,117 @@ var RivetId = schemas_exports.string();
1560
1578
  // src/serialization/types/CrashPolicy.ts
1561
1579
  var CrashPolicy = schemas_exports.enum_(["restart", "sleep", "destroy"]);
1562
1580
 
1581
+ // src/serialization/types/RunnerPoolErrorServerlessHttpErrorServerlessHttpError.ts
1582
+ var RunnerPoolErrorServerlessHttpErrorServerlessHttpError = schemas_exports.object({
1583
+ body: schemas_exports.string(),
1584
+ statusCode: schemas_exports.property("status_code", schemas_exports.number())
1585
+ });
1586
+
1587
+ // src/serialization/types/RunnerPoolErrorServerlessHttpError.ts
1588
+ var RunnerPoolErrorServerlessHttpError = schemas_exports.object({
1589
+ serverlessHttpError: schemas_exports.property(
1590
+ "serverless_http_error",
1591
+ RunnerPoolErrorServerlessHttpErrorServerlessHttpError
1592
+ )
1593
+ });
1594
+
1595
+ // src/serialization/types/RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError.ts
1596
+ var RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError = schemas_exports.object({
1597
+ message: schemas_exports.string()
1598
+ });
1599
+
1600
+ // src/serialization/types/RunnerPoolErrorServerlessConnectionError.ts
1601
+ var RunnerPoolErrorServerlessConnectionError = schemas_exports.object({
1602
+ serverlessConnectionError: schemas_exports.property(
1603
+ "serverless_connection_error",
1604
+ RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError
1605
+ )
1606
+ });
1607
+
1608
+ // src/serialization/types/RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload.ts
1609
+ var RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload = schemas_exports.object({
1610
+ message: schemas_exports.string()
1611
+ });
1612
+
1613
+ // src/serialization/types/RunnerPoolErrorServerlessInvalidPayload.ts
1614
+ var RunnerPoolErrorServerlessInvalidPayload = schemas_exports.object({
1615
+ serverlessInvalidPayload: schemas_exports.property(
1616
+ "serverless_invalid_payload",
1617
+ RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload
1618
+ )
1619
+ });
1620
+
1621
+ // src/serialization/types/RunnerPoolError.ts
1622
+ var RunnerPoolError = schemas_exports.undiscriminatedUnion([
1623
+ RunnerPoolErrorServerlessHttpError,
1624
+ schemas_exports.stringLiteral("serverless_stream_ended_early"),
1625
+ RunnerPoolErrorServerlessConnectionError,
1626
+ schemas_exports.stringLiteral("serverless_invalid_base64"),
1627
+ RunnerPoolErrorServerlessInvalidPayload,
1628
+ schemas_exports.stringLiteral("internal_error")
1629
+ ]);
1630
+
1631
+ // src/serialization/types/ActorErrorRunnerPoolError.ts
1632
+ var ActorErrorRunnerPoolError = schemas_exports.object({
1633
+ runnerPoolError: schemas_exports.property("runner_pool_error", RunnerPoolError)
1634
+ });
1635
+
1636
+ // src/serialization/types/ActorErrorRunnerNoResponseRunnerNoResponse.ts
1637
+ var ActorErrorRunnerNoResponseRunnerNoResponse = schemas_exports.object({
1638
+ runnerId: schemas_exports.property("runner_id", RivetId)
1639
+ });
1640
+
1641
+ // src/serialization/types/ActorErrorRunnerNoResponse.ts
1642
+ var ActorErrorRunnerNoResponse = schemas_exports.object({
1643
+ runnerNoResponse: schemas_exports.property("runner_no_response", ActorErrorRunnerNoResponseRunnerNoResponse)
1644
+ });
1645
+
1646
+ // src/serialization/types/ActorErrorRunnerConnectionLostRunnerConnectionLost.ts
1647
+ var ActorErrorRunnerConnectionLostRunnerConnectionLost = schemas_exports.object({
1648
+ runnerId: schemas_exports.property("runner_id", RivetId)
1649
+ });
1650
+
1651
+ // src/serialization/types/ActorErrorRunnerConnectionLost.ts
1652
+ var ActorErrorRunnerConnectionLost = schemas_exports.object({
1653
+ runnerConnectionLost: schemas_exports.property(
1654
+ "runner_connection_lost",
1655
+ ActorErrorRunnerConnectionLostRunnerConnectionLost
1656
+ )
1657
+ });
1658
+
1659
+ // src/serialization/types/ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout.ts
1660
+ var ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout = schemas_exports.object({
1661
+ runnerId: schemas_exports.property("runner_id", RivetId)
1662
+ });
1663
+
1664
+ // src/serialization/types/ActorErrorRunnerDrainingTimeout.ts
1665
+ var ActorErrorRunnerDrainingTimeout = schemas_exports.object({
1666
+ runnerDrainingTimeout: schemas_exports.property(
1667
+ "runner_draining_timeout",
1668
+ ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout
1669
+ )
1670
+ });
1671
+
1672
+ // src/serialization/types/ActorErrorCrashedCrashed.ts
1673
+ var ActorErrorCrashedCrashed = schemas_exports.object({
1674
+ message: schemas_exports.string().optional()
1675
+ });
1676
+
1677
+ // src/serialization/types/ActorErrorCrashed.ts
1678
+ var ActorErrorCrashed = schemas_exports.object({
1679
+ crashed: ActorErrorCrashedCrashed
1680
+ });
1681
+
1682
+ // src/serialization/types/ActorError.ts
1683
+ var ActorError = schemas_exports.undiscriminatedUnion([
1684
+ ActorErrorRunnerPoolError,
1685
+ schemas_exports.stringLiteral("no_capacity"),
1686
+ ActorErrorRunnerNoResponse,
1687
+ ActorErrorRunnerConnectionLost,
1688
+ ActorErrorRunnerDrainingTimeout,
1689
+ ActorErrorCrashed
1690
+ ]);
1691
+
1563
1692
  // src/serialization/types/Actor.ts
1564
1693
  var Actor = schemas_exports.object({
1565
1694
  actorId: schemas_exports.property("actor_id", RivetId),
@@ -1568,6 +1697,7 @@ var Actor = schemas_exports.object({
1568
1697
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
1569
1698
  datacenter: schemas_exports.string(),
1570
1699
  destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
1700
+ error: ActorError.optional(),
1571
1701
  key: schemas_exports.string().optional(),
1572
1702
  name: schemas_exports.string(),
1573
1703
  namespaceId: schemas_exports.property("namespace_id", RivetId),
@@ -1723,6 +1853,10 @@ var RunnerConfigServerless = schemas_exports.object({
1723
1853
  var RunnerConfig = schemas_exports.object({
1724
1854
  normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
1725
1855
  serverless: RunnerConfigServerless.optional(),
1856
+ drainOnVersionUpgrade: schemas_exports.property(
1857
+ "drain_on_version_upgrade",
1858
+ schemas_exports.boolean().optional()
1859
+ ),
1726
1860
  metadata: schemas_exports.unknown().optional()
1727
1861
  });
1728
1862
 
@@ -1750,6 +1884,11 @@ var RunnerConfigKindServerless = schemas_exports.object({
1750
1884
  // src/serialization/types/RunnerConfigKind.ts
1751
1885
  var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
1752
1886
 
1887
+ // src/serialization/types/RunnerConfigResponse.ts
1888
+ var RunnerConfigResponse = schemas_exports.object({
1889
+ runnerPoolError: schemas_exports.property("runner_pool_error", RunnerPoolError.optional())
1890
+ }).extend(RunnerConfig);
1891
+
1753
1892
  // src/serialization/types/RunnerConfigVariant.ts
1754
1893
  var RunnerConfigVariant = schemas_exports.enum_(["serverless", "normal"]);
1755
1894
 
@@ -1758,7 +1897,7 @@ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(
1758
1897
 
1759
1898
  // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
1760
1899
  var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
1761
- datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
1900
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
1762
1901
  });
1763
1902
 
1764
1903
  // src/serialization/types/RunnerConfigsListResponse.ts
@@ -1939,6 +2078,16 @@ var NamespacesCreateRequest = schemas_exports.object({
1939
2078
  // Annotate the CommonJS export names for ESM import in node:
1940
2079
  0 && (module.exports = {
1941
2080
  Actor,
2081
+ ActorError,
2082
+ ActorErrorCrashed,
2083
+ ActorErrorCrashedCrashed,
2084
+ ActorErrorRunnerConnectionLost,
2085
+ ActorErrorRunnerConnectionLostRunnerConnectionLost,
2086
+ ActorErrorRunnerDrainingTimeout,
2087
+ ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout,
2088
+ ActorErrorRunnerNoResponse,
2089
+ ActorErrorRunnerNoResponseRunnerNoResponse,
2090
+ ActorErrorRunnerPoolError,
1942
2091
  ActorName,
1943
2092
  ActorsCreateRequest,
1944
2093
  ActorsCreateResponse,
@@ -1968,6 +2117,7 @@ var NamespacesCreateRequest = schemas_exports.object({
1968
2117
  RunnerConfigKindNormal,
1969
2118
  RunnerConfigKindServerless,
1970
2119
  RunnerConfigKindServerlessServerless,
2120
+ RunnerConfigResponse,
1971
2121
  RunnerConfigServerless,
1972
2122
  RunnerConfigVariant,
1973
2123
  RunnerConfigsDeleteResponse,
@@ -1993,6 +2143,13 @@ var NamespacesCreateRequest = schemas_exports.object({
1993
2143
  RunnerConfigsServerlessMetadataErrorRequestTimedOut,
1994
2144
  RunnerConfigsUpsertRequestBody,
1995
2145
  RunnerConfigsUpsertResponse,
2146
+ RunnerPoolError,
2147
+ RunnerPoolErrorServerlessConnectionError,
2148
+ RunnerPoolErrorServerlessConnectionErrorServerlessConnectionError,
2149
+ RunnerPoolErrorServerlessHttpError,
2150
+ RunnerPoolErrorServerlessHttpErrorServerlessHttpError,
2151
+ RunnerPoolErrorServerlessInvalidPayload,
2152
+ RunnerPoolErrorServerlessInvalidPayloadServerlessInvalidPayload,
1996
2153
  RunnersListNamesResponse,
1997
2154
  RunnersListResponse,
1998
2155
  namespaces
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-api-full",
3
- "version": "2.0.33",
3
+ "version": "2.0.34-rc.2",
4
4
  "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript",
5
5
  "files": [
6
6
  "dist",
package/types/Client.d.ts CHANGED
@@ -169,18 +169,23 @@ export declare class RivetClient {
169
169
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
170
170
  *
171
171
  * @example
172
- * await client.actorsDelete("actor_id")
172
+ * await client.actorsDelete("actor_id", {
173
+ * namespace: "namespace"
174
+ * })
173
175
  */
174
- actorsDelete(actorId: Rivet.RivetId, request?: Rivet.ActorsDeleteRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsDeleteResponse>;
176
+ actorsDelete(actorId: Rivet.RivetId, request: Rivet.ActorsDeleteRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsDeleteResponse>;
175
177
  /**
176
178
  * @param {Rivet.RivetId} actorId
177
179
  * @param {string} key
180
+ * @param {Rivet.ActorsKvGetRequest} request
178
181
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
179
182
  *
180
183
  * @example
181
- * await client.actorsKvGet("actor_id", "key")
184
+ * await client.actorsKvGet("actor_id", "key", {
185
+ * namespace: "namespace"
186
+ * })
182
187
  */
183
- actorsKvGet(actorId: Rivet.RivetId, key: string, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsKvGetResponse>;
188
+ actorsKvGet(actorId: Rivet.RivetId, key: string, request: Rivet.ActorsKvGetRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsKvGetResponse>;
184
189
  /**
185
190
  * @param {Rivet.RunnerConfigsListRequest} request
186
191
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -3,8 +3,10 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * namespace: "namespace"
8
+ * }
7
9
  */
8
10
  export interface ActorsDeleteRequest {
9
- namespace?: string;
11
+ namespace: string;
10
12
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * namespace: "namespace"
8
+ * }
9
+ */
10
+ export interface ActorsKvGetRequest {
11
+ namespace: string;
12
+ }
@@ -3,6 +3,7 @@ export { type ActorsCreateRequest } from "./ActorsCreateRequest";
3
3
  export { type ActorsGetOrCreateRequest } from "./ActorsGetOrCreateRequest";
4
4
  export { type ActorsListNamesRequest } from "./ActorsListNamesRequest";
5
5
  export { type ActorsDeleteRequest } from "./ActorsDeleteRequest";
6
+ export { type ActorsKvGetRequest } from "./ActorsKvGetRequest";
6
7
  export { type RunnerConfigsListRequest } from "./RunnerConfigsListRequest";
7
8
  export { type RunnerConfigsServerlessHealthCheckRequest } from "./RunnerConfigsServerlessHealthCheckRequest";
8
9
  export { type RunnerConfigsUpsertRequestBody } from "./RunnerConfigsUpsertRequestBody";
@@ -12,6 +12,8 @@ export interface Actor {
12
12
  datacenter: string;
13
13
  /** Denotes when the actor was destroyed. */
14
14
  destroyTs?: number;
15
+ /** Error details if the actor failed to start. */
16
+ error?: Rivet.ActorError;
15
17
  key?: string;
16
18
  name: string;
17
19
  namespaceId: Rivet.RivetId;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ export type ActorError =
6
+ /**
7
+ * Runner pool-related errors */
8
+ Rivet.ActorErrorRunnerPoolError | "no_capacity"
9
+ /**
10
+ * Runner was allocated but never started the actor (GC timeout) */
11
+ | Rivet.ActorErrorRunnerNoResponse
12
+ /**
13
+ * Runner connection was lost (no recent ping, network issue, or crash) */
14
+ | Rivet.ActorErrorRunnerConnectionLost
15
+ /**
16
+ * Runner was draining but actor didn't stop in time */
17
+ | Rivet.ActorErrorRunnerDrainingTimeout
18
+ /**
19
+ * Actor exited with an error and is now sleeping */
20
+ | Rivet.ActorErrorCrashed;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ /**
6
+ * Actor exited with an error and is now sleeping
7
+ */
8
+ export interface ActorErrorCrashed {
9
+ /** Actor exited with an error and is now sleeping */
10
+ crashed: Rivet.ActorErrorCrashedCrashed;
11
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Actor exited with an error and is now sleeping
6
+ */
7
+ export interface ActorErrorCrashedCrashed {
8
+ message?: string;
9
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ /**
6
+ * Runner connection was lost (no recent ping, network issue, or crash)
7
+ */
8
+ export interface ActorErrorRunnerConnectionLost {
9
+ /** Runner connection was lost (no recent ping, network issue, or crash) */
10
+ runnerConnectionLost: Rivet.ActorErrorRunnerConnectionLostRunnerConnectionLost;
11
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ /**
6
+ * Runner connection was lost (no recent ping, network issue, or crash)
7
+ */
8
+ export interface ActorErrorRunnerConnectionLostRunnerConnectionLost {
9
+ runnerId: Rivet.RivetId;
10
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ /**
6
+ * Runner was draining but actor didn't stop in time
7
+ */
8
+ export interface ActorErrorRunnerDrainingTimeout {
9
+ /** Runner was draining but actor didn't stop in time */
10
+ runnerDrainingTimeout: Rivet.ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout;
11
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../index";
5
+ /**
6
+ * Runner was draining but actor didn't stop in time
7
+ */
8
+ export interface ActorErrorRunnerDrainingTimeoutRunnerDrainingTimeout {
9
+ runnerId: Rivet.RivetId;
10
+ }