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