@rivetkit/engine-api-full 0.0.0-fix-get-or-create-w.7070ab4 → 0.0.0-fix-envoy-late-frames.e9d435c
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.
- package/dist/browser/cjs/index.js +551 -890
- package/dist/browser/cjs/package.json +3 -0
- package/dist/browser/cjs/serialization.js +155 -327
- package/dist/browser/esm/index.js +551 -890
- package/dist/browser/esm/package.json +3 -0
- package/dist/browser/esm/serialization.js +155 -327
- package/dist/node/cjs/index.js +551 -890
- package/dist/node/cjs/package.json +3 -0
- package/dist/node/cjs/serialization.js +175 -364
- package/dist/node/esm/index.js +551 -890
- package/dist/node/esm/package.json +3 -0
- package/dist/node/esm/serialization.js +155 -327
- package/package.json +3 -2
- package/types/Client.d.ts +16 -83
- package/types/api/client/requests/ActorsCreateRequest.d.ts +3 -7
- package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
- package/types/api/client/requests/ActorsForkRequest.d.ts +14 -0
- package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +4 -8
- package/types/api/client/requests/ActorsGetRequest.d.ts +3 -0
- package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
- package/types/api/client/requests/ActorsListRequest.d.ts +2 -5
- package/types/api/client/requests/ActorsRescheduleRequest.d.ts +1 -5
- package/types/api/client/requests/ActorsSleepRequest.d.ts +1 -5
- package/types/api/client/requests/index.d.ts +2 -6
- package/types/api/resources/{health → authTokens}/client/Client.d.ts +6 -11
- package/types/api/resources/authTokens/client/index.d.ts +2 -0
- package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +25 -0
- package/types/api/resources/authTokens/client/requests/index.d.ts +1 -0
- package/types/api/resources/index.d.ts +4 -5
- package/types/api/resources/namespaces/client/Client.d.ts +12 -1
- package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -2
- package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +0 -6
- package/types/api/resources/pools/client/Client.d.ts +57 -0
- package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +3 -0
- package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +3 -0
- package/types/api/resources/{runners/client/requests/RunnersListNamesRequest.d.ts → pools/client/requests/PoolsListNodesRequest.d.ts} +2 -2
- package/types/api/resources/{envoys/client/requests/EnvoysListRequest.d.ts → pools/client/requests/PoolsListRequest.d.ts} +2 -4
- package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +8 -0
- package/types/api/resources/pools/client/requests/index.d.ts +5 -0
- package/types/api/types/Actor.d.ts +30 -25
- package/types/api/types/ActorName.d.ts +1 -3
- package/types/api/types/ActorsCreateResponse.d.ts +2 -3
- package/types/api/types/ActorsDeleteResponse.d.ts +1 -4
- package/types/api/types/ActorsForkResponse.d.ts +4 -0
- package/types/api/types/ActorsGetOrCreateResponse.d.ts +1 -3
- package/types/api/types/ActorsGetResponse.d.ts +4 -0
- package/types/api/types/ActorsListNamesResponse.d.ts +1 -4
- package/types/api/types/ActorsListResponse.d.ts +1 -4
- package/types/api/types/ActorsRescheduleResponse.d.ts +1 -4
- package/types/api/types/ActorsSleepResponse.d.ts +1 -4
- package/types/api/types/AuthOperationKind.d.ts +1 -0
- package/types/api/types/AuthResourceKind.d.ts +1 -0
- package/types/api/types/AuthTargetScope.d.ts +4 -0
- package/types/api/types/AuthTokenCreateResponse.d.ts +8 -0
- package/types/api/types/AuthTokenGrant.d.ts +7 -0
- package/types/api/types/AuthTokenInspectResponse.d.ts +13 -0
- package/types/api/types/Datacenter.d.ts +1 -5
- package/types/api/types/DatacentersListResponse.d.ts +1 -5
- package/types/api/types/ErrorResponse.d.ts +10 -0
- package/types/api/types/MetadataGetResponse.d.ts +8 -12
- package/types/api/types/Namespace.d.ts +13 -6
- package/types/api/types/NamespaceForkedFrom.d.ts +14 -0
- package/types/api/types/NamespaceListResponse.d.ts +1 -4
- package/types/api/types/NamespaceSkippedActor.d.ts +14 -0
- package/types/api/types/NamespaceStatus.d.ts +18 -0
- package/types/api/types/{HealthFanoutResponse.d.ts → NamespacesArchiveResponse.d.ts} +2 -2
- package/types/api/types/NamespacesCreateResponse.d.ts +0 -3
- package/types/api/types/Node.d.ts +20 -0
- package/types/api/types/Pagination.d.ts +2 -4
- package/types/api/types/Pool.d.ts +14 -0
- package/types/api/types/PoolResponse.d.ts +4 -0
- package/types/api/types/PoolsDeleteResponse.d.ts +1 -0
- package/types/api/types/PoolsListNodesResponse.d.ts +5 -0
- package/types/api/types/PoolsListResponse.d.ts +5 -0
- package/types/api/types/RivetId.d.ts +0 -3
- package/types/api/types/index.d.ts +19 -35
- package/types/serialization/client/requests/ActorsCreateRequest.d.ts +1 -4
- package/types/serialization/client/requests/ActorsForkRequest.d.ts +10 -0
- package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +2 -5
- package/types/serialization/client/requests/index.d.ts +1 -2
- package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -1
- package/types/serialization/types/Actor.d.ts +11 -17
- package/types/serialization/types/ActorName.d.ts +0 -3
- package/types/serialization/types/ActorsCreateResponse.d.ts +1 -3
- package/types/serialization/types/ActorsDeleteResponse.d.ts +1 -4
- package/types/serialization/types/ActorsForkResponse.d.ts +10 -0
- package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +0 -3
- package/types/serialization/types/ActorsGetResponse.d.ts +10 -0
- package/types/serialization/types/ActorsListNamesResponse.d.ts +0 -5
- package/types/serialization/types/ActorsListResponse.d.ts +1 -4
- package/types/serialization/types/ActorsRescheduleResponse.d.ts +1 -4
- package/types/serialization/types/ActorsSleepResponse.d.ts +1 -4
- package/types/serialization/types/AuthOperationKind.d.ts +7 -0
- package/types/serialization/types/AuthResourceKind.d.ts +7 -0
- package/types/serialization/types/AuthTargetScope.d.ts +10 -0
- package/types/serialization/types/AuthTokenCreateResponse.d.ts +11 -0
- package/types/serialization/types/AuthTokenGrant.d.ts +14 -0
- package/types/serialization/types/AuthTokenInspectResponse.d.ts +14 -0
- package/types/serialization/types/Datacenter.d.ts +0 -5
- package/types/serialization/types/DatacentersListResponse.d.ts +1 -6
- package/types/serialization/types/ErrorResponse.d.ts +12 -0
- package/types/serialization/types/MetadataGetResponse.d.ts +4 -12
- package/types/serialization/types/Namespace.d.ts +9 -7
- package/types/serialization/types/NamespaceForkedFrom.d.ts +14 -0
- package/types/serialization/types/NamespaceListResponse.d.ts +1 -4
- package/types/serialization/types/NamespaceSkippedActor.d.ts +14 -0
- package/types/serialization/types/NamespaceStatus.d.ts +10 -0
- package/types/serialization/types/NamespacesArchiveResponse.d.ts +13 -0
- package/types/serialization/types/NamespacesCreateResponse.d.ts +0 -3
- package/types/serialization/types/Node.d.ts +17 -0
- package/types/serialization/types/Pagination.d.ts +1 -4
- package/types/serialization/types/Pool.d.ts +14 -0
- package/types/serialization/types/PoolResponse.d.ts +10 -0
- package/types/serialization/types/PoolsDeleteResponse.d.ts +7 -0
- package/types/serialization/types/PoolsListNodesResponse.d.ts +12 -0
- package/types/serialization/types/PoolsListResponse.d.ts +12 -0
- package/types/serialization/types/RivetId.d.ts +0 -3
- package/types/serialization/types/index.d.ts +19 -35
- package/types/api/client/requests/ActorsKvGetRequest.d.ts +0 -12
- package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +0 -12
- package/types/api/client/requests/RunnerConfigsListRequest.d.ts +0 -21
- package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +0 -17
- package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -15
- package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -17
- package/types/api/resources/envoys/client/Client.d.ts +0 -39
- package/types/api/resources/envoys/client/requests/index.d.ts +0 -1
- package/types/api/resources/health/client/index.d.ts +0 -1
- package/types/api/resources/runners/client/Client.d.ts +0 -54
- package/types/api/resources/runners/client/index.d.ts +0 -1
- package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +0 -22
- package/types/api/resources/runners/client/requests/index.d.ts +0 -2
- package/types/api/resources/runners/index.d.ts +0 -1
- package/types/api/types/ActorsKvGetResponse.d.ts +0 -7
- package/types/api/types/ActorsRescheduleRequestBody.d.ts +0 -4
- package/types/api/types/ActorsSleepRequestBody.d.ts +0 -4
- package/types/api/types/CrashPolicy.d.ts +0 -9
- package/types/api/types/DatacenterHealth.d.ts +0 -12
- package/types/api/types/Envoy.d.ts +0 -18
- package/types/api/types/EnvoysListResponse.d.ts +0 -8
- package/types/api/types/HealthResponse.d.ts +0 -8
- package/types/api/types/HealthStatus.d.ts +0 -8
- package/types/api/types/Runner.d.ts +0 -21
- package/types/api/types/RunnerConfig.d.ts +0 -11
- package/types/api/types/RunnerConfigKind.d.ts +0 -5
- package/types/api/types/RunnerConfigKindNormal.d.ts +0 -7
- package/types/api/types/RunnerConfigKindNormalNormal.d.ts +0 -12
- package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
- package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -29
- package/types/api/types/RunnerConfigNormal.d.ts +0 -12
- package/types/api/types/RunnerConfigResponse.d.ts +0 -8
- package/types/api/types/RunnerConfigServerless.d.ts +0 -29
- package/types/api/types/RunnerConfigVariant.d.ts +0 -8
- package/types/api/types/RunnerConfigsDeleteResponse.d.ts +0 -4
- package/types/api/types/RunnerConfigsListResponse.d.ts +0 -8
- package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -7
- package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -4
- package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -4
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -5
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -7
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -7
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -7
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -6
- package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +0 -16
- package/types/api/types/RunnerConfigsUpsertResponse.d.ts +0 -6
- package/types/api/types/RunnersListNamesResponse.d.ts +0 -8
- package/types/api/types/RunnersListResponse.d.ts +0 -8
- package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +0 -13
- package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +0 -13
- package/types/serialization/types/ActorsKvGetResponse.d.ts +0 -13
- package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +0 -10
- package/types/serialization/types/ActorsSleepRequestBody.d.ts +0 -10
- package/types/serialization/types/CrashPolicy.d.ts +0 -10
- package/types/serialization/types/DatacenterHealth.d.ts +0 -19
- package/types/serialization/types/Envoy.d.ts +0 -24
- package/types/serialization/types/EnvoysListResponse.d.ts +0 -15
- package/types/serialization/types/HealthFanoutResponse.d.ts +0 -13
- package/types/serialization/types/HealthResponse.d.ts +0 -14
- package/types/serialization/types/HealthStatus.d.ts +0 -10
- package/types/serialization/types/Runner.d.ts +0 -27
- package/types/serialization/types/RunnerConfig.d.ts +0 -17
- package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
- package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -13
- package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +0 -15
- package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
- package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -25
- package/types/serialization/types/RunnerConfigNormal.d.ts +0 -15
- package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
- package/types/serialization/types/RunnerConfigServerless.d.ts +0 -25
- package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
- package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
- package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
- package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
- package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
- package/types/serialization/types/RunnersListResponse.d.ts +0 -15
- /package/types/api/resources/{envoys → authTokens}/index.d.ts +0 -0
- /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
- /package/types/api/resources/{health → pools}/index.d.ts +0 -0
|
@@ -547,53 +547,29 @@ var init_NodePre18StreamWrapper = __esm({
|
|
|
547
547
|
// src/api/index.ts
|
|
548
548
|
var api_exports = {};
|
|
549
549
|
__export(api_exports, {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
RunnerConfigVariant: () => RunnerConfigVariant,
|
|
550
|
+
NamespaceStatus: () => NamespaceStatus,
|
|
551
|
+
authTokens: () => authTokens_exports,
|
|
553
552
|
datacenters: () => datacenters_exports,
|
|
554
|
-
envoys: () => envoys_exports,
|
|
555
|
-
health: () => health_exports,
|
|
556
553
|
metadata: () => metadata_exports,
|
|
557
|
-
namespaces: () =>
|
|
558
|
-
|
|
554
|
+
namespaces: () => namespaces_exports2,
|
|
555
|
+
pools: () => pools_exports
|
|
559
556
|
});
|
|
560
557
|
|
|
561
|
-
// src/api/types/
|
|
562
|
-
var
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
558
|
+
// src/api/types/NamespaceStatus.ts
|
|
559
|
+
var NamespaceStatus = {
|
|
560
|
+
Creating: "creating",
|
|
561
|
+
Forking: "forking",
|
|
562
|
+
Live: "live",
|
|
563
|
+
Archiving: "archiving",
|
|
564
|
+
Archived: "archived",
|
|
565
|
+
Failed: "failed"
|
|
566
566
|
};
|
|
567
567
|
|
|
568
|
-
// src/api/
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
// src/api/types/RunnerConfigVariant.ts
|
|
575
|
-
var RunnerConfigVariant = {
|
|
576
|
-
Serverless: "serverless",
|
|
577
|
-
Normal: "normal"
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
// src/api/resources/datacenters/index.ts
|
|
581
|
-
var datacenters_exports = {};
|
|
582
|
-
|
|
583
|
-
// src/api/resources/envoys/index.ts
|
|
584
|
-
var envoys_exports = {};
|
|
585
|
-
|
|
586
|
-
// src/api/resources/health/index.ts
|
|
587
|
-
var health_exports = {};
|
|
588
|
-
|
|
589
|
-
// src/api/resources/metadata/index.ts
|
|
590
|
-
var metadata_exports = {};
|
|
591
|
-
|
|
592
|
-
// src/api/resources/namespaces/index.ts
|
|
593
|
-
var namespaces_exports = {};
|
|
594
|
-
|
|
595
|
-
// src/api/resources/runners/index.ts
|
|
596
|
-
var runners_exports = {};
|
|
568
|
+
// src/api/resources/authTokens/index.ts
|
|
569
|
+
var authTokens_exports = {};
|
|
570
|
+
__export(authTokens_exports, {
|
|
571
|
+
AuthTokens: () => AuthTokens
|
|
572
|
+
});
|
|
597
573
|
|
|
598
574
|
// src/core/json.ts
|
|
599
575
|
var toJson = (value, replacer, space) => {
|
|
@@ -2307,6 +2283,9 @@ function transformAndValidateUnion({
|
|
|
2307
2283
|
};
|
|
2308
2284
|
}
|
|
2309
2285
|
|
|
2286
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2287
|
+
import urlJoin from "url-join";
|
|
2288
|
+
|
|
2310
2289
|
// src/serialization/index.ts
|
|
2311
2290
|
var serialization_exports = {};
|
|
2312
2291
|
__export(serialization_exports, {
|
|
@@ -2315,84 +2294,62 @@ __export(serialization_exports, {
|
|
|
2315
2294
|
ActorsCreateRequest: () => ActorsCreateRequest,
|
|
2316
2295
|
ActorsCreateResponse: () => ActorsCreateResponse,
|
|
2317
2296
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
2297
|
+
ActorsForkRequest: () => ActorsForkRequest,
|
|
2298
|
+
ActorsForkResponse: () => ActorsForkResponse,
|
|
2318
2299
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
2319
2300
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
2320
|
-
|
|
2301
|
+
ActorsGetResponse: () => ActorsGetResponse,
|
|
2321
2302
|
ActorsListNamesResponse: () => ActorsListNamesResponse,
|
|
2322
2303
|
ActorsListResponse: () => ActorsListResponse,
|
|
2323
|
-
ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
|
|
2324
2304
|
ActorsRescheduleResponse: () => ActorsRescheduleResponse,
|
|
2325
|
-
ActorsSleepRequestBody: () => ActorsSleepRequestBody,
|
|
2326
2305
|
ActorsSleepResponse: () => ActorsSleepResponse,
|
|
2327
|
-
|
|
2306
|
+
AuthOperationKind: () => AuthOperationKind,
|
|
2307
|
+
AuthResourceKind: () => AuthResourceKind,
|
|
2308
|
+
AuthTargetScope: () => AuthTargetScope,
|
|
2309
|
+
AuthTokenCreateResponse: () => AuthTokenCreateResponse,
|
|
2310
|
+
AuthTokenGrant: () => AuthTokenGrant,
|
|
2311
|
+
AuthTokenInspectResponse: () => AuthTokenInspectResponse,
|
|
2328
2312
|
Datacenter: () => Datacenter,
|
|
2329
|
-
DatacenterHealth: () => DatacenterHealth,
|
|
2330
2313
|
DatacentersListResponse: () => DatacentersListResponse,
|
|
2331
|
-
|
|
2332
|
-
EnvoysListResponse: () => EnvoysListResponse,
|
|
2333
|
-
HealthFanoutResponse: () => HealthFanoutResponse,
|
|
2334
|
-
HealthResponse: () => HealthResponse,
|
|
2335
|
-
HealthStatus: () => HealthStatus2,
|
|
2314
|
+
ErrorResponse: () => ErrorResponse,
|
|
2336
2315
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
2337
2316
|
Namespace: () => Namespace,
|
|
2317
|
+
NamespaceForkedFrom: () => NamespaceForkedFrom,
|
|
2338
2318
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
2319
|
+
NamespaceSkippedActor: () => NamespaceSkippedActor,
|
|
2320
|
+
NamespaceStatus: () => NamespaceStatus2,
|
|
2321
|
+
NamespacesArchiveResponse: () => NamespacesArchiveResponse,
|
|
2339
2322
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
2340
2323
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
2324
|
+
Node: () => Node,
|
|
2341
2325
|
Pagination: () => Pagination,
|
|
2326
|
+
Pool: () => Pool,
|
|
2327
|
+
PoolResponse: () => PoolResponse,
|
|
2328
|
+
PoolsDeleteResponse: () => PoolsDeleteResponse,
|
|
2329
|
+
PoolsListNodesResponse: () => PoolsListNodesResponse,
|
|
2330
|
+
PoolsListResponse: () => PoolsListResponse,
|
|
2342
2331
|
RivetId: () => RivetId,
|
|
2343
|
-
|
|
2344
|
-
RunnerConfig: () => RunnerConfig,
|
|
2345
|
-
RunnerConfigKind: () => RunnerConfigKind,
|
|
2346
|
-
RunnerConfigKindNormal: () => RunnerConfigKindNormal,
|
|
2347
|
-
RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
|
|
2348
|
-
RunnerConfigKindServerless: () => RunnerConfigKindServerless,
|
|
2349
|
-
RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
|
|
2350
|
-
RunnerConfigNormal: () => RunnerConfigNormal,
|
|
2351
|
-
RunnerConfigResponse: () => RunnerConfigResponse,
|
|
2352
|
-
RunnerConfigServerless: () => RunnerConfigServerless,
|
|
2353
|
-
RunnerConfigVariant: () => RunnerConfigVariant2,
|
|
2354
|
-
RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
|
|
2355
|
-
RunnerConfigsListResponse: () => RunnerConfigsListResponse,
|
|
2356
|
-
RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
|
|
2357
|
-
RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
|
|
2358
|
-
RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
|
|
2359
|
-
RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
|
|
2360
|
-
RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
|
|
2361
|
-
RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
|
|
2362
|
-
RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
|
|
2363
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2364
|
-
RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
|
|
2365
|
-
RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
|
|
2366
|
-
RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
|
|
2367
|
-
RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
|
|
2368
|
-
RunnersListNamesResponse: () => RunnersListNamesResponse,
|
|
2369
|
-
RunnersListResponse: () => RunnersListResponse,
|
|
2370
|
-
namespaces: () => namespaces_exports2
|
|
2332
|
+
namespaces: () => namespaces_exports
|
|
2371
2333
|
});
|
|
2372
2334
|
|
|
2373
2335
|
// src/serialization/types/RivetId.ts
|
|
2374
2336
|
var RivetId = schemas_exports.string();
|
|
2375
2337
|
|
|
2376
|
-
// src/serialization/types/CrashPolicy.ts
|
|
2377
|
-
var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
|
|
2378
|
-
|
|
2379
2338
|
// src/serialization/types/Actor.ts
|
|
2380
2339
|
var Actor = schemas_exports.object({
|
|
2381
2340
|
actorId: schemas_exports.property("actor_id", RivetId),
|
|
2382
|
-
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
|
|
2383
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2384
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2385
|
-
datacenter: schemas_exports.string(),
|
|
2386
|
-
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
|
|
2387
|
-
error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2388
|
-
key: schemas_exports.string().optional(),
|
|
2389
2341
|
name: schemas_exports.string(),
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2342
|
+
key: schemas_exports.string(),
|
|
2343
|
+
namespace: schemas_exports.string(),
|
|
2344
|
+
pool: schemas_exports.string(),
|
|
2345
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2346
|
+
startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
|
|
2347
|
+
pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
|
|
2348
|
+
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
|
|
2349
|
+
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
|
|
2350
|
+
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
|
|
2351
|
+
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable()),
|
|
2352
|
+
forkedFrom: schemas_exports.property("forked_from", RivetId.nullable().optional())
|
|
2396
2353
|
});
|
|
2397
2354
|
|
|
2398
2355
|
// src/serialization/types/ActorName.ts
|
|
@@ -2402,11 +2359,17 @@ var ActorName = schemas_exports.object({
|
|
|
2402
2359
|
|
|
2403
2360
|
// src/serialization/types/ActorsCreateResponse.ts
|
|
2404
2361
|
var ActorsCreateResponse = schemas_exports.object({
|
|
2405
|
-
actor: Actor
|
|
2362
|
+
actor: Actor,
|
|
2363
|
+
created: schemas_exports.boolean()
|
|
2406
2364
|
});
|
|
2407
2365
|
|
|
2408
2366
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
2409
|
-
var ActorsDeleteResponse = schemas_exports.
|
|
2367
|
+
var ActorsDeleteResponse = schemas_exports.object({});
|
|
2368
|
+
|
|
2369
|
+
// src/serialization/types/ActorsForkResponse.ts
|
|
2370
|
+
var ActorsForkResponse = schemas_exports.object({
|
|
2371
|
+
actor: Actor
|
|
2372
|
+
});
|
|
2410
2373
|
|
|
2411
2374
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
2412
2375
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
@@ -2414,21 +2377,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
|
2414
2377
|
created: schemas_exports.boolean()
|
|
2415
2378
|
});
|
|
2416
2379
|
|
|
2417
|
-
// src/serialization/types/
|
|
2418
|
-
var
|
|
2419
|
-
|
|
2420
|
-
value: schemas_exports.string()
|
|
2421
|
-
});
|
|
2422
|
-
|
|
2423
|
-
// src/serialization/types/Pagination.ts
|
|
2424
|
-
var Pagination = schemas_exports.object({
|
|
2425
|
-
cursor: schemas_exports.string().optional()
|
|
2380
|
+
// src/serialization/types/ActorsGetResponse.ts
|
|
2381
|
+
var ActorsGetResponse = schemas_exports.object({
|
|
2382
|
+
actor: Actor
|
|
2426
2383
|
});
|
|
2427
2384
|
|
|
2428
2385
|
// src/serialization/types/ActorsListNamesResponse.ts
|
|
2429
2386
|
var ActorsListNamesResponse = schemas_exports.object({
|
|
2430
|
-
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2431
|
-
|
|
2387
|
+
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
// src/serialization/types/Pagination.ts
|
|
2391
|
+
var Pagination = schemas_exports.object({
|
|
2392
|
+
cursor: schemas_exports.string().nullable()
|
|
2432
2393
|
});
|
|
2433
2394
|
|
|
2434
2395
|
// src/serialization/types/ActorsListResponse.ts
|
|
@@ -2437,98 +2398,98 @@ var ActorsListResponse = schemas_exports.object({
|
|
|
2437
2398
|
pagination: Pagination
|
|
2438
2399
|
});
|
|
2439
2400
|
|
|
2440
|
-
// src/serialization/types/ActorsRescheduleRequestBody.ts
|
|
2441
|
-
var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2442
|
-
|
|
2443
2401
|
// src/serialization/types/ActorsRescheduleResponse.ts
|
|
2444
|
-
var ActorsRescheduleResponse = schemas_exports.
|
|
2445
|
-
|
|
2446
|
-
// src/serialization/types/ActorsSleepRequestBody.ts
|
|
2447
|
-
var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2402
|
+
var ActorsRescheduleResponse = schemas_exports.object({});
|
|
2448
2403
|
|
|
2449
2404
|
// src/serialization/types/ActorsSleepResponse.ts
|
|
2450
|
-
var ActorsSleepResponse = schemas_exports.
|
|
2405
|
+
var ActorsSleepResponse = schemas_exports.object({});
|
|
2451
2406
|
|
|
2452
|
-
// src/serialization/types/
|
|
2453
|
-
var
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2407
|
+
// src/serialization/types/AuthOperationKind.ts
|
|
2408
|
+
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete", "fork"]);
|
|
2409
|
+
|
|
2410
|
+
// src/serialization/types/AuthResourceKind.ts
|
|
2411
|
+
var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
|
|
2412
|
+
|
|
2413
|
+
// src/serialization/types/AuthTargetScope.ts
|
|
2414
|
+
var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
|
|
2415
|
+
id: RivetId
|
|
2416
|
+
})]);
|
|
2417
|
+
|
|
2418
|
+
// src/serialization/types/AuthTokenCreateResponse.ts
|
|
2419
|
+
var AuthTokenCreateResponse = schemas_exports.object({
|
|
2420
|
+
token: schemas_exports.string(),
|
|
2421
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2422
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2457
2423
|
});
|
|
2458
2424
|
|
|
2459
|
-
// src/serialization/types/
|
|
2460
|
-
var
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2425
|
+
// src/serialization/types/AuthTokenGrant.ts
|
|
2426
|
+
var AuthTokenGrant = schemas_exports.object({
|
|
2427
|
+
resource: AuthResourceKind,
|
|
2428
|
+
target: AuthTargetScope,
|
|
2429
|
+
operations: schemas_exports.list(AuthOperationKind)
|
|
2464
2430
|
});
|
|
2465
2431
|
|
|
2466
|
-
// src/serialization/types/
|
|
2467
|
-
var
|
|
2432
|
+
// src/serialization/types/AuthTokenInspectResponse.ts
|
|
2433
|
+
var AuthTokenInspectResponse = schemas_exports.object({
|
|
2434
|
+
namespace: schemas_exports.string(),
|
|
2435
|
+
subject: schemas_exports.string().nullable(),
|
|
2436
|
+
grants: schemas_exports.list(AuthTokenGrant),
|
|
2437
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2438
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2439
|
+
});
|
|
2468
2440
|
|
|
2469
|
-
// src/serialization/types/
|
|
2470
|
-
var
|
|
2471
|
-
|
|
2472
|
-
datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
|
|
2473
|
-
error: schemas_exports.string().optional(),
|
|
2474
|
-
response: HealthResponse.optional(),
|
|
2475
|
-
rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
|
|
2476
|
-
status: HealthStatus2
|
|
2441
|
+
// src/serialization/types/Datacenter.ts
|
|
2442
|
+
var Datacenter = schemas_exports.object({
|
|
2443
|
+
name: schemas_exports.string()
|
|
2477
2444
|
});
|
|
2478
2445
|
|
|
2479
2446
|
// src/serialization/types/DatacentersListResponse.ts
|
|
2480
2447
|
var DatacentersListResponse = schemas_exports.object({
|
|
2481
|
-
datacenters: schemas_exports.list(Datacenter)
|
|
2482
|
-
pagination: Pagination
|
|
2448
|
+
datacenters: schemas_exports.list(Datacenter)
|
|
2483
2449
|
});
|
|
2484
2450
|
|
|
2485
|
-
// src/serialization/types/
|
|
2486
|
-
var
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2492
|
-
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2493
|
-
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2494
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2495
|
-
poolName: schemas_exports.property("pool_name", schemas_exports.string()),
|
|
2496
|
-
slots: schemas_exports.number(),
|
|
2497
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2498
|
-
version: schemas_exports.number()
|
|
2451
|
+
// src/serialization/types/ErrorResponse.ts
|
|
2452
|
+
var ErrorResponse = schemas_exports.object({
|
|
2453
|
+
group: schemas_exports.string(),
|
|
2454
|
+
code: schemas_exports.string(),
|
|
2455
|
+
message: schemas_exports.string(),
|
|
2456
|
+
metadata: schemas_exports.unknown().optional()
|
|
2499
2457
|
});
|
|
2500
2458
|
|
|
2501
|
-
// src/serialization/types/
|
|
2502
|
-
var
|
|
2503
|
-
|
|
2504
|
-
|
|
2459
|
+
// src/serialization/types/MetadataGetResponse.ts
|
|
2460
|
+
var MetadataGetResponse = schemas_exports.object({
|
|
2461
|
+
runtime: schemas_exports.stringLiteral("engine"),
|
|
2462
|
+
version: schemas_exports.string(),
|
|
2463
|
+
envoyProtocolVersion: schemas_exports.number(),
|
|
2464
|
+
actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
|
|
2505
2465
|
});
|
|
2506
2466
|
|
|
2507
|
-
// src/serialization/types/
|
|
2508
|
-
var
|
|
2509
|
-
|
|
2467
|
+
// src/serialization/types/NamespaceStatus.ts
|
|
2468
|
+
var NamespaceStatus2 = schemas_exports.enum_(["creating", "forking", "live", "archiving", "archived", "failed"]);
|
|
2469
|
+
|
|
2470
|
+
// src/serialization/types/NamespaceForkedFrom.ts
|
|
2471
|
+
var NamespaceForkedFrom = schemas_exports.object({
|
|
2472
|
+
namespace: schemas_exports.string(),
|
|
2473
|
+
forkNumber: schemas_exports.property("fork_number", schemas_exports.number()),
|
|
2474
|
+
forkedTs: schemas_exports.property("forked_ts", schemas_exports.number())
|
|
2510
2475
|
});
|
|
2511
2476
|
|
|
2512
|
-
// src/serialization/types/
|
|
2513
|
-
var
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
|
|
2518
|
-
epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
|
|
2519
|
-
gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
|
|
2520
|
-
runtime: schemas_exports.string(),
|
|
2521
|
-
rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
|
|
2522
|
-
rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
|
|
2523
|
-
version: schemas_exports.string()
|
|
2477
|
+
// src/serialization/types/NamespaceSkippedActor.ts
|
|
2478
|
+
var NamespaceSkippedActor = schemas_exports.object({
|
|
2479
|
+
actorId: schemas_exports.property("actor_id", schemas_exports.string()),
|
|
2480
|
+
name: schemas_exports.string(),
|
|
2481
|
+
key: schemas_exports.string().nullable()
|
|
2524
2482
|
});
|
|
2525
2483
|
|
|
2526
2484
|
// src/serialization/types/Namespace.ts
|
|
2527
2485
|
var Namespace = schemas_exports.object({
|
|
2528
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2529
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2530
2486
|
name: schemas_exports.string(),
|
|
2531
|
-
|
|
2487
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2488
|
+
status: NamespaceStatus2,
|
|
2489
|
+
forkedFrom: schemas_exports.property("forked_from", NamespaceForkedFrom.nullable()),
|
|
2490
|
+
archivedTs: schemas_exports.property("archived_ts", schemas_exports.number().nullable()),
|
|
2491
|
+
skipped: schemas_exports.list(NamespaceSkippedActor).optional(),
|
|
2492
|
+
skippedCount: schemas_exports.property("skipped_count", schemas_exports.number().optional())
|
|
2532
2493
|
});
|
|
2533
2494
|
|
|
2534
2495
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -2542,244 +2503,87 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
2542
2503
|
namespace: Namespace
|
|
2543
2504
|
});
|
|
2544
2505
|
|
|
2545
|
-
// src/serialization/types/
|
|
2546
|
-
var
|
|
2547
|
-
|
|
2548
|
-
datacenter: schemas_exports.string(),
|
|
2549
|
-
drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
|
|
2550
|
-
key: schemas_exports.string(),
|
|
2551
|
-
lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
|
|
2552
|
-
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2553
|
-
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2554
|
-
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2555
|
-
name: schemas_exports.string(),
|
|
2556
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2557
|
-
remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
|
|
2558
|
-
runnerId: schemas_exports.property("runner_id", RivetId),
|
|
2559
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2560
|
-
totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
|
|
2561
|
-
version: schemas_exports.number()
|
|
2562
|
-
});
|
|
2563
|
-
|
|
2564
|
-
// src/serialization/types/RunnerConfigNormal.ts
|
|
2565
|
-
var RunnerConfigNormal = schemas_exports.object({
|
|
2566
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2567
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2568
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2569
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2570
|
-
"drain_on_version_upgrade",
|
|
2571
|
-
schemas_exports.boolean().optional()
|
|
2572
|
-
)
|
|
2573
|
-
});
|
|
2574
|
-
|
|
2575
|
-
// src/serialization/types/RunnerConfigServerless.ts
|
|
2576
|
-
var RunnerConfigServerless = schemas_exports.object({
|
|
2577
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2578
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2579
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2580
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2581
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2582
|
-
"drain_on_version_upgrade",
|
|
2583
|
-
schemas_exports.boolean().optional()
|
|
2584
|
-
),
|
|
2585
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2586
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2587
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
|
|
2588
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2589
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2590
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2591
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2592
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
|
|
2593
|
-
url: schemas_exports.string()
|
|
2594
|
-
});
|
|
2595
|
-
|
|
2596
|
-
// src/serialization/types/RunnerConfig.ts
|
|
2597
|
-
var RunnerConfig = schemas_exports.object({
|
|
2598
|
-
normal: RunnerConfigNormal.optional(),
|
|
2599
|
-
serverless: RunnerConfigServerless.optional(),
|
|
2600
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2601
|
-
"drain_on_version_upgrade",
|
|
2602
|
-
schemas_exports.boolean().optional()
|
|
2603
|
-
),
|
|
2604
|
-
metadata: schemas_exports.unknown().optional()
|
|
2605
|
-
});
|
|
2606
|
-
|
|
2607
|
-
// src/serialization/types/RunnerConfigKindNormalNormal.ts
|
|
2608
|
-
var RunnerConfigKindNormalNormal = schemas_exports.object({
|
|
2609
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2610
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2611
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2612
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2613
|
-
"drain_on_version_upgrade",
|
|
2614
|
-
schemas_exports.boolean().optional()
|
|
2615
|
-
)
|
|
2616
|
-
});
|
|
2617
|
-
|
|
2618
|
-
// src/serialization/types/RunnerConfigKindNormal.ts
|
|
2619
|
-
var RunnerConfigKindNormal = schemas_exports.object({
|
|
2620
|
-
normal: RunnerConfigKindNormalNormal
|
|
2621
|
-
});
|
|
2622
|
-
|
|
2623
|
-
// src/serialization/types/RunnerConfigKindServerlessServerless.ts
|
|
2624
|
-
var RunnerConfigKindServerlessServerless = schemas_exports.object({
|
|
2625
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2626
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2627
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2628
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2629
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2630
|
-
"drain_on_version_upgrade",
|
|
2631
|
-
schemas_exports.boolean().optional()
|
|
2632
|
-
),
|
|
2633
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2634
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2635
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
|
|
2636
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2637
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2638
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2639
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2640
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
|
|
2641
|
-
url: schemas_exports.string()
|
|
2642
|
-
});
|
|
2643
|
-
|
|
2644
|
-
// src/serialization/types/RunnerConfigKindServerless.ts
|
|
2645
|
-
var RunnerConfigKindServerless = schemas_exports.object({
|
|
2646
|
-
serverless: RunnerConfigKindServerlessServerless
|
|
2647
|
-
});
|
|
2648
|
-
|
|
2649
|
-
// src/serialization/types/RunnerConfigKind.ts
|
|
2650
|
-
var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
|
|
2651
|
-
|
|
2652
|
-
// src/serialization/types/RunnerConfigResponse.ts
|
|
2653
|
-
var RunnerConfigResponse = schemas_exports.object({
|
|
2654
|
-
protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
|
|
2655
|
-
runnerPoolError: schemas_exports.property(
|
|
2656
|
-
"runner_pool_error",
|
|
2657
|
-
schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
|
|
2658
|
-
)
|
|
2659
|
-
}).extend(RunnerConfig);
|
|
2660
|
-
|
|
2661
|
-
// src/serialization/types/RunnerConfigVariant.ts
|
|
2662
|
-
var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
|
|
2663
|
-
|
|
2664
|
-
// src/serialization/types/RunnerConfigsDeleteResponse.ts
|
|
2665
|
-
var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2666
|
-
|
|
2667
|
-
// src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
|
|
2668
|
-
var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
|
|
2669
|
-
datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
|
|
2670
|
-
});
|
|
2671
|
-
|
|
2672
|
-
// src/serialization/types/RunnerConfigsListResponse.ts
|
|
2673
|
-
var RunnerConfigsListResponse = schemas_exports.object({
|
|
2674
|
-
pagination: Pagination,
|
|
2675
|
-
runnerConfigs: schemas_exports.property(
|
|
2676
|
-
"runner_configs",
|
|
2677
|
-
schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
|
|
2678
|
-
)
|
|
2679
|
-
});
|
|
2680
|
-
|
|
2681
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
|
|
2682
|
-
var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2683
|
-
|
|
2684
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
|
|
2685
|
-
var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2686
|
-
|
|
2687
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
|
|
2688
|
-
var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
|
|
2689
|
-
version: schemas_exports.string()
|
|
2690
|
-
});
|
|
2691
|
-
|
|
2692
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
|
|
2693
|
-
var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
|
|
2694
|
-
success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
|
|
2506
|
+
// src/serialization/types/NamespacesArchiveResponse.ts
|
|
2507
|
+
var NamespacesArchiveResponse = schemas_exports.object({
|
|
2508
|
+
namespace: Namespace
|
|
2695
2509
|
});
|
|
2696
2510
|
|
|
2697
|
-
// src/serialization/types/
|
|
2698
|
-
var
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2511
|
+
// src/serialization/types/Node.ts
|
|
2512
|
+
var Node = schemas_exports.object({
|
|
2513
|
+
key: schemas_exports.string(),
|
|
2514
|
+
pool: schemas_exports.string(),
|
|
2515
|
+
namespace: schemas_exports.string(),
|
|
2516
|
+
datacenter: schemas_exports.string(),
|
|
2517
|
+
version: schemas_exports.number(),
|
|
2518
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2519
|
+
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2520
|
+
connected: schemas_exports.boolean(),
|
|
2521
|
+
stopping: schemas_exports.boolean()
|
|
2702
2522
|
});
|
|
2703
2523
|
|
|
2704
|
-
// src/serialization/types/
|
|
2705
|
-
var
|
|
2706
|
-
|
|
2524
|
+
// src/serialization/types/Pool.ts
|
|
2525
|
+
var Pool = schemas_exports.object({
|
|
2526
|
+
name: schemas_exports.string(),
|
|
2527
|
+
drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
|
|
2528
|
+
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
|
|
2529
|
+
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
|
|
2530
|
+
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
|
|
2531
|
+
metadata: schemas_exports.unknown()
|
|
2707
2532
|
});
|
|
2708
2533
|
|
|
2709
|
-
// src/serialization/types/
|
|
2710
|
-
var
|
|
2711
|
-
|
|
2534
|
+
// src/serialization/types/PoolResponse.ts
|
|
2535
|
+
var PoolResponse = schemas_exports.object({
|
|
2536
|
+
pool: Pool
|
|
2712
2537
|
});
|
|
2713
2538
|
|
|
2714
|
-
// src/serialization/types/
|
|
2715
|
-
var
|
|
2716
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2717
|
-
RunnerConfigsServerlessHealthCheckResponseFailure
|
|
2718
|
-
]);
|
|
2719
|
-
|
|
2720
|
-
// src/serialization/types/RunnerConfigsUpsertResponse.ts
|
|
2721
|
-
var RunnerConfigsUpsertResponse = schemas_exports.object({
|
|
2722
|
-
endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
|
|
2723
|
-
});
|
|
2539
|
+
// src/serialization/types/PoolsDeleteResponse.ts
|
|
2540
|
+
var PoolsDeleteResponse = schemas_exports.object({});
|
|
2724
2541
|
|
|
2725
|
-
// src/serialization/types/
|
|
2726
|
-
var
|
|
2727
|
-
|
|
2542
|
+
// src/serialization/types/PoolsListNodesResponse.ts
|
|
2543
|
+
var PoolsListNodesResponse = schemas_exports.object({
|
|
2544
|
+
nodes: schemas_exports.list(Node),
|
|
2728
2545
|
pagination: Pagination
|
|
2729
2546
|
});
|
|
2730
2547
|
|
|
2731
|
-
// src/serialization/types/
|
|
2732
|
-
var
|
|
2548
|
+
// src/serialization/types/PoolsListResponse.ts
|
|
2549
|
+
var PoolsListResponse = schemas_exports.object({
|
|
2733
2550
|
pagination: Pagination,
|
|
2734
|
-
|
|
2551
|
+
pools: schemas_exports.list(Pool)
|
|
2735
2552
|
});
|
|
2736
2553
|
|
|
2737
2554
|
// src/serialization/client/requests/ActorsCreateRequest.ts
|
|
2738
2555
|
var ActorsCreateRequest = schemas_exports.object({
|
|
2739
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2740
|
-
datacenter: schemas_exports.string().optional(),
|
|
2741
2556
|
input: schemas_exports.string().optional(),
|
|
2742
2557
|
key: schemas_exports.string().optional(),
|
|
2743
2558
|
name: schemas_exports.string(),
|
|
2744
|
-
|
|
2559
|
+
pool: schemas_exports.string().optional()
|
|
2745
2560
|
});
|
|
2746
2561
|
|
|
2747
2562
|
// src/serialization/client/requests/ActorsGetOrCreateRequest.ts
|
|
2748
2563
|
var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
2749
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2750
|
-
datacenter: schemas_exports.string().optional(),
|
|
2751
2564
|
input: schemas_exports.string().optional(),
|
|
2752
|
-
key: schemas_exports.string(),
|
|
2565
|
+
key: schemas_exports.string().optional(),
|
|
2753
2566
|
name: schemas_exports.string(),
|
|
2754
|
-
|
|
2755
|
-
});
|
|
2756
|
-
|
|
2757
|
-
// src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
|
|
2758
|
-
var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
|
|
2759
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2760
|
-
url: schemas_exports.string()
|
|
2567
|
+
pool: schemas_exports.string().optional()
|
|
2761
2568
|
});
|
|
2762
2569
|
|
|
2763
|
-
// src/serialization/client/requests/
|
|
2764
|
-
var
|
|
2765
|
-
|
|
2570
|
+
// src/serialization/client/requests/ActorsForkRequest.ts
|
|
2571
|
+
var ActorsForkRequest = schemas_exports.object({
|
|
2572
|
+
key: schemas_exports.string().optional(),
|
|
2573
|
+
input: schemas_exports.string().optional()
|
|
2766
2574
|
});
|
|
2767
2575
|
|
|
2768
2576
|
// src/serialization/resources/namespaces/index.ts
|
|
2769
|
-
var
|
|
2770
|
-
__export(
|
|
2577
|
+
var namespaces_exports = {};
|
|
2578
|
+
__export(namespaces_exports, {
|
|
2771
2579
|
NamespacesCreateRequest: () => NamespacesCreateRequest
|
|
2772
2580
|
});
|
|
2773
2581
|
|
|
2774
2582
|
// src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
|
|
2775
2583
|
var NamespacesCreateRequest = schemas_exports.object({
|
|
2776
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2777
2584
|
name: schemas_exports.string()
|
|
2778
2585
|
});
|
|
2779
2586
|
|
|
2780
|
-
// src/Client.ts
|
|
2781
|
-
import urlJoin7 from "url-join";
|
|
2782
|
-
|
|
2783
2587
|
// src/errors/RivetError.ts
|
|
2784
2588
|
var RivetError = class _RivetError extends Error {
|
|
2785
2589
|
statusCode;
|
|
@@ -2821,25 +2625,18 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
|
|
|
2821
2625
|
}
|
|
2822
2626
|
};
|
|
2823
2627
|
|
|
2824
|
-
// src/api/resources/
|
|
2825
|
-
|
|
2826
|
-
var Datacenters = class {
|
|
2628
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2629
|
+
var AuthTokens = class {
|
|
2827
2630
|
constructor(_options) {
|
|
2828
2631
|
this._options = _options;
|
|
2829
2632
|
}
|
|
2830
|
-
|
|
2831
|
-
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
2832
|
-
*
|
|
2833
|
-
* @example
|
|
2834
|
-
* await client.datacenters.list()
|
|
2835
|
-
*/
|
|
2836
|
-
async list(requestOptions) {
|
|
2633
|
+
async create(request, requestOptions) {
|
|
2837
2634
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2838
2635
|
url: urlJoin(
|
|
2839
2636
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2840
|
-
"
|
|
2637
|
+
"auth/tokens"
|
|
2841
2638
|
),
|
|
2842
|
-
method: "
|
|
2639
|
+
method: "POST",
|
|
2843
2640
|
headers: {
|
|
2844
2641
|
Authorization: await this._getAuthorizationHeader(),
|
|
2845
2642
|
"X-Fern-Language": "JavaScript",
|
|
@@ -2849,12 +2646,18 @@ var Datacenters = class {
|
|
|
2849
2646
|
},
|
|
2850
2647
|
contentType: "application/json",
|
|
2851
2648
|
requestType: "json",
|
|
2649
|
+
body: {
|
|
2650
|
+
namespace: request.namespace,
|
|
2651
|
+
duration: request.duration,
|
|
2652
|
+
subject: request.subject,
|
|
2653
|
+
grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
|
|
2654
|
+
},
|
|
2852
2655
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2853
2656
|
maxRetries: requestOptions?.maxRetries,
|
|
2854
2657
|
abortSignal: requestOptions?.abortSignal
|
|
2855
2658
|
});
|
|
2856
2659
|
if (_response.ok) {
|
|
2857
|
-
return
|
|
2660
|
+
return AuthTokenCreateResponse.parseOrThrow(_response.body, {
|
|
2858
2661
|
unrecognizedObjectKeys: "passthrough",
|
|
2859
2662
|
allowUnrecognizedUnionMembers: true,
|
|
2860
2663
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2875,57 +2678,18 @@ var Datacenters = class {
|
|
|
2875
2678
|
body: _response.error.rawBody
|
|
2876
2679
|
});
|
|
2877
2680
|
case "timeout":
|
|
2878
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
2681
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /auth/tokens.");
|
|
2879
2682
|
case "unknown":
|
|
2880
2683
|
throw new RivetError({
|
|
2881
2684
|
message: _response.error.errorMessage
|
|
2882
2685
|
});
|
|
2883
2686
|
}
|
|
2884
2687
|
}
|
|
2885
|
-
async
|
|
2886
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
2887
|
-
}
|
|
2888
|
-
};
|
|
2889
|
-
|
|
2890
|
-
// src/api/resources/envoys/client/Client.ts
|
|
2891
|
-
import urlJoin2 from "url-join";
|
|
2892
|
-
var Envoys = class {
|
|
2893
|
-
constructor(_options) {
|
|
2894
|
-
this._options = _options;
|
|
2895
|
-
}
|
|
2896
|
-
/**
|
|
2897
|
-
* @param {Rivet.EnvoysListRequest} request
|
|
2898
|
-
* @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
|
|
2899
|
-
*
|
|
2900
|
-
* @example
|
|
2901
|
-
* await client.envoys.list({
|
|
2902
|
-
* namespace: "namespace"
|
|
2903
|
-
* })
|
|
2904
|
-
*/
|
|
2905
|
-
async list(request, requestOptions) {
|
|
2906
|
-
const { namespace, name, envoyKey, limit, cursor } = request;
|
|
2907
|
-
const _queryParams = {};
|
|
2908
|
-
_queryParams["namespace"] = namespace;
|
|
2909
|
-
if (name != null) {
|
|
2910
|
-
_queryParams["name"] = name;
|
|
2911
|
-
}
|
|
2912
|
-
if (envoyKey != null) {
|
|
2913
|
-
if (Array.isArray(envoyKey)) {
|
|
2914
|
-
_queryParams["envoy_key"] = envoyKey.map((item) => item);
|
|
2915
|
-
} else {
|
|
2916
|
-
_queryParams["envoy_key"] = envoyKey;
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
if (limit != null) {
|
|
2920
|
-
_queryParams["limit"] = limit.toString();
|
|
2921
|
-
}
|
|
2922
|
-
if (cursor != null) {
|
|
2923
|
-
_queryParams["cursor"] = cursor;
|
|
2924
|
-
}
|
|
2688
|
+
async inspect(requestOptions) {
|
|
2925
2689
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2926
|
-
url:
|
|
2690
|
+
url: urlJoin(
|
|
2927
2691
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2928
|
-
"
|
|
2692
|
+
"auth/tokens/inspect"
|
|
2929
2693
|
),
|
|
2930
2694
|
method: "GET",
|
|
2931
2695
|
headers: {
|
|
@@ -2936,14 +2700,13 @@ var Envoys = class {
|
|
|
2936
2700
|
...requestOptions?.headers
|
|
2937
2701
|
},
|
|
2938
2702
|
contentType: "application/json",
|
|
2939
|
-
queryParameters: _queryParams,
|
|
2940
2703
|
requestType: "json",
|
|
2941
2704
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2942
2705
|
maxRetries: requestOptions?.maxRetries,
|
|
2943
2706
|
abortSignal: requestOptions?.abortSignal
|
|
2944
2707
|
});
|
|
2945
2708
|
if (_response.ok) {
|
|
2946
|
-
return
|
|
2709
|
+
return AuthTokenInspectResponse.parseOrThrow(_response.body, {
|
|
2947
2710
|
unrecognizedObjectKeys: "passthrough",
|
|
2948
2711
|
allowUnrecognizedUnionMembers: true,
|
|
2949
2712
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2964,7 +2727,7 @@ var Envoys = class {
|
|
|
2964
2727
|
body: _response.error.rawBody
|
|
2965
2728
|
});
|
|
2966
2729
|
case "timeout":
|
|
2967
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2730
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /auth/tokens/inspect.");
|
|
2968
2731
|
case "unknown":
|
|
2969
2732
|
throw new RivetError({
|
|
2970
2733
|
message: _response.error.errorMessage
|
|
@@ -2976,23 +2739,38 @@ var Envoys = class {
|
|
|
2976
2739
|
}
|
|
2977
2740
|
};
|
|
2978
2741
|
|
|
2979
|
-
// src/api/resources/
|
|
2980
|
-
|
|
2981
|
-
|
|
2742
|
+
// src/api/resources/datacenters/index.ts
|
|
2743
|
+
var datacenters_exports = {};
|
|
2744
|
+
|
|
2745
|
+
// src/api/resources/metadata/index.ts
|
|
2746
|
+
var metadata_exports = {};
|
|
2747
|
+
|
|
2748
|
+
// src/api/resources/namespaces/index.ts
|
|
2749
|
+
var namespaces_exports2 = {};
|
|
2750
|
+
|
|
2751
|
+
// src/api/resources/pools/index.ts
|
|
2752
|
+
var pools_exports = {};
|
|
2753
|
+
|
|
2754
|
+
// src/Client.ts
|
|
2755
|
+
import urlJoin6 from "url-join";
|
|
2756
|
+
|
|
2757
|
+
// src/api/resources/datacenters/client/Client.ts
|
|
2758
|
+
import urlJoin2 from "url-join";
|
|
2759
|
+
var Datacenters = class {
|
|
2982
2760
|
constructor(_options) {
|
|
2983
2761
|
this._options = _options;
|
|
2984
2762
|
}
|
|
2985
2763
|
/**
|
|
2986
|
-
* @param {
|
|
2764
|
+
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
2987
2765
|
*
|
|
2988
2766
|
* @example
|
|
2989
|
-
* await client.
|
|
2767
|
+
* await client.datacenters.list()
|
|
2990
2768
|
*/
|
|
2991
|
-
async
|
|
2769
|
+
async list(requestOptions) {
|
|
2992
2770
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2993
|
-
url:
|
|
2771
|
+
url: urlJoin2(
|
|
2994
2772
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2995
|
-
"
|
|
2773
|
+
"datacenters"
|
|
2996
2774
|
),
|
|
2997
2775
|
method: "GET",
|
|
2998
2776
|
headers: {
|
|
@@ -3009,7 +2787,7 @@ var Health = class {
|
|
|
3009
2787
|
abortSignal: requestOptions?.abortSignal
|
|
3010
2788
|
});
|
|
3011
2789
|
if (_response.ok) {
|
|
3012
|
-
return
|
|
2790
|
+
return DatacentersListResponse.parseOrThrow(_response.body, {
|
|
3013
2791
|
unrecognizedObjectKeys: "passthrough",
|
|
3014
2792
|
allowUnrecognizedUnionMembers: true,
|
|
3015
2793
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3030,7 +2808,7 @@ var Health = class {
|
|
|
3030
2808
|
body: _response.error.rawBody
|
|
3031
2809
|
});
|
|
3032
2810
|
case "timeout":
|
|
3033
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2811
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
|
|
3034
2812
|
case "unknown":
|
|
3035
2813
|
throw new RivetError({
|
|
3036
2814
|
message: _response.error.errorMessage
|
|
@@ -3043,7 +2821,7 @@ var Health = class {
|
|
|
3043
2821
|
};
|
|
3044
2822
|
|
|
3045
2823
|
// src/api/resources/metadata/client/Client.ts
|
|
3046
|
-
import
|
|
2824
|
+
import urlJoin3 from "url-join";
|
|
3047
2825
|
var Metadata = class {
|
|
3048
2826
|
constructor(_options) {
|
|
3049
2827
|
this._options = _options;
|
|
@@ -3056,7 +2834,7 @@ var Metadata = class {
|
|
|
3056
2834
|
*/
|
|
3057
2835
|
async get(requestOptions) {
|
|
3058
2836
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3059
|
-
url:
|
|
2837
|
+
url: urlJoin3(
|
|
3060
2838
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3061
2839
|
"metadata"
|
|
3062
2840
|
),
|
|
@@ -3109,7 +2887,7 @@ var Metadata = class {
|
|
|
3109
2887
|
};
|
|
3110
2888
|
|
|
3111
2889
|
// src/api/resources/namespaces/client/Client.ts
|
|
3112
|
-
import
|
|
2890
|
+
import urlJoin4 from "url-join";
|
|
3113
2891
|
var Namespaces = class {
|
|
3114
2892
|
constructor(_options) {
|
|
3115
2893
|
this._options = _options;
|
|
@@ -3122,7 +2900,7 @@ var Namespaces = class {
|
|
|
3122
2900
|
* await client.namespaces.list()
|
|
3123
2901
|
*/
|
|
3124
2902
|
async list(request = {}, requestOptions) {
|
|
3125
|
-
const { limit, cursor, name
|
|
2903
|
+
const { limit, cursor, name } = request;
|
|
3126
2904
|
const _queryParams = {};
|
|
3127
2905
|
if (limit != null) {
|
|
3128
2906
|
_queryParams["limit"] = limit.toString();
|
|
@@ -3133,20 +2911,8 @@ var Namespaces = class {
|
|
|
3133
2911
|
if (name != null) {
|
|
3134
2912
|
_queryParams["name"] = name;
|
|
3135
2913
|
}
|
|
3136
|
-
if (namespaceIds != null) {
|
|
3137
|
-
_queryParams["namespace_ids"] = namespaceIds;
|
|
3138
|
-
}
|
|
3139
|
-
if (namespaceId != null) {
|
|
3140
|
-
if (Array.isArray(namespaceId)) {
|
|
3141
|
-
_queryParams["namespace_id"] = namespaceId.map(
|
|
3142
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3143
|
-
);
|
|
3144
|
-
} else {
|
|
3145
|
-
_queryParams["namespace_id"] = namespaceId;
|
|
3146
|
-
}
|
|
3147
|
-
}
|
|
3148
2914
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3149
|
-
url:
|
|
2915
|
+
url: urlJoin4(
|
|
3150
2916
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3151
2917
|
"namespaces"
|
|
3152
2918
|
),
|
|
@@ -3200,13 +2966,14 @@ var Namespaces = class {
|
|
|
3200
2966
|
*
|
|
3201
2967
|
* @example
|
|
3202
2968
|
* await client.namespaces.create({
|
|
3203
|
-
* displayName: "display_name",
|
|
3204
2969
|
* name: "name"
|
|
3205
2970
|
* })
|
|
3206
2971
|
*/
|
|
3207
2972
|
async create(request, requestOptions) {
|
|
2973
|
+
const _body = request;
|
|
2974
|
+
const _queryParams = {};
|
|
3208
2975
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3209
|
-
url:
|
|
2976
|
+
url: urlJoin4(
|
|
3210
2977
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3211
2978
|
"namespaces"
|
|
3212
2979
|
),
|
|
@@ -3219,8 +2986,9 @@ var Namespaces = class {
|
|
|
3219
2986
|
...requestOptions?.headers
|
|
3220
2987
|
},
|
|
3221
2988
|
contentType: "application/json",
|
|
2989
|
+
queryParameters: _queryParams,
|
|
3222
2990
|
requestType: "json",
|
|
3223
|
-
body: NamespacesCreateRequest.jsonOrThrow(
|
|
2991
|
+
body: NamespacesCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3224
2992
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3225
2993
|
maxRetries: requestOptions?.maxRetries,
|
|
3226
2994
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3254,60 +3022,24 @@ var Namespaces = class {
|
|
|
3254
3022
|
});
|
|
3255
3023
|
}
|
|
3256
3024
|
}
|
|
3257
|
-
async _getAuthorizationHeader() {
|
|
3258
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3259
|
-
}
|
|
3260
|
-
};
|
|
3261
|
-
|
|
3262
|
-
// src/api/resources/runners/client/Client.ts
|
|
3263
|
-
import urlJoin6 from "url-join";
|
|
3264
|
-
var Runners = class {
|
|
3265
|
-
constructor(_options) {
|
|
3266
|
-
this._options = _options;
|
|
3267
|
-
}
|
|
3268
3025
|
/**
|
|
3269
|
-
*
|
|
3270
|
-
*
|
|
3026
|
+
* Archives a namespace: refuses new work for it, stops what its nodes host, then closes its
|
|
3027
|
+
* storage. Archiving is final. Answers at once with the namespace at status `archiving`, or
|
|
3028
|
+
* `archived` when it already is.
|
|
3029
|
+
*
|
|
3030
|
+
* @param {string} name - The namespace to archive.
|
|
3031
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3271
3032
|
*
|
|
3272
3033
|
* @example
|
|
3273
|
-
* await client.
|
|
3274
|
-
* namespace: "namespace"
|
|
3275
|
-
* })
|
|
3034
|
+
* await client.namespaces.archive("staging")
|
|
3276
3035
|
*/
|
|
3277
|
-
async
|
|
3278
|
-
const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
|
|
3279
|
-
const _queryParams = {};
|
|
3280
|
-
_queryParams["namespace"] = namespace;
|
|
3281
|
-
if (name != null) {
|
|
3282
|
-
_queryParams["name"] = name;
|
|
3283
|
-
}
|
|
3284
|
-
if (runnerIds != null) {
|
|
3285
|
-
_queryParams["runner_ids"] = runnerIds;
|
|
3286
|
-
}
|
|
3287
|
-
if (runnerId != null) {
|
|
3288
|
-
if (Array.isArray(runnerId)) {
|
|
3289
|
-
_queryParams["runner_id"] = runnerId.map(
|
|
3290
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3291
|
-
);
|
|
3292
|
-
} else {
|
|
3293
|
-
_queryParams["runner_id"] = runnerId;
|
|
3294
|
-
}
|
|
3295
|
-
}
|
|
3296
|
-
if (includeStopped != null) {
|
|
3297
|
-
_queryParams["include_stopped"] = includeStopped.toString();
|
|
3298
|
-
}
|
|
3299
|
-
if (limit != null) {
|
|
3300
|
-
_queryParams["limit"] = limit.toString();
|
|
3301
|
-
}
|
|
3302
|
-
if (cursor != null) {
|
|
3303
|
-
_queryParams["cursor"] = cursor;
|
|
3304
|
-
}
|
|
3036
|
+
async archive(name, requestOptions) {
|
|
3305
3037
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3306
|
-
url:
|
|
3038
|
+
url: urlJoin4(
|
|
3307
3039
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3308
|
-
|
|
3040
|
+
`namespaces/${encodeURIComponent(name)}/archive`
|
|
3309
3041
|
),
|
|
3310
|
-
method: "
|
|
3042
|
+
method: "POST",
|
|
3311
3043
|
headers: {
|
|
3312
3044
|
Authorization: await this._getAuthorizationHeader(),
|
|
3313
3045
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3316,14 +3048,13 @@ var Runners = class {
|
|
|
3316
3048
|
...requestOptions?.headers
|
|
3317
3049
|
},
|
|
3318
3050
|
contentType: "application/json",
|
|
3319
|
-
queryParameters: _queryParams,
|
|
3320
3051
|
requestType: "json",
|
|
3321
3052
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3322
3053
|
maxRetries: requestOptions?.maxRetries,
|
|
3323
3054
|
abortSignal: requestOptions?.abortSignal
|
|
3324
3055
|
});
|
|
3325
3056
|
if (_response.ok) {
|
|
3326
|
-
return
|
|
3057
|
+
return NamespacesArchiveResponse.parseOrThrow(_response.body, {
|
|
3327
3058
|
unrecognizedObjectKeys: "passthrough",
|
|
3328
3059
|
allowUnrecognizedUnionMembers: true,
|
|
3329
3060
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3344,31 +3075,40 @@ var Runners = class {
|
|
|
3344
3075
|
body: _response.error.rawBody
|
|
3345
3076
|
});
|
|
3346
3077
|
case "timeout":
|
|
3347
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3078
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
|
|
3348
3079
|
case "unknown":
|
|
3349
3080
|
throw new RivetError({
|
|
3350
3081
|
message: _response.error.errorMessage
|
|
3351
3082
|
});
|
|
3352
3083
|
}
|
|
3353
3084
|
}
|
|
3085
|
+
async _getAuthorizationHeader() {
|
|
3086
|
+
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3087
|
+
}
|
|
3088
|
+
};
|
|
3089
|
+
|
|
3090
|
+
// src/api/resources/pools/client/Client.ts
|
|
3091
|
+
import urlJoin5 from "url-join";
|
|
3092
|
+
var Pools = class {
|
|
3093
|
+
constructor(_options) {
|
|
3094
|
+
this._options = _options;
|
|
3095
|
+
}
|
|
3354
3096
|
/**
|
|
3355
|
-
*
|
|
3097
|
+
* Lists the namespace's pools by name. Changes apply on each node's next connection.
|
|
3356
3098
|
*
|
|
3357
|
-
*
|
|
3358
|
-
* -
|
|
3359
|
-
*
|
|
3360
|
-
* @param {Rivet.RunnersListNamesRequest} request
|
|
3361
|
-
* @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
|
|
3099
|
+
* @param {Rivet.PoolsListRequest} request
|
|
3100
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3362
3101
|
*
|
|
3363
3102
|
* @example
|
|
3364
|
-
* await client.
|
|
3103
|
+
* await client.pools.list({
|
|
3365
3104
|
* namespace: "namespace"
|
|
3366
3105
|
* })
|
|
3367
3106
|
*/
|
|
3368
|
-
async
|
|
3107
|
+
async list(request, requestOptions) {
|
|
3369
3108
|
const { namespace, limit, cursor } = request;
|
|
3370
3109
|
const _queryParams = {};
|
|
3371
|
-
|
|
3110
|
+
if (namespace != null)
|
|
3111
|
+
_queryParams["namespace"] = namespace;
|
|
3372
3112
|
if (limit != null) {
|
|
3373
3113
|
_queryParams["limit"] = limit.toString();
|
|
3374
3114
|
}
|
|
@@ -3376,9 +3116,9 @@ var Runners = class {
|
|
|
3376
3116
|
_queryParams["cursor"] = cursor;
|
|
3377
3117
|
}
|
|
3378
3118
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3379
|
-
url:
|
|
3119
|
+
url: urlJoin5(
|
|
3380
3120
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3381
|
-
"
|
|
3121
|
+
"pools"
|
|
3382
3122
|
),
|
|
3383
3123
|
method: "GET",
|
|
3384
3124
|
headers: {
|
|
@@ -3396,7 +3136,7 @@ var Runners = class {
|
|
|
3396
3136
|
abortSignal: requestOptions?.abortSignal
|
|
3397
3137
|
});
|
|
3398
3138
|
if (_response.ok) {
|
|
3399
|
-
return
|
|
3139
|
+
return PoolsListResponse.parseOrThrow(_response.body, {
|
|
3400
3140
|
unrecognizedObjectKeys: "passthrough",
|
|
3401
3141
|
allowUnrecognizedUnionMembers: true,
|
|
3402
3142
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3417,104 +3157,30 @@ var Runners = class {
|
|
|
3417
3157
|
body: _response.error.rawBody
|
|
3418
3158
|
});
|
|
3419
3159
|
case "timeout":
|
|
3420
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3160
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
|
|
3421
3161
|
case "unknown":
|
|
3422
3162
|
throw new RivetError({
|
|
3423
3163
|
message: _response.error.errorMessage
|
|
3424
3164
|
});
|
|
3425
3165
|
}
|
|
3426
3166
|
}
|
|
3427
|
-
async _getAuthorizationHeader() {
|
|
3428
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3429
|
-
}
|
|
3430
|
-
};
|
|
3431
|
-
|
|
3432
|
-
// src/Client.ts
|
|
3433
|
-
var RivetClient = class {
|
|
3434
|
-
constructor(_options) {
|
|
3435
|
-
this._options = _options;
|
|
3436
|
-
}
|
|
3437
|
-
_datacenters;
|
|
3438
|
-
_envoys;
|
|
3439
|
-
_health;
|
|
3440
|
-
_metadata;
|
|
3441
|
-
_namespaces;
|
|
3442
|
-
_runners;
|
|
3443
|
-
get datacenters() {
|
|
3444
|
-
return this._datacenters ??= new Datacenters(this._options);
|
|
3445
|
-
}
|
|
3446
|
-
get envoys() {
|
|
3447
|
-
return this._envoys ??= new Envoys(this._options);
|
|
3448
|
-
}
|
|
3449
|
-
get health() {
|
|
3450
|
-
return this._health ??= new Health(this._options);
|
|
3451
|
-
}
|
|
3452
|
-
get metadata() {
|
|
3453
|
-
return this._metadata ??= new Metadata(this._options);
|
|
3454
|
-
}
|
|
3455
|
-
get namespaces() {
|
|
3456
|
-
return this._namespaces ??= new Namespaces(this._options);
|
|
3457
|
-
}
|
|
3458
|
-
get runners() {
|
|
3459
|
-
return this._runners ??= new Runners(this._options);
|
|
3460
|
-
}
|
|
3461
3167
|
/**
|
|
3462
|
-
*
|
|
3463
|
-
*
|
|
3464
|
-
* 2 round trips:
|
|
3465
|
-
*
|
|
3466
|
-
* - namespace::ops::resolve_for_name_global
|
|
3467
|
-
* - GET /actors (multiple DCs based on actor IDs)
|
|
3468
|
-
*
|
|
3469
|
-
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3470
|
-
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3471
|
-
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3472
|
-
*
|
|
3473
|
-
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3474
|
-
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3168
|
+
* Lists the live nodes of a pool in node key order.
|
|
3475
3169
|
*
|
|
3476
|
-
*
|
|
3477
|
-
*
|
|
3478
|
-
*
|
|
3479
|
-
*
|
|
3480
|
-
* - namespace::ops::resolve_for_name_global
|
|
3481
|
-
* - GET /actors (fanout)
|
|
3482
|
-
*
|
|
3483
|
-
* ## Optimized Alternative Routes
|
|
3484
|
-
*
|
|
3485
|
-
* @param {Rivet.ActorsListRequest} request
|
|
3486
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3170
|
+
* @param {string} pool
|
|
3171
|
+
* @param {Rivet.PoolsListNodesRequest} request
|
|
3172
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3487
3173
|
*
|
|
3488
3174
|
* @example
|
|
3489
|
-
* await client.
|
|
3175
|
+
* await client.pools.listNodes("pool", {
|
|
3490
3176
|
* namespace: "namespace"
|
|
3491
3177
|
* })
|
|
3492
3178
|
*/
|
|
3493
|
-
async
|
|
3494
|
-
const { namespace,
|
|
3179
|
+
async listNodes(pool, request, requestOptions) {
|
|
3180
|
+
const { namespace, limit, cursor } = request;
|
|
3495
3181
|
const _queryParams = {};
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
_queryParams["name"] = name;
|
|
3499
|
-
}
|
|
3500
|
-
if (key != null) {
|
|
3501
|
-
_queryParams["key"] = key;
|
|
3502
|
-
}
|
|
3503
|
-
if (actorIds != null) {
|
|
3504
|
-
_queryParams["actor_ids"] = actorIds;
|
|
3505
|
-
}
|
|
3506
|
-
if (actorId != null) {
|
|
3507
|
-
if (Array.isArray(actorId)) {
|
|
3508
|
-
_queryParams["actor_id"] = actorId.map(
|
|
3509
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3510
|
-
);
|
|
3511
|
-
} else {
|
|
3512
|
-
_queryParams["actor_id"] = actorId;
|
|
3513
|
-
}
|
|
3514
|
-
}
|
|
3515
|
-
if (includeDestroyed != null) {
|
|
3516
|
-
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3517
|
-
}
|
|
3182
|
+
if (namespace != null)
|
|
3183
|
+
_queryParams["namespace"] = namespace;
|
|
3518
3184
|
if (limit != null) {
|
|
3519
3185
|
_queryParams["limit"] = limit.toString();
|
|
3520
3186
|
}
|
|
@@ -3522,9 +3188,9 @@ var RivetClient = class {
|
|
|
3522
3188
|
_queryParams["cursor"] = cursor;
|
|
3523
3189
|
}
|
|
3524
3190
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3525
|
-
url:
|
|
3191
|
+
url: urlJoin5(
|
|
3526
3192
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3527
|
-
|
|
3193
|
+
`pools/${encodeURIComponent(pool)}/nodes`
|
|
3528
3194
|
),
|
|
3529
3195
|
method: "GET",
|
|
3530
3196
|
headers: {
|
|
@@ -3542,7 +3208,7 @@ var RivetClient = class {
|
|
|
3542
3208
|
abortSignal: requestOptions?.abortSignal
|
|
3543
3209
|
});
|
|
3544
3210
|
if (_response.ok) {
|
|
3545
|
-
return
|
|
3211
|
+
return PoolsListNodesResponse.parseOrThrow(_response.body, {
|
|
3546
3212
|
unrecognizedObjectKeys: "passthrough",
|
|
3547
3213
|
allowUnrecognizedUnionMembers: true,
|
|
3548
3214
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3563,52 +3229,23 @@ var RivetClient = class {
|
|
|
3563
3229
|
body: _response.error.rawBody
|
|
3564
3230
|
});
|
|
3565
3231
|
case "timeout":
|
|
3566
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3232
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
|
|
3567
3233
|
case "unknown":
|
|
3568
3234
|
throw new RivetError({
|
|
3569
3235
|
message: _response.error.errorMessage
|
|
3570
3236
|
});
|
|
3571
3237
|
}
|
|
3572
3238
|
}
|
|
3573
|
-
|
|
3574
|
-
* **If actor is created in the current datacenter:**
|
|
3575
|
-
*
|
|
3576
|
-
* 2 round trips:
|
|
3577
|
-
*
|
|
3578
|
-
* - namespace::ops::resolve_for_name_global
|
|
3579
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3580
|
-
*
|
|
3581
|
-
* **If actor is created in a different datacenter:**
|
|
3582
|
-
*
|
|
3583
|
-
* 3 round trips:
|
|
3584
|
-
*
|
|
3585
|
-
* - namespace::ops::resolve_for_name_global
|
|
3586
|
-
* - POST /actors to remote datacenter
|
|
3587
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3588
|
-
*
|
|
3589
|
-
* actor::get will always be in the same datacenter.
|
|
3590
|
-
*
|
|
3591
|
-
* @param {Rivet.ActorsCreateRequest} request
|
|
3592
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3593
|
-
*
|
|
3594
|
-
* @example
|
|
3595
|
-
* await client.actorsCreate({
|
|
3596
|
-
* namespace: "namespace",
|
|
3597
|
-
* crashPolicy: "restart",
|
|
3598
|
-
* name: "name",
|
|
3599
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3600
|
-
* })
|
|
3601
|
-
*/
|
|
3602
|
-
async actorsCreate(request, requestOptions) {
|
|
3603
|
-
const { namespace, ..._body } = request;
|
|
3239
|
+
async get(name, request = {}, requestOptions) {
|
|
3604
3240
|
const _queryParams = {};
|
|
3605
|
-
|
|
3241
|
+
if (request.namespace != null)
|
|
3242
|
+
_queryParams["namespace"] = request.namespace;
|
|
3606
3243
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3607
|
-
url:
|
|
3244
|
+
url: urlJoin5(
|
|
3608
3245
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3609
|
-
|
|
3246
|
+
`pools/${encodeURIComponent(name)}`
|
|
3610
3247
|
),
|
|
3611
|
-
method: "
|
|
3248
|
+
method: "GET",
|
|
3612
3249
|
headers: {
|
|
3613
3250
|
Authorization: await this._getAuthorizationHeader(),
|
|
3614
3251
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3619,13 +3256,12 @@ var RivetClient = class {
|
|
|
3619
3256
|
contentType: "application/json",
|
|
3620
3257
|
queryParameters: _queryParams,
|
|
3621
3258
|
requestType: "json",
|
|
3622
|
-
body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3623
3259
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3624
3260
|
maxRetries: requestOptions?.maxRetries,
|
|
3625
3261
|
abortSignal: requestOptions?.abortSignal
|
|
3626
3262
|
});
|
|
3627
3263
|
if (_response.ok) {
|
|
3628
|
-
return
|
|
3264
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3629
3265
|
unrecognizedObjectKeys: "passthrough",
|
|
3630
3266
|
allowUnrecognizedUnionMembers: true,
|
|
3631
3267
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3646,60 +3282,21 @@ var RivetClient = class {
|
|
|
3646
3282
|
body: _response.error.rawBody
|
|
3647
3283
|
});
|
|
3648
3284
|
case "timeout":
|
|
3649
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3285
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
|
|
3650
3286
|
case "unknown":
|
|
3651
3287
|
throw new RivetError({
|
|
3652
3288
|
message: _response.error.errorMessage
|
|
3653
3289
|
});
|
|
3654
3290
|
}
|
|
3655
3291
|
}
|
|
3656
|
-
|
|
3657
|
-
* **If actor exists**
|
|
3658
|
-
*
|
|
3659
|
-
* 2 round trips:
|
|
3660
|
-
*
|
|
3661
|
-
* - namespace::ops::resolve_for_name_global
|
|
3662
|
-
* - GET /actors/{}
|
|
3663
|
-
*
|
|
3664
|
-
* **If actor does not exist and is created in the current datacenter:**
|
|
3665
|
-
*
|
|
3666
|
-
* 2 round trips:
|
|
3667
|
-
*
|
|
3668
|
-
* - namespace::ops::resolve_for_name_global
|
|
3669
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3670
|
-
*
|
|
3671
|
-
* **If actor does not exist and is created in a different datacenter:**
|
|
3672
|
-
*
|
|
3673
|
-
* 3 round trips:
|
|
3674
|
-
*
|
|
3675
|
-
* - namespace::ops::resolve_for_name_global
|
|
3676
|
-
* - POST /actors to remote datacenter
|
|
3677
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3678
|
-
*
|
|
3679
|
-
* actor::get will always be in the same datacenter.
|
|
3680
|
-
*
|
|
3681
|
-
* ## Optimized Alternative Routes
|
|
3682
|
-
*
|
|
3683
|
-
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
3684
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3685
|
-
*
|
|
3686
|
-
* @example
|
|
3687
|
-
* await client.actorsGetOrCreate({
|
|
3688
|
-
* namespace: "namespace",
|
|
3689
|
-
* crashPolicy: "restart",
|
|
3690
|
-
* key: "key",
|
|
3691
|
-
* name: "name",
|
|
3692
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3693
|
-
* })
|
|
3694
|
-
*/
|
|
3695
|
-
async actorsGetOrCreate(request, requestOptions) {
|
|
3696
|
-
const { namespace, ..._body } = request;
|
|
3292
|
+
async upsert(name, request, requestOptions) {
|
|
3697
3293
|
const _queryParams = {};
|
|
3698
|
-
|
|
3294
|
+
if (request.namespace != null)
|
|
3295
|
+
_queryParams["namespace"] = request.namespace;
|
|
3699
3296
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3700
|
-
url:
|
|
3297
|
+
url: urlJoin5(
|
|
3701
3298
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3702
|
-
|
|
3299
|
+
`pools/${encodeURIComponent(name)}`
|
|
3703
3300
|
),
|
|
3704
3301
|
method: "PUT",
|
|
3705
3302
|
headers: {
|
|
@@ -3712,13 +3309,19 @@ var RivetClient = class {
|
|
|
3712
3309
|
contentType: "application/json",
|
|
3713
3310
|
queryParameters: _queryParams,
|
|
3714
3311
|
requestType: "json",
|
|
3715
|
-
body:
|
|
3312
|
+
body: {
|
|
3313
|
+
drain_on_version_upgrade: request.drainOnVersionUpgrade,
|
|
3314
|
+
actor_eviction_delay: request.actorEvictionDelay,
|
|
3315
|
+
actor_eviction_period: request.actorEvictionPeriod,
|
|
3316
|
+
actor_eviction_rate: request.actorEvictionRate,
|
|
3317
|
+
metadata: request.metadata
|
|
3318
|
+
},
|
|
3716
3319
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3717
3320
|
maxRetries: requestOptions?.maxRetries,
|
|
3718
3321
|
abortSignal: requestOptions?.abortSignal
|
|
3719
3322
|
});
|
|
3720
3323
|
if (_response.ok) {
|
|
3721
|
-
return
|
|
3324
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3722
3325
|
unrecognizedObjectKeys: "passthrough",
|
|
3723
3326
|
allowUnrecognizedUnionMembers: true,
|
|
3724
3327
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3739,43 +3342,23 @@ var RivetClient = class {
|
|
|
3739
3342
|
body: _response.error.rawBody
|
|
3740
3343
|
});
|
|
3741
3344
|
case "timeout":
|
|
3742
|
-
throw new RivetTimeoutError("Timeout exceeded when calling PUT /
|
|
3345
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
|
|
3743
3346
|
case "unknown":
|
|
3744
3347
|
throw new RivetError({
|
|
3745
3348
|
message: _response.error.errorMessage
|
|
3746
3349
|
});
|
|
3747
3350
|
}
|
|
3748
3351
|
}
|
|
3749
|
-
|
|
3750
|
-
* 2 round trips:
|
|
3751
|
-
*
|
|
3752
|
-
* - GET /actors/names (fanout)
|
|
3753
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3754
|
-
*
|
|
3755
|
-
* @param {Rivet.ActorsListNamesRequest} request
|
|
3756
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3757
|
-
*
|
|
3758
|
-
* @example
|
|
3759
|
-
* await client.actorsListNames({
|
|
3760
|
-
* namespace: "namespace"
|
|
3761
|
-
* })
|
|
3762
|
-
*/
|
|
3763
|
-
async actorsListNames(request, requestOptions) {
|
|
3764
|
-
const { namespace, limit, cursor } = request;
|
|
3352
|
+
async delete(name, request = {}, requestOptions) {
|
|
3765
3353
|
const _queryParams = {};
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
_queryParams["limit"] = limit.toString();
|
|
3769
|
-
}
|
|
3770
|
-
if (cursor != null) {
|
|
3771
|
-
_queryParams["cursor"] = cursor;
|
|
3772
|
-
}
|
|
3354
|
+
if (request.namespace != null)
|
|
3355
|
+
_queryParams["namespace"] = request.namespace;
|
|
3773
3356
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3774
|
-
url:
|
|
3357
|
+
url: urlJoin5(
|
|
3775
3358
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3776
|
-
|
|
3359
|
+
`pools/${encodeURIComponent(name)}`
|
|
3777
3360
|
),
|
|
3778
|
-
method: "
|
|
3361
|
+
method: "DELETE",
|
|
3779
3362
|
headers: {
|
|
3780
3363
|
Authorization: await this._getAuthorizationHeader(),
|
|
3781
3364
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3791,13 +3374,7 @@ var RivetClient = class {
|
|
|
3791
3374
|
abortSignal: requestOptions?.abortSignal
|
|
3792
3375
|
});
|
|
3793
3376
|
if (_response.ok) {
|
|
3794
|
-
return
|
|
3795
|
-
unrecognizedObjectKeys: "passthrough",
|
|
3796
|
-
allowUnrecognizedUnionMembers: true,
|
|
3797
|
-
allowUnrecognizedEnumValues: true,
|
|
3798
|
-
skipValidation: true,
|
|
3799
|
-
breadcrumbsPrefix: ["response"]
|
|
3800
|
-
});
|
|
3377
|
+
return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
|
|
3801
3378
|
}
|
|
3802
3379
|
if (_response.error.reason === "status-code") {
|
|
3803
3380
|
throw new RivetError({
|
|
@@ -3812,38 +3389,106 @@ var RivetClient = class {
|
|
|
3812
3389
|
body: _response.error.rawBody
|
|
3813
3390
|
});
|
|
3814
3391
|
case "timeout":
|
|
3815
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3392
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
|
|
3816
3393
|
case "unknown":
|
|
3817
3394
|
throw new RivetError({
|
|
3818
3395
|
message: _response.error.errorMessage
|
|
3819
3396
|
});
|
|
3820
3397
|
}
|
|
3821
3398
|
}
|
|
3399
|
+
async _getAuthorizationHeader() {
|
|
3400
|
+
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3401
|
+
}
|
|
3402
|
+
};
|
|
3403
|
+
|
|
3404
|
+
// src/Client.ts
|
|
3405
|
+
var RivetClient = class {
|
|
3406
|
+
constructor(_options) {
|
|
3407
|
+
this._options = _options;
|
|
3408
|
+
}
|
|
3409
|
+
_authTokens;
|
|
3410
|
+
_datacenters;
|
|
3411
|
+
_metadata;
|
|
3412
|
+
_namespaces;
|
|
3413
|
+
_pools;
|
|
3414
|
+
get authTokens() {
|
|
3415
|
+
return this._authTokens ??= new AuthTokens(this._options);
|
|
3416
|
+
}
|
|
3417
|
+
get datacenters() {
|
|
3418
|
+
return this._datacenters ??= new Datacenters(this._options);
|
|
3419
|
+
}
|
|
3420
|
+
get metadata() {
|
|
3421
|
+
return this._metadata ??= new Metadata(this._options);
|
|
3422
|
+
}
|
|
3423
|
+
get namespaces() {
|
|
3424
|
+
return this._namespaces ??= new Namespaces(this._options);
|
|
3425
|
+
}
|
|
3426
|
+
get pools() {
|
|
3427
|
+
return this._pools ??= new Pools(this._options);
|
|
3428
|
+
}
|
|
3822
3429
|
/**
|
|
3823
|
-
*
|
|
3430
|
+
* **If key is some & `include_destroyed` is false**
|
|
3824
3431
|
*
|
|
3825
|
-
*
|
|
3826
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3432
|
+
* 2 round trips:
|
|
3827
3433
|
*
|
|
3828
|
-
*
|
|
3829
|
-
*
|
|
3434
|
+
* - namespace::ops::resolve_for_name_global
|
|
3435
|
+
* - GET /actors (multiple DCs based on actor IDs)
|
|
3436
|
+
*
|
|
3437
|
+
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3438
|
+
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3439
|
+
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3440
|
+
*
|
|
3441
|
+
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3442
|
+
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3443
|
+
*
|
|
3444
|
+
* **Otherwise**
|
|
3445
|
+
*
|
|
3446
|
+
* 2 round trips:
|
|
3447
|
+
*
|
|
3448
|
+
* - namespace::ops::resolve_for_name_global
|
|
3449
|
+
* - GET /actors (fanout)
|
|
3450
|
+
*
|
|
3451
|
+
* ## Optimized Alternative Routes
|
|
3452
|
+
*
|
|
3453
|
+
* @param {Rivet.ActorsListRequest} request
|
|
3830
3454
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3831
3455
|
*
|
|
3832
3456
|
* @example
|
|
3833
|
-
* await client.
|
|
3457
|
+
* await client.actorsList({
|
|
3834
3458
|
* namespace: "namespace"
|
|
3835
3459
|
* })
|
|
3836
3460
|
*/
|
|
3837
|
-
async
|
|
3838
|
-
const { namespace } = request;
|
|
3461
|
+
async actorsList(request, requestOptions) {
|
|
3462
|
+
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3839
3463
|
const _queryParams = {};
|
|
3840
|
-
|
|
3464
|
+
if (namespace != null)
|
|
3465
|
+
_queryParams["namespace"] = namespace;
|
|
3466
|
+
if (name != null) {
|
|
3467
|
+
_queryParams["name"] = name;
|
|
3468
|
+
}
|
|
3469
|
+
if (key != null) {
|
|
3470
|
+
_queryParams["key"] = key;
|
|
3471
|
+
}
|
|
3472
|
+
if (actorIds != null) {
|
|
3473
|
+
_queryParams["actor_ids"] = actorIds;
|
|
3474
|
+
}
|
|
3475
|
+
if (actorId != null)
|
|
3476
|
+
_queryParams["actor_id"] = actorId;
|
|
3477
|
+
if (includeDestroyed != null) {
|
|
3478
|
+
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3479
|
+
}
|
|
3480
|
+
if (limit != null) {
|
|
3481
|
+
_queryParams["limit"] = limit.toString();
|
|
3482
|
+
}
|
|
3483
|
+
if (cursor != null) {
|
|
3484
|
+
_queryParams["cursor"] = cursor;
|
|
3485
|
+
}
|
|
3841
3486
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3842
|
-
url:
|
|
3487
|
+
url: urlJoin6(
|
|
3843
3488
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3844
|
-
|
|
3489
|
+
"actors"
|
|
3845
3490
|
),
|
|
3846
|
-
method: "
|
|
3491
|
+
method: "GET",
|
|
3847
3492
|
headers: {
|
|
3848
3493
|
Authorization: await this._getAuthorizationHeader(),
|
|
3849
3494
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3859,7 +3504,7 @@ var RivetClient = class {
|
|
|
3859
3504
|
abortSignal: requestOptions?.abortSignal
|
|
3860
3505
|
});
|
|
3861
3506
|
if (_response.ok) {
|
|
3862
|
-
return
|
|
3507
|
+
return ActorsListResponse.parseOrThrow(_response.body, {
|
|
3863
3508
|
unrecognizedObjectKeys: "passthrough",
|
|
3864
3509
|
allowUnrecognizedUnionMembers: true,
|
|
3865
3510
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3880,7 +3525,7 @@ var RivetClient = class {
|
|
|
3880
3525
|
body: _response.error.rawBody
|
|
3881
3526
|
});
|
|
3882
3527
|
case "timeout":
|
|
3883
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3528
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
|
|
3884
3529
|
case "unknown":
|
|
3885
3530
|
throw new RivetError({
|
|
3886
3531
|
message: _response.error.errorMessage
|
|
@@ -3888,26 +3533,44 @@ var RivetClient = class {
|
|
|
3888
3533
|
}
|
|
3889
3534
|
}
|
|
3890
3535
|
/**
|
|
3891
|
-
*
|
|
3892
|
-
*
|
|
3893
|
-
*
|
|
3536
|
+
* **If actor is created in the current datacenter:**
|
|
3537
|
+
*
|
|
3538
|
+
* 2 round trips:
|
|
3539
|
+
*
|
|
3540
|
+
* - namespace::ops::resolve_for_name_global
|
|
3541
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3542
|
+
*
|
|
3543
|
+
* **If actor is created in a different datacenter:**
|
|
3544
|
+
*
|
|
3545
|
+
* 3 round trips:
|
|
3546
|
+
*
|
|
3547
|
+
* - namespace::ops::resolve_for_name_global
|
|
3548
|
+
* - POST /actors to remote datacenter
|
|
3549
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3550
|
+
*
|
|
3551
|
+
* actor::get will always be in the same datacenter.
|
|
3552
|
+
*
|
|
3553
|
+
* @param {Rivet.ActorsCreateRequest} request
|
|
3894
3554
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3895
3555
|
*
|
|
3896
3556
|
* @example
|
|
3897
|
-
* await client.
|
|
3898
|
-
* namespace: "namespace"
|
|
3557
|
+
* await client.actorsCreate({
|
|
3558
|
+
* namespace: "namespace",
|
|
3559
|
+
* name: "name",
|
|
3560
|
+
* pool: "pool"
|
|
3899
3561
|
* })
|
|
3900
3562
|
*/
|
|
3901
|
-
async
|
|
3902
|
-
const { namespace } = request;
|
|
3563
|
+
async actorsCreate(request, requestOptions) {
|
|
3564
|
+
const { namespace, ..._body } = request;
|
|
3903
3565
|
const _queryParams = {};
|
|
3904
|
-
|
|
3566
|
+
if (namespace != null)
|
|
3567
|
+
_queryParams["namespace"] = namespace;
|
|
3905
3568
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3906
|
-
url:
|
|
3569
|
+
url: urlJoin6(
|
|
3907
3570
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3908
|
-
|
|
3571
|
+
"actors"
|
|
3909
3572
|
),
|
|
3910
|
-
method: "
|
|
3573
|
+
method: "POST",
|
|
3911
3574
|
headers: {
|
|
3912
3575
|
Authorization: await this._getAuthorizationHeader(),
|
|
3913
3576
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3918,12 +3581,13 @@ var RivetClient = class {
|
|
|
3918
3581
|
contentType: "application/json",
|
|
3919
3582
|
queryParameters: _queryParams,
|
|
3920
3583
|
requestType: "json",
|
|
3584
|
+
body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3921
3585
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3922
3586
|
maxRetries: requestOptions?.maxRetries,
|
|
3923
3587
|
abortSignal: requestOptions?.abortSignal
|
|
3924
3588
|
});
|
|
3925
3589
|
if (_response.ok) {
|
|
3926
|
-
return
|
|
3590
|
+
return ActorsCreateResponse.parseOrThrow(_response.body, {
|
|
3927
3591
|
unrecognizedObjectKeys: "passthrough",
|
|
3928
3592
|
allowUnrecognizedUnionMembers: true,
|
|
3929
3593
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3944,9 +3608,7 @@ var RivetClient = class {
|
|
|
3944
3608
|
body: _response.error.rawBody
|
|
3945
3609
|
});
|
|
3946
3610
|
case "timeout":
|
|
3947
|
-
throw new RivetTimeoutError(
|
|
3948
|
-
"Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
|
|
3949
|
-
);
|
|
3611
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
|
|
3950
3612
|
case "unknown":
|
|
3951
3613
|
throw new RivetError({
|
|
3952
3614
|
message: _response.error.errorMessage
|
|
@@ -3954,28 +3616,54 @@ var RivetClient = class {
|
|
|
3954
3616
|
}
|
|
3955
3617
|
}
|
|
3956
3618
|
/**
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3619
|
+
* **If actor exists**
|
|
3620
|
+
*
|
|
3621
|
+
* 2 round trips:
|
|
3622
|
+
*
|
|
3623
|
+
* - namespace::ops::resolve_for_name_global
|
|
3624
|
+
* - GET /actors/{}
|
|
3625
|
+
*
|
|
3626
|
+
* **If actor does not exist and is created in the current datacenter:**
|
|
3627
|
+
*
|
|
3628
|
+
* 2 round trips:
|
|
3629
|
+
*
|
|
3630
|
+
* - namespace::ops::resolve_for_name_global
|
|
3631
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3632
|
+
*
|
|
3633
|
+
* **If actor does not exist and is created in a different datacenter:**
|
|
3634
|
+
*
|
|
3635
|
+
* 3 round trips:
|
|
3636
|
+
*
|
|
3637
|
+
* - namespace::ops::resolve_for_name_global
|
|
3638
|
+
* - POST /actors to remote datacenter
|
|
3639
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3640
|
+
*
|
|
3641
|
+
* actor::get will always be in the same datacenter.
|
|
3642
|
+
*
|
|
3643
|
+
* ## Optimized Alternative Routes
|
|
3644
|
+
*
|
|
3645
|
+
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
3959
3646
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3960
3647
|
*
|
|
3961
3648
|
* @example
|
|
3962
|
-
* await client.
|
|
3649
|
+
* await client.actorsGetOrCreate({
|
|
3963
3650
|
* namespace: "namespace",
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3651
|
+
* key: "key",
|
|
3652
|
+
* name: "name",
|
|
3653
|
+
* pool: "pool"
|
|
3967
3654
|
* })
|
|
3968
3655
|
*/
|
|
3969
|
-
async
|
|
3970
|
-
const { namespace,
|
|
3656
|
+
async actorsGetOrCreate(request, requestOptions) {
|
|
3657
|
+
const { namespace, ..._body } = request;
|
|
3971
3658
|
const _queryParams = {};
|
|
3972
|
-
|
|
3659
|
+
if (namespace != null)
|
|
3660
|
+
_queryParams["namespace"] = namespace;
|
|
3973
3661
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3974
|
-
url:
|
|
3662
|
+
url: urlJoin6(
|
|
3975
3663
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3976
|
-
|
|
3664
|
+
"actors"
|
|
3977
3665
|
),
|
|
3978
|
-
method: "
|
|
3666
|
+
method: "PUT",
|
|
3979
3667
|
headers: {
|
|
3980
3668
|
Authorization: await this._getAuthorizationHeader(),
|
|
3981
3669
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3986,13 +3674,13 @@ var RivetClient = class {
|
|
|
3986
3674
|
contentType: "application/json",
|
|
3987
3675
|
queryParameters: _queryParams,
|
|
3988
3676
|
requestType: "json",
|
|
3989
|
-
body:
|
|
3677
|
+
body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3990
3678
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3991
3679
|
maxRetries: requestOptions?.maxRetries,
|
|
3992
3680
|
abortSignal: requestOptions?.abortSignal
|
|
3993
3681
|
});
|
|
3994
3682
|
if (_response.ok) {
|
|
3995
|
-
return
|
|
3683
|
+
return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
|
|
3996
3684
|
unrecognizedObjectKeys: "passthrough",
|
|
3997
3685
|
allowUnrecognizedUnionMembers: true,
|
|
3998
3686
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4013,7 +3701,7 @@ var RivetClient = class {
|
|
|
4013
3701
|
body: _response.error.rawBody
|
|
4014
3702
|
});
|
|
4015
3703
|
case "timeout":
|
|
4016
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3704
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
|
|
4017
3705
|
case "unknown":
|
|
4018
3706
|
throw new RivetError({
|
|
4019
3707
|
message: _response.error.errorMessage
|
|
@@ -4021,28 +3709,36 @@ var RivetClient = class {
|
|
|
4021
3709
|
}
|
|
4022
3710
|
}
|
|
4023
3711
|
/**
|
|
4024
|
-
*
|
|
4025
|
-
*
|
|
3712
|
+
* 2 round trips:
|
|
3713
|
+
*
|
|
3714
|
+
* - GET /actors/names (fanout)
|
|
3715
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3716
|
+
*
|
|
3717
|
+
* @param {Rivet.ActorsListNamesRequest} request
|
|
4026
3718
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4027
3719
|
*
|
|
4028
3720
|
* @example
|
|
4029
|
-
* await client.
|
|
4030
|
-
* namespace: "namespace"
|
|
4031
|
-
* body: {
|
|
4032
|
-
* "key": "value"
|
|
4033
|
-
* }
|
|
3721
|
+
* await client.actorsListNames({
|
|
3722
|
+
* namespace: "namespace"
|
|
4034
3723
|
* })
|
|
4035
3724
|
*/
|
|
4036
|
-
async
|
|
4037
|
-
const { namespace,
|
|
3725
|
+
async actorsListNames(request, requestOptions) {
|
|
3726
|
+
const { namespace, limit, cursor } = request;
|
|
4038
3727
|
const _queryParams = {};
|
|
4039
|
-
|
|
3728
|
+
if (namespace != null)
|
|
3729
|
+
_queryParams["namespace"] = namespace;
|
|
3730
|
+
if (limit != null) {
|
|
3731
|
+
_queryParams["limit"] = limit.toString();
|
|
3732
|
+
}
|
|
3733
|
+
if (cursor != null) {
|
|
3734
|
+
_queryParams["cursor"] = cursor;
|
|
3735
|
+
}
|
|
4040
3736
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4041
|
-
url:
|
|
3737
|
+
url: urlJoin6(
|
|
4042
3738
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4043
|
-
|
|
3739
|
+
"actors/names"
|
|
4044
3740
|
),
|
|
4045
|
-
method: "
|
|
3741
|
+
method: "GET",
|
|
4046
3742
|
headers: {
|
|
4047
3743
|
Authorization: await this._getAuthorizationHeader(),
|
|
4048
3744
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4053,13 +3749,12 @@ var RivetClient = class {
|
|
|
4053
3749
|
contentType: "application/json",
|
|
4054
3750
|
queryParameters: _queryParams,
|
|
4055
3751
|
requestType: "json",
|
|
4056
|
-
body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4057
3752
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4058
3753
|
maxRetries: requestOptions?.maxRetries,
|
|
4059
3754
|
abortSignal: requestOptions?.abortSignal
|
|
4060
3755
|
});
|
|
4061
3756
|
if (_response.ok) {
|
|
4062
|
-
return
|
|
3757
|
+
return ActorsListNamesResponse.parseOrThrow(_response.body, {
|
|
4063
3758
|
unrecognizedObjectKeys: "passthrough",
|
|
4064
3759
|
allowUnrecognizedUnionMembers: true,
|
|
4065
3760
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4080,7 +3775,7 @@ var RivetClient = class {
|
|
|
4080
3775
|
body: _response.error.rawBody
|
|
4081
3776
|
});
|
|
4082
3777
|
case "timeout":
|
|
4083
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3778
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
|
|
4084
3779
|
case "unknown":
|
|
4085
3780
|
throw new RivetError({
|
|
4086
3781
|
message: _response.error.errorMessage
|
|
@@ -4088,43 +3783,30 @@ var RivetClient = class {
|
|
|
4088
3783
|
}
|
|
4089
3784
|
}
|
|
4090
3785
|
/**
|
|
4091
|
-
*
|
|
3786
|
+
* 2 round trip:
|
|
3787
|
+
*
|
|
3788
|
+
* - DELETE /actors/{}
|
|
3789
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3790
|
+
*
|
|
3791
|
+
* @param {Rivet.RivetId} actorId
|
|
3792
|
+
* @param {Rivet.ActorsDeleteRequest} request
|
|
4092
3793
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4093
3794
|
*
|
|
4094
3795
|
* @example
|
|
4095
|
-
* await client.
|
|
3796
|
+
* await client.actorsDelete("actor_id", {
|
|
4096
3797
|
* namespace: "namespace"
|
|
4097
3798
|
* })
|
|
4098
3799
|
*/
|
|
4099
|
-
|
|
4100
|
-
|
|
3800
|
+
/** Returns one actor by ID. */
|
|
3801
|
+
async actorsGet(actorId, request, requestOptions) {
|
|
3802
|
+
const { namespace } = request;
|
|
4101
3803
|
const _queryParams = {};
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
_queryParams["limit"] = limit.toString();
|
|
4105
|
-
}
|
|
4106
|
-
if (cursor != null) {
|
|
4107
|
-
_queryParams["cursor"] = cursor;
|
|
4108
|
-
}
|
|
4109
|
-
if (variant != null) {
|
|
4110
|
-
_queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
|
|
4111
|
-
unrecognizedObjectKeys: "strip"
|
|
4112
|
-
});
|
|
4113
|
-
}
|
|
4114
|
-
if (runnerNames != null) {
|
|
4115
|
-
_queryParams["runner_names"] = runnerNames;
|
|
4116
|
-
}
|
|
4117
|
-
if (runnerName != null) {
|
|
4118
|
-
if (Array.isArray(runnerName)) {
|
|
4119
|
-
_queryParams["runner_name"] = runnerName.map((item) => item);
|
|
4120
|
-
} else {
|
|
4121
|
-
_queryParams["runner_name"] = runnerName;
|
|
4122
|
-
}
|
|
4123
|
-
}
|
|
3804
|
+
if (namespace != null)
|
|
3805
|
+
_queryParams["namespace"] = namespace;
|
|
4124
3806
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4125
|
-
url:
|
|
3807
|
+
url: urlJoin6(
|
|
4126
3808
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4127
|
-
|
|
3809
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4128
3810
|
),
|
|
4129
3811
|
method: "GET",
|
|
4130
3812
|
headers: {
|
|
@@ -4142,7 +3824,7 @@ var RivetClient = class {
|
|
|
4142
3824
|
abortSignal: requestOptions?.abortSignal
|
|
4143
3825
|
});
|
|
4144
3826
|
if (_response.ok) {
|
|
4145
|
-
return
|
|
3827
|
+
return ActorsGetResponse.parseOrThrow(_response.body, {
|
|
4146
3828
|
unrecognizedObjectKeys: "passthrough",
|
|
4147
3829
|
allowUnrecognizedUnionMembers: true,
|
|
4148
3830
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4163,33 +3845,24 @@ var RivetClient = class {
|
|
|
4163
3845
|
body: _response.error.rawBody
|
|
4164
3846
|
});
|
|
4165
3847
|
case "timeout":
|
|
4166
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3848
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
|
|
4167
3849
|
case "unknown":
|
|
4168
3850
|
throw new RivetError({
|
|
4169
3851
|
message: _response.error.errorMessage
|
|
4170
3852
|
});
|
|
4171
3853
|
}
|
|
4172
3854
|
}
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4176
|
-
*
|
|
4177
|
-
* @example
|
|
4178
|
-
* await client.runnerConfigsServerlessHealthCheck({
|
|
4179
|
-
* namespace: "namespace",
|
|
4180
|
-
* url: "url"
|
|
4181
|
-
* })
|
|
4182
|
-
*/
|
|
4183
|
-
async runnerConfigsServerlessHealthCheck(request, requestOptions) {
|
|
4184
|
-
const { namespace, ..._body } = request;
|
|
3855
|
+
async actorsDelete(actorId, request, requestOptions) {
|
|
3856
|
+
const { namespace } = request;
|
|
4185
3857
|
const _queryParams = {};
|
|
4186
|
-
|
|
3858
|
+
if (namespace != null)
|
|
3859
|
+
_queryParams["namespace"] = namespace;
|
|
4187
3860
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4188
|
-
url:
|
|
3861
|
+
url: urlJoin6(
|
|
4189
3862
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4190
|
-
|
|
3863
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4191
3864
|
),
|
|
4192
|
-
method: "
|
|
3865
|
+
method: "DELETE",
|
|
4193
3866
|
headers: {
|
|
4194
3867
|
Authorization: await this._getAuthorizationHeader(),
|
|
4195
3868
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4200,15 +3873,12 @@ var RivetClient = class {
|
|
|
4200
3873
|
contentType: "application/json",
|
|
4201
3874
|
queryParameters: _queryParams,
|
|
4202
3875
|
requestType: "json",
|
|
4203
|
-
body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
|
|
4204
|
-
unrecognizedObjectKeys: "strip"
|
|
4205
|
-
}),
|
|
4206
3876
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4207
3877
|
maxRetries: requestOptions?.maxRetries,
|
|
4208
3878
|
abortSignal: requestOptions?.abortSignal
|
|
4209
3879
|
});
|
|
4210
3880
|
if (_response.ok) {
|
|
4211
|
-
return
|
|
3881
|
+
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
4212
3882
|
unrecognizedObjectKeys: "passthrough",
|
|
4213
3883
|
allowUnrecognizedUnionMembers: true,
|
|
4214
3884
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4229,9 +3899,7 @@ var RivetClient = class {
|
|
|
4229
3899
|
body: _response.error.rawBody
|
|
4230
3900
|
});
|
|
4231
3901
|
case "timeout":
|
|
4232
|
-
throw new RivetTimeoutError(
|
|
4233
|
-
"Timeout exceeded when calling POST /runner-configs/serverless-health-check."
|
|
4234
|
-
);
|
|
3902
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
4235
3903
|
case "unknown":
|
|
4236
3904
|
throw new RivetError({
|
|
4237
3905
|
message: _response.error.errorMessage
|
|
@@ -4239,28 +3907,26 @@ var RivetClient = class {
|
|
|
4239
3907
|
}
|
|
4240
3908
|
}
|
|
4241
3909
|
/**
|
|
4242
|
-
* @param {
|
|
4243
|
-
* @param {Rivet.
|
|
3910
|
+
* @param {Rivet.RivetId} actorId
|
|
3911
|
+
* @param {Rivet.ActorsRescheduleRequest} request
|
|
4244
3912
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4245
3913
|
*
|
|
4246
3914
|
* @example
|
|
4247
|
-
* await client.
|
|
3915
|
+
* await client.actorsReschedule("actor_id", {
|
|
4248
3916
|
* namespace: "namespace",
|
|
4249
|
-
* datacenters: {
|
|
4250
|
-
* "key": {}
|
|
4251
|
-
* }
|
|
4252
3917
|
* })
|
|
4253
3918
|
*/
|
|
4254
|
-
async
|
|
4255
|
-
const { namespace
|
|
3919
|
+
async actorsReschedule(actorId, request, requestOptions) {
|
|
3920
|
+
const { namespace } = request;
|
|
4256
3921
|
const _queryParams = {};
|
|
4257
|
-
|
|
3922
|
+
if (namespace != null)
|
|
3923
|
+
_queryParams["namespace"] = namespace;
|
|
4258
3924
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4259
|
-
url:
|
|
3925
|
+
url: urlJoin6(
|
|
4260
3926
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4261
|
-
`
|
|
3927
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
|
|
4262
3928
|
),
|
|
4263
|
-
method: "
|
|
3929
|
+
method: "POST",
|
|
4264
3930
|
headers: {
|
|
4265
3931
|
Authorization: await this._getAuthorizationHeader(),
|
|
4266
3932
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4271,13 +3937,12 @@ var RivetClient = class {
|
|
|
4271
3937
|
contentType: "application/json",
|
|
4272
3938
|
queryParameters: _queryParams,
|
|
4273
3939
|
requestType: "json",
|
|
4274
|
-
body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4275
3940
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4276
3941
|
maxRetries: requestOptions?.maxRetries,
|
|
4277
3942
|
abortSignal: requestOptions?.abortSignal
|
|
4278
3943
|
});
|
|
4279
3944
|
if (_response.ok) {
|
|
4280
|
-
return
|
|
3945
|
+
return ActorsRescheduleResponse.parseOrThrow(_response.body, {
|
|
4281
3946
|
unrecognizedObjectKeys: "passthrough",
|
|
4282
3947
|
allowUnrecognizedUnionMembers: true,
|
|
4283
3948
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4298,7 +3963,7 @@ var RivetClient = class {
|
|
|
4298
3963
|
body: _response.error.rawBody
|
|
4299
3964
|
});
|
|
4300
3965
|
case "timeout":
|
|
4301
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3966
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
|
|
4302
3967
|
case "unknown":
|
|
4303
3968
|
throw new RivetError({
|
|
4304
3969
|
message: _response.error.errorMessage
|
|
@@ -4306,25 +3971,26 @@ var RivetClient = class {
|
|
|
4306
3971
|
}
|
|
4307
3972
|
}
|
|
4308
3973
|
/**
|
|
4309
|
-
* @param {
|
|
4310
|
-
* @param {Rivet.
|
|
3974
|
+
* @param {Rivet.RivetId} actorId
|
|
3975
|
+
* @param {Rivet.ActorsSleepRequest} request
|
|
4311
3976
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4312
3977
|
*
|
|
4313
3978
|
* @example
|
|
4314
|
-
* await client.
|
|
4315
|
-
* namespace: "namespace"
|
|
3979
|
+
* await client.actorsSleep("actor_id", {
|
|
3980
|
+
* namespace: "namespace",
|
|
4316
3981
|
* })
|
|
4317
3982
|
*/
|
|
4318
|
-
async
|
|
3983
|
+
async actorsSleep(actorId, request, requestOptions) {
|
|
4319
3984
|
const { namespace } = request;
|
|
4320
3985
|
const _queryParams = {};
|
|
4321
|
-
|
|
3986
|
+
if (namespace != null)
|
|
3987
|
+
_queryParams["namespace"] = namespace;
|
|
4322
3988
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4323
|
-
url:
|
|
3989
|
+
url: urlJoin6(
|
|
4324
3990
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4325
|
-
`
|
|
3991
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
|
|
4326
3992
|
),
|
|
4327
|
-
method: "
|
|
3993
|
+
method: "POST",
|
|
4328
3994
|
headers: {
|
|
4329
3995
|
Authorization: await this._getAuthorizationHeader(),
|
|
4330
3996
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4340,7 +4006,7 @@ var RivetClient = class {
|
|
|
4340
4006
|
abortSignal: requestOptions?.abortSignal
|
|
4341
4007
|
});
|
|
4342
4008
|
if (_response.ok) {
|
|
4343
|
-
return
|
|
4009
|
+
return ActorsSleepResponse.parseOrThrow(_response.body, {
|
|
4344
4010
|
unrecognizedObjectKeys: "passthrough",
|
|
4345
4011
|
allowUnrecognizedUnionMembers: true,
|
|
4346
4012
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4361,9 +4027,7 @@ var RivetClient = class {
|
|
|
4361
4027
|
body: _response.error.rawBody
|
|
4362
4028
|
});
|
|
4363
4029
|
case "timeout":
|
|
4364
|
-
throw new RivetTimeoutError(
|
|
4365
|
-
"Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
|
|
4366
|
-
);
|
|
4030
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
|
|
4367
4031
|
case "unknown":
|
|
4368
4032
|
throw new RivetError({
|
|
4369
4033
|
message: _response.error.errorMessage
|
|
@@ -4371,26 +4035,27 @@ var RivetClient = class {
|
|
|
4371
4035
|
}
|
|
4372
4036
|
}
|
|
4373
4037
|
/**
|
|
4374
|
-
*
|
|
4375
|
-
*
|
|
4038
|
+
* Forks an actor: creates a new actor in the same namespace, with the source's name and pool,
|
|
4039
|
+
* whose database is a copy of the source's, and starts it.
|
|
4040
|
+
*
|
|
4041
|
+
* @param {Rivet.RivetId} actorId
|
|
4042
|
+
* @param {Rivet.ActorsForkRequest} request
|
|
4376
4043
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4377
4044
|
*
|
|
4378
4045
|
* @example
|
|
4379
|
-
* await client.
|
|
4046
|
+
* await client.actorsFork("actor_id", {
|
|
4380
4047
|
* namespace: "namespace",
|
|
4381
|
-
* body: {
|
|
4382
|
-
* "key": "value"
|
|
4383
|
-
* }
|
|
4384
4048
|
* })
|
|
4385
4049
|
*/
|
|
4386
|
-
async
|
|
4387
|
-
const { namespace,
|
|
4050
|
+
async actorsFork(actorId, request, requestOptions) {
|
|
4051
|
+
const { namespace, ..._body } = request;
|
|
4388
4052
|
const _queryParams = {};
|
|
4389
|
-
|
|
4053
|
+
if (namespace != null)
|
|
4054
|
+
_queryParams["namespace"] = namespace;
|
|
4390
4055
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4391
|
-
url:
|
|
4056
|
+
url: urlJoin6(
|
|
4392
4057
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4393
|
-
`
|
|
4058
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/fork`
|
|
4394
4059
|
),
|
|
4395
4060
|
method: "POST",
|
|
4396
4061
|
headers: {
|
|
@@ -4403,15 +4068,13 @@ var RivetClient = class {
|
|
|
4403
4068
|
contentType: "application/json",
|
|
4404
4069
|
queryParameters: _queryParams,
|
|
4405
4070
|
requestType: "json",
|
|
4406
|
-
body:
|
|
4407
|
-
unrecognizedObjectKeys: "strip"
|
|
4408
|
-
}),
|
|
4071
|
+
body: ActorsForkRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4409
4072
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4410
4073
|
maxRetries: requestOptions?.maxRetries,
|
|
4411
4074
|
abortSignal: requestOptions?.abortSignal
|
|
4412
4075
|
});
|
|
4413
4076
|
if (_response.ok) {
|
|
4414
|
-
return
|
|
4077
|
+
return ActorsForkResponse.parseOrThrow(_response.body, {
|
|
4415
4078
|
unrecognizedObjectKeys: "passthrough",
|
|
4416
4079
|
allowUnrecognizedUnionMembers: true,
|
|
4417
4080
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4432,9 +4095,7 @@ var RivetClient = class {
|
|
|
4432
4095
|
body: _response.error.rawBody
|
|
4433
4096
|
});
|
|
4434
4097
|
case "timeout":
|
|
4435
|
-
throw new RivetTimeoutError(
|
|
4436
|
-
"Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
|
|
4437
|
-
);
|
|
4098
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/fork.");
|
|
4438
4099
|
case "unknown":
|
|
4439
4100
|
throw new RivetError({
|
|
4440
4101
|
message: _response.error.errorMessage
|