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