@rivetkit/engine-api-full 0.0.0-sqlite-sync-3-0-6-final.cf8679c → 0.0.0-sqlite-query-metrics-2-3-32.d7c4474
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 +1081 -327
- package/dist/browser/cjs/serialization.js +379 -94
- package/dist/browser/esm/index.js +1081 -327
- package/dist/browser/esm/serialization.js +379 -94
- package/dist/node/cjs/index.js +1081 -327
- package/dist/node/cjs/serialization.js +421 -104
- package/dist/node/esm/index.js +1081 -327
- package/dist/node/esm/serialization.js +379 -94
- package/package.json +1 -2
- package/types/Client.d.ts +91 -7
- package/types/api/client/requests/ActorsCreateRequest.d.ts +7 -3
- package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
- package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +8 -4
- package/types/api/client/requests/ActorsKvGetRequest.d.ts +12 -0
- package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
- package/types/api/client/requests/ActorsListRequest.d.ts +5 -2
- package/types/api/client/requests/ActorsRescheduleRequest.d.ts +5 -1
- package/types/api/client/requests/ActorsSleepRequest.d.ts +5 -1
- package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +12 -0
- package/types/api/client/requests/RunnerConfigsListRequest.d.ts +21 -0
- package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +17 -0
- package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +15 -0
- package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +17 -0
- package/types/api/client/requests/index.d.ts +6 -1
- package/types/api/resources/authTokens/client/Client.d.ts +20 -0
- package/types/api/resources/authTokens/client/index.d.ts +0 -1
- package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +1 -5
- package/types/api/resources/envoys/client/Client.d.ts +39 -0
- package/types/api/resources/{pools/client/requests/PoolsListRequest.d.ts → envoys/client/requests/EnvoysListRequest.d.ts} +4 -2
- package/types/api/resources/envoys/client/requests/index.d.ts +1 -0
- package/types/api/resources/health/client/Client.d.ts +36 -0
- package/types/api/resources/health/client/index.d.ts +1 -0
- package/types/api/resources/health/index.d.ts +1 -0
- package/types/api/resources/index.d.ts +5 -2
- package/types/api/resources/namespaces/client/Client.d.ts +1 -0
- package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +2 -0
- package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +6 -0
- package/types/api/resources/runners/client/Client.d.ts +54 -0
- package/types/api/resources/runners/client/index.d.ts +1 -0
- package/types/api/resources/{pools/client/requests/PoolsListNodesRequest.d.ts → runners/client/requests/RunnersListNamesRequest.d.ts} +2 -2
- package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +22 -0
- package/types/api/resources/runners/client/requests/index.d.ts +2 -0
- package/types/api/resources/runners/index.d.ts +1 -0
- package/types/api/types/Actor.d.ts +27 -21
- package/types/api/types/ActorName.d.ts +3 -1
- package/types/api/types/ActorsCreateResponse.d.ts +3 -2
- package/types/api/types/ActorsDeleteResponse.d.ts +4 -1
- package/types/api/types/ActorsGetOrCreateResponse.d.ts +3 -1
- package/types/api/types/ActorsKvGetResponse.d.ts +7 -0
- package/types/api/types/ActorsListNamesResponse.d.ts +4 -1
- package/types/api/types/ActorsListResponse.d.ts +4 -1
- package/types/api/types/ActorsRescheduleRequestBody.d.ts +4 -0
- package/types/api/types/ActorsRescheduleResponse.d.ts +4 -1
- package/types/api/types/ActorsSleepRequestBody.d.ts +4 -0
- package/types/api/types/ActorsSleepResponse.d.ts +4 -1
- package/types/api/types/AuthOperationKind.d.ts +10 -0
- package/types/api/types/AuthTokenCreateResponse.d.ts +5 -5
- package/types/api/types/AuthTokenGrant.d.ts +6 -4
- package/types/api/types/AuthTokenInspectResponse.d.ts +7 -9
- package/types/api/types/AuthTokenResource.d.ts +13 -0
- package/types/api/types/AuthTokenTargetScope.d.ts +5 -0
- package/types/api/types/AuthTokenTargetScopeId.d.ts +7 -0
- package/types/api/types/CrashPolicy.d.ts +9 -0
- package/types/api/types/Datacenter.d.ts +5 -1
- package/types/api/types/DatacenterHealth.d.ts +12 -0
- package/types/api/types/DatacentersListResponse.d.ts +5 -1
- package/types/api/types/Envoy.d.ts +18 -0
- package/types/api/types/EnvoysListResponse.d.ts +8 -0
- package/types/api/types/HealthFanoutResponse.d.ts +7 -0
- package/types/api/types/HealthResponse.d.ts +8 -0
- package/types/api/types/HealthStatus.d.ts +8 -0
- package/types/api/types/MetadataGetResponse.d.ts +12 -8
- package/types/api/types/Namespace.d.ts +7 -3
- package/types/api/types/NamespaceListResponse.d.ts +4 -1
- package/types/api/types/NamespacesCreateResponse.d.ts +3 -0
- package/types/api/types/Pagination.d.ts +4 -2
- package/types/api/types/RivetId.d.ts +3 -0
- package/types/api/types/Runner.d.ts +21 -0
- package/types/api/types/RunnerConfig.d.ts +11 -0
- package/types/api/types/RunnerConfigKind.d.ts +5 -0
- package/types/api/types/RunnerConfigKindNormal.d.ts +7 -0
- package/types/api/types/RunnerConfigKindNormalNormal.d.ts +12 -0
- package/types/api/types/RunnerConfigKindServerless.d.ts +7 -0
- package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +29 -0
- package/types/api/types/RunnerConfigNormal.d.ts +12 -0
- package/types/api/types/RunnerConfigResponse.d.ts +8 -0
- package/types/api/types/RunnerConfigServerless.d.ts +29 -0
- package/types/api/types/RunnerConfigVariant.d.ts +8 -0
- package/types/api/types/RunnerConfigsDeleteResponse.d.ts +4 -0
- package/types/api/types/RunnerConfigsListResponse.d.ts +8 -0
- package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +7 -0
- package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +4 -0
- package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +4 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +5 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +6 -0
- package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +16 -0
- package/types/api/types/RunnerConfigsUpsertResponse.d.ts +6 -0
- package/types/api/types/RunnersListNamesResponse.d.ts +8 -0
- package/types/api/types/RunnersListResponse.d.ts +8 -0
- package/types/api/types/index.d.ts +38 -10
- package/types/serialization/client/requests/ActorsCreateRequest.d.ts +4 -1
- package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +5 -2
- package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +13 -0
- package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +13 -0
- package/types/serialization/client/requests/index.d.ts +2 -0
- package/types/serialization/resources/authTokens/client/index.d.ts +1 -0
- package/types/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +16 -0
- package/types/serialization/resources/authTokens/client/requests/index.d.ts +1 -0
- package/types/serialization/resources/authTokens/index.d.ts +1 -0
- package/types/serialization/resources/index.d.ts +2 -0
- package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +1 -0
- package/types/serialization/types/Actor.d.ts +17 -10
- package/types/serialization/types/ActorName.d.ts +3 -0
- package/types/serialization/types/ActorsCreateResponse.d.ts +3 -1
- package/types/serialization/types/ActorsDeleteResponse.d.ts +4 -1
- package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +3 -0
- package/types/serialization/types/ActorsKvGetResponse.d.ts +13 -0
- package/types/serialization/types/ActorsListNamesResponse.d.ts +5 -0
- package/types/serialization/types/ActorsListResponse.d.ts +4 -1
- package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +10 -0
- package/types/serialization/types/ActorsRescheduleResponse.d.ts +4 -1
- package/types/serialization/types/ActorsSleepRequestBody.d.ts +10 -0
- package/types/serialization/types/ActorsSleepResponse.d.ts +4 -1
- package/types/serialization/types/AuthOperationKind.d.ts +3 -0
- package/types/serialization/types/AuthTokenCreateResponse.d.ts +5 -2
- package/types/serialization/types/AuthTokenGrant.d.ts +8 -5
- package/types/serialization/types/AuthTokenInspectResponse.d.ts +8 -4
- package/types/serialization/types/AuthTokenResource.d.ts +10 -0
- package/types/serialization/types/AuthTokenTargetScope.d.ts +11 -0
- package/types/serialization/types/AuthTokenTargetScopeId.d.ts +13 -0
- package/types/serialization/types/CrashPolicy.d.ts +10 -0
- package/types/serialization/types/Datacenter.d.ts +5 -0
- package/types/serialization/types/DatacenterHealth.d.ts +19 -0
- package/types/serialization/types/DatacentersListResponse.d.ts +6 -1
- package/types/serialization/types/Envoy.d.ts +24 -0
- package/types/serialization/types/EnvoysListResponse.d.ts +15 -0
- package/types/serialization/types/HealthFanoutResponse.d.ts +13 -0
- package/types/serialization/types/HealthResponse.d.ts +14 -0
- package/types/serialization/types/HealthStatus.d.ts +10 -0
- package/types/serialization/types/MetadataGetResponse.d.ts +12 -4
- package/types/serialization/types/Namespace.d.ts +7 -1
- package/types/serialization/types/NamespaceListResponse.d.ts +4 -1
- package/types/serialization/types/NamespacesCreateResponse.d.ts +3 -0
- package/types/serialization/types/Pagination.d.ts +4 -1
- package/types/serialization/types/RivetId.d.ts +3 -0
- package/types/serialization/types/Runner.d.ts +27 -0
- package/types/serialization/types/RunnerConfig.d.ts +17 -0
- package/types/serialization/types/RunnerConfigKind.d.ts +12 -0
- package/types/serialization/types/RunnerConfigKindNormal.d.ts +13 -0
- package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +15 -0
- package/types/serialization/types/RunnerConfigKindServerless.d.ts +13 -0
- package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +25 -0
- package/types/serialization/types/RunnerConfigNormal.d.ts +15 -0
- package/types/serialization/types/RunnerConfigResponse.d.ts +14 -0
- package/types/serialization/types/RunnerConfigServerless.d.ts +25 -0
- package/types/serialization/types/RunnerConfigVariant.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsListResponse.d.ts +15 -0
- package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +14 -0
- package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +12 -0
- package/types/serialization/types/RunnersListNamesResponse.d.ts +14 -0
- package/types/serialization/types/RunnersListResponse.d.ts +15 -0
- package/types/serialization/types/index.d.ts +38 -10
- package/types/api/client/requests/ActorsGetRequest.d.ts +0 -3
- package/types/api/resources/pools/client/Client.d.ts +0 -57
- package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +0 -3
- package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +0 -3
- package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +0 -8
- package/types/api/resources/pools/client/requests/index.d.ts +0 -5
- package/types/api/types/ActorsGetResponse.d.ts +0 -4
- package/types/api/types/AuthResourceKind.d.ts +0 -1
- package/types/api/types/AuthTargetScope.d.ts +0 -4
- package/types/api/types/ErrorResponse.d.ts +0 -10
- package/types/api/types/Node.d.ts +0 -20
- package/types/api/types/Pool.d.ts +0 -14
- package/types/api/types/PoolResponse.d.ts +0 -4
- package/types/api/types/PoolsDeleteResponse.d.ts +0 -1
- package/types/api/types/PoolsListNodesResponse.d.ts +0 -5
- package/types/api/types/PoolsListResponse.d.ts +0 -5
- package/types/serialization/types/ActorsGetResponse.d.ts +0 -10
- package/types/serialization/types/AuthResourceKind.d.ts +0 -7
- package/types/serialization/types/AuthTargetScope.d.ts +0 -10
- package/types/serialization/types/ErrorResponse.d.ts +0 -12
- package/types/serialization/types/Node.d.ts +0 -17
- package/types/serialization/types/Pool.d.ts +0 -14
- package/types/serialization/types/PoolResponse.d.ts +0 -10
- package/types/serialization/types/PoolsDeleteResponse.d.ts +0 -7
- package/types/serialization/types/PoolsListNodesResponse.d.ts +0 -12
- package/types/serialization/types/PoolsListResponse.d.ts +0 -12
- /package/types/api/resources/{pools → envoys}/client/index.d.ts +0 -0
- /package/types/api/resources/{pools → envoys}/index.d.ts +0 -0
|
@@ -547,18 +547,79 @@ 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,
|
|
550
555
|
authTokens: () => authTokens_exports,
|
|
551
556
|
datacenters: () => datacenters_exports,
|
|
557
|
+
envoys: () => envoys_exports,
|
|
558
|
+
health: () => health_exports,
|
|
552
559
|
metadata: () => metadata_exports,
|
|
553
|
-
namespaces: () =>
|
|
554
|
-
|
|
560
|
+
namespaces: () => namespaces_exports,
|
|
561
|
+
runners: () => runners_exports
|
|
555
562
|
});
|
|
556
563
|
|
|
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
|
+
|
|
557
603
|
// src/api/resources/authTokens/index.ts
|
|
558
604
|
var authTokens_exports = {};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
605
|
+
|
|
606
|
+
// src/api/resources/datacenters/index.ts
|
|
607
|
+
var datacenters_exports = {};
|
|
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 = {};
|
|
562
623
|
|
|
563
624
|
// src/core/json.ts
|
|
564
625
|
var toJson = (value, replacer, space) => {
|
|
@@ -2272,9 +2333,6 @@ function transformAndValidateUnion({
|
|
|
2272
2333
|
};
|
|
2273
2334
|
}
|
|
2274
2335
|
|
|
2275
|
-
// src/api/resources/authTokens/client/Client.ts
|
|
2276
|
-
import urlJoin from "url-join";
|
|
2277
|
-
|
|
2278
2336
|
// src/serialization/index.ts
|
|
2279
2337
|
var serialization_exports = {};
|
|
2280
2338
|
__export(serialization_exports, {
|
|
@@ -2285,53 +2343,91 @@ __export(serialization_exports, {
|
|
|
2285
2343
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
2286
2344
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
2287
2345
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
2288
|
-
|
|
2346
|
+
ActorsKvGetResponse: () => ActorsKvGetResponse,
|
|
2289
2347
|
ActorsListNamesResponse: () => ActorsListNamesResponse,
|
|
2290
2348
|
ActorsListResponse: () => ActorsListResponse,
|
|
2349
|
+
ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
|
|
2291
2350
|
ActorsRescheduleResponse: () => ActorsRescheduleResponse,
|
|
2351
|
+
ActorsSleepRequestBody: () => ActorsSleepRequestBody,
|
|
2292
2352
|
ActorsSleepResponse: () => ActorsSleepResponse,
|
|
2293
|
-
AuthOperationKind: () =>
|
|
2294
|
-
|
|
2295
|
-
AuthTargetScope: () => AuthTargetScope,
|
|
2353
|
+
AuthOperationKind: () => AuthOperationKind2,
|
|
2354
|
+
AuthTokenCreateRequest: () => AuthTokenCreateRequest,
|
|
2296
2355
|
AuthTokenCreateResponse: () => AuthTokenCreateResponse,
|
|
2297
2356
|
AuthTokenGrant: () => AuthTokenGrant,
|
|
2298
2357
|
AuthTokenInspectResponse: () => AuthTokenInspectResponse,
|
|
2358
|
+
AuthTokenResource: () => AuthTokenResource2,
|
|
2359
|
+
AuthTokenTargetScope: () => AuthTokenTargetScope,
|
|
2360
|
+
AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
|
|
2361
|
+
CrashPolicy: () => CrashPolicy2,
|
|
2299
2362
|
Datacenter: () => Datacenter,
|
|
2363
|
+
DatacenterHealth: () => DatacenterHealth,
|
|
2300
2364
|
DatacentersListResponse: () => DatacentersListResponse,
|
|
2301
|
-
|
|
2365
|
+
Envoy: () => Envoy,
|
|
2366
|
+
EnvoysListResponse: () => EnvoysListResponse,
|
|
2367
|
+
HealthFanoutResponse: () => HealthFanoutResponse,
|
|
2368
|
+
HealthResponse: () => HealthResponse,
|
|
2369
|
+
HealthStatus: () => HealthStatus2,
|
|
2302
2370
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
2303
2371
|
Namespace: () => Namespace,
|
|
2304
2372
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
2305
2373
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
2306
2374
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
2307
|
-
Node: () => Node,
|
|
2308
2375
|
Pagination: () => Pagination,
|
|
2309
|
-
Pool: () => Pool,
|
|
2310
|
-
PoolResponse: () => PoolResponse,
|
|
2311
|
-
PoolsDeleteResponse: () => PoolsDeleteResponse,
|
|
2312
|
-
PoolsListNodesResponse: () => PoolsListNodesResponse,
|
|
2313
|
-
PoolsListResponse: () => PoolsListResponse,
|
|
2314
2376
|
RivetId: () => RivetId,
|
|
2315
|
-
|
|
2377
|
+
Runner: () => Runner,
|
|
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
|
|
2316
2406
|
});
|
|
2317
2407
|
|
|
2318
2408
|
// src/serialization/types/RivetId.ts
|
|
2319
2409
|
var RivetId = schemas_exports.string();
|
|
2320
2410
|
|
|
2411
|
+
// src/serialization/types/CrashPolicy.ts
|
|
2412
|
+
var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
|
|
2413
|
+
|
|
2321
2414
|
// src/serialization/types/Actor.ts
|
|
2322
2415
|
var Actor = schemas_exports.object({
|
|
2323
2416
|
actorId: schemas_exports.property("actor_id", RivetId),
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
namespace: schemas_exports.string(),
|
|
2327
|
-
pool: schemas_exports.string(),
|
|
2417
|
+
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
|
|
2418
|
+
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2328
2419
|
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
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
|
+
name: schemas_exports.string(),
|
|
2425
|
+
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2426
|
+
pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
|
|
2427
|
+
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
|
|
2428
|
+
runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
|
|
2429
|
+
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
|
|
2430
|
+
startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
|
|
2335
2431
|
});
|
|
2336
2432
|
|
|
2337
2433
|
// src/serialization/types/ActorName.ts
|
|
@@ -2341,12 +2437,11 @@ var ActorName = schemas_exports.object({
|
|
|
2341
2437
|
|
|
2342
2438
|
// src/serialization/types/ActorsCreateResponse.ts
|
|
2343
2439
|
var ActorsCreateResponse = schemas_exports.object({
|
|
2344
|
-
actor: Actor
|
|
2345
|
-
created: schemas_exports.boolean()
|
|
2440
|
+
actor: Actor
|
|
2346
2441
|
});
|
|
2347
2442
|
|
|
2348
2443
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
2349
|
-
var ActorsDeleteResponse = schemas_exports.
|
|
2444
|
+
var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2350
2445
|
|
|
2351
2446
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
2352
2447
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
@@ -2354,19 +2449,21 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
|
2354
2449
|
created: schemas_exports.boolean()
|
|
2355
2450
|
});
|
|
2356
2451
|
|
|
2357
|
-
// src/serialization/types/
|
|
2358
|
-
var
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
// src/serialization/types/ActorsListNamesResponse.ts
|
|
2363
|
-
var ActorsListNamesResponse = schemas_exports.object({
|
|
2364
|
-
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2452
|
+
// src/serialization/types/ActorsKvGetResponse.ts
|
|
2453
|
+
var ActorsKvGetResponse = schemas_exports.object({
|
|
2454
|
+
updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
|
|
2455
|
+
value: schemas_exports.string()
|
|
2365
2456
|
});
|
|
2366
2457
|
|
|
2367
2458
|
// src/serialization/types/Pagination.ts
|
|
2368
2459
|
var Pagination = schemas_exports.object({
|
|
2369
|
-
cursor: schemas_exports.string().
|
|
2460
|
+
cursor: schemas_exports.string().optional()
|
|
2461
|
+
});
|
|
2462
|
+
|
|
2463
|
+
// src/serialization/types/ActorsListNamesResponse.ts
|
|
2464
|
+
var ActorsListNamesResponse = schemas_exports.object({
|
|
2465
|
+
names: schemas_exports.record(schemas_exports.string(), ActorName),
|
|
2466
|
+
pagination: Pagination
|
|
2370
2467
|
});
|
|
2371
2468
|
|
|
2372
2469
|
// src/serialization/types/ActorsListResponse.ts
|
|
@@ -2375,76 +2472,143 @@ var ActorsListResponse = schemas_exports.object({
|
|
|
2375
2472
|
pagination: Pagination
|
|
2376
2473
|
});
|
|
2377
2474
|
|
|
2475
|
+
// src/serialization/types/ActorsRescheduleRequestBody.ts
|
|
2476
|
+
var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2477
|
+
|
|
2378
2478
|
// src/serialization/types/ActorsRescheduleResponse.ts
|
|
2379
|
-
var ActorsRescheduleResponse = schemas_exports.
|
|
2479
|
+
var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2480
|
+
|
|
2481
|
+
// src/serialization/types/ActorsSleepRequestBody.ts
|
|
2482
|
+
var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2380
2483
|
|
|
2381
2484
|
// src/serialization/types/ActorsSleepResponse.ts
|
|
2382
|
-
var ActorsSleepResponse = schemas_exports.
|
|
2485
|
+
var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2383
2486
|
|
|
2384
2487
|
// src/serialization/types/AuthOperationKind.ts
|
|
2385
|
-
var
|
|
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
|
-
})]);
|
|
2488
|
+
var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
|
|
2394
2489
|
|
|
2395
2490
|
// src/serialization/types/AuthTokenCreateResponse.ts
|
|
2396
2491
|
var AuthTokenCreateResponse = schemas_exports.object({
|
|
2397
|
-
|
|
2492
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
|
|
2398
2493
|
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2399
|
-
|
|
2494
|
+
token: schemas_exports.string()
|
|
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
|
|
2400
2511
|
});
|
|
2401
2512
|
|
|
2513
|
+
// src/serialization/types/AuthTokenTargetScope.ts
|
|
2514
|
+
var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
|
|
2515
|
+
|
|
2402
2516
|
// src/serialization/types/AuthTokenGrant.ts
|
|
2403
2517
|
var AuthTokenGrant = schemas_exports.object({
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2518
|
+
operations: schemas_exports.list(AuthOperationKind2),
|
|
2519
|
+
resource: AuthTokenResource2,
|
|
2520
|
+
target: AuthTokenTargetScope
|
|
2407
2521
|
});
|
|
2408
2522
|
|
|
2409
2523
|
// src/serialization/types/AuthTokenInspectResponse.ts
|
|
2410
2524
|
var AuthTokenInspectResponse = schemas_exports.object({
|
|
2411
|
-
|
|
2412
|
-
subject: schemas_exports.string().nullable(),
|
|
2525
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
|
|
2413
2526
|
grants: schemas_exports.list(AuthTokenGrant),
|
|
2414
2527
|
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2415
|
-
|
|
2528
|
+
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2529
|
+
subject: schemas_exports.string().optional()
|
|
2416
2530
|
});
|
|
2417
2531
|
|
|
2418
2532
|
// src/serialization/types/Datacenter.ts
|
|
2419
2533
|
var Datacenter = schemas_exports.object({
|
|
2420
|
-
|
|
2534
|
+
label: schemas_exports.number(),
|
|
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
|
|
2421
2557
|
});
|
|
2422
2558
|
|
|
2423
2559
|
// src/serialization/types/DatacentersListResponse.ts
|
|
2424
2560
|
var DatacentersListResponse = schemas_exports.object({
|
|
2425
|
-
datacenters: schemas_exports.list(Datacenter)
|
|
2561
|
+
datacenters: schemas_exports.list(Datacenter),
|
|
2562
|
+
pagination: Pagination
|
|
2426
2563
|
});
|
|
2427
2564
|
|
|
2428
|
-
// src/serialization/types/
|
|
2429
|
-
var
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
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()
|
|
2579
|
+
});
|
|
2580
|
+
|
|
2581
|
+
// src/serialization/types/EnvoysListResponse.ts
|
|
2582
|
+
var EnvoysListResponse = schemas_exports.object({
|
|
2583
|
+
envoys: schemas_exports.list(Envoy),
|
|
2584
|
+
pagination: Pagination
|
|
2585
|
+
});
|
|
2586
|
+
|
|
2587
|
+
// src/serialization/types/HealthFanoutResponse.ts
|
|
2588
|
+
var HealthFanoutResponse = schemas_exports.object({
|
|
2589
|
+
datacenters: schemas_exports.list(DatacenterHealth)
|
|
2434
2590
|
});
|
|
2435
2591
|
|
|
2436
2592
|
// src/serialization/types/MetadataGetResponse.ts
|
|
2437
2593
|
var MetadataGetResponse = schemas_exports.object({
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2594
|
+
buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
|
|
2595
|
+
cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
|
|
2596
|
+
cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
|
|
2597
|
+
envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
|
|
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()
|
|
2442
2604
|
});
|
|
2443
2605
|
|
|
2444
2606
|
// src/serialization/types/Namespace.ts
|
|
2445
2607
|
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()),
|
|
2446
2610
|
name: schemas_exports.string(),
|
|
2447
|
-
|
|
2611
|
+
namespaceId: schemas_exports.property("namespace_id", RivetId)
|
|
2448
2612
|
});
|
|
2449
2613
|
|
|
2450
2614
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -2458,76 +2622,258 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
2458
2622
|
namespace: Namespace
|
|
2459
2623
|
});
|
|
2460
2624
|
|
|
2461
|
-
// src/serialization/types/
|
|
2462
|
-
var
|
|
2463
|
-
key: schemas_exports.string(),
|
|
2464
|
-
pool: schemas_exports.string(),
|
|
2465
|
-
namespace: schemas_exports.string(),
|
|
2466
|
-
datacenter: schemas_exports.string(),
|
|
2467
|
-
version: schemas_exports.number(),
|
|
2625
|
+
// src/serialization/types/Runner.ts
|
|
2626
|
+
var Runner = schemas_exports.object({
|
|
2468
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()),
|
|
2630
|
+
key: schemas_exports.string(),
|
|
2631
|
+
lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
|
|
2469
2632
|
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2470
|
-
|
|
2471
|
-
|
|
2633
|
+
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2634
|
+
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
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()
|
|
2472
2642
|
});
|
|
2473
2643
|
|
|
2474
|
-
// src/serialization/types/
|
|
2475
|
-
var
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
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()
|
|
2482
2722
|
});
|
|
2483
2723
|
|
|
2484
|
-
// src/serialization/types/
|
|
2485
|
-
var
|
|
2486
|
-
|
|
2724
|
+
// src/serialization/types/RunnerConfigKindServerless.ts
|
|
2725
|
+
var RunnerConfigKindServerless = schemas_exports.object({
|
|
2726
|
+
serverless: RunnerConfigKindServerlessServerless
|
|
2487
2727
|
});
|
|
2488
2728
|
|
|
2489
|
-
// src/serialization/types/
|
|
2490
|
-
var
|
|
2729
|
+
// src/serialization/types/RunnerConfigKind.ts
|
|
2730
|
+
var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
|
|
2491
2731
|
|
|
2492
|
-
// src/serialization/types/
|
|
2493
|
-
var
|
|
2494
|
-
|
|
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()
|
|
2770
|
+
});
|
|
2771
|
+
|
|
2772
|
+
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
|
|
2773
|
+
var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
|
|
2774
|
+
success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
|
|
2775
|
+
});
|
|
2776
|
+
|
|
2777
|
+
// src/serialization/types/RunnerConfigsServerlessMetadataError.ts
|
|
2778
|
+
var RunnerConfigsServerlessMetadataError = schemas_exports.object({
|
|
2779
|
+
details: schemas_exports.string().optional(),
|
|
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
|
|
2787
|
+
});
|
|
2788
|
+
|
|
2789
|
+
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
|
|
2790
|
+
var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
|
|
2791
|
+
failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
|
|
2792
|
+
});
|
|
2793
|
+
|
|
2794
|
+
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
|
|
2795
|
+
var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
|
|
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
|
+
});
|
|
2804
|
+
|
|
2805
|
+
// src/serialization/types/RunnersListNamesResponse.ts
|
|
2806
|
+
var RunnersListNamesResponse = schemas_exports.object({
|
|
2807
|
+
names: schemas_exports.list(schemas_exports.string()),
|
|
2495
2808
|
pagination: Pagination
|
|
2496
2809
|
});
|
|
2497
2810
|
|
|
2498
|
-
// src/serialization/types/
|
|
2499
|
-
var
|
|
2811
|
+
// src/serialization/types/RunnersListResponse.ts
|
|
2812
|
+
var RunnersListResponse = schemas_exports.object({
|
|
2500
2813
|
pagination: Pagination,
|
|
2501
|
-
|
|
2814
|
+
runners: schemas_exports.list(Runner)
|
|
2502
2815
|
});
|
|
2503
2816
|
|
|
2504
2817
|
// src/serialization/client/requests/ActorsCreateRequest.ts
|
|
2505
2818
|
var ActorsCreateRequest = schemas_exports.object({
|
|
2819
|
+
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2820
|
+
datacenter: schemas_exports.string().optional(),
|
|
2506
2821
|
input: schemas_exports.string().optional(),
|
|
2507
2822
|
key: schemas_exports.string().optional(),
|
|
2508
2823
|
name: schemas_exports.string(),
|
|
2509
|
-
|
|
2824
|
+
runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
|
|
2510
2825
|
});
|
|
2511
2826
|
|
|
2512
2827
|
// src/serialization/client/requests/ActorsGetOrCreateRequest.ts
|
|
2513
2828
|
var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
2829
|
+
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2830
|
+
datacenter: schemas_exports.string().optional(),
|
|
2514
2831
|
input: schemas_exports.string().optional(),
|
|
2515
|
-
key: schemas_exports.string()
|
|
2832
|
+
key: schemas_exports.string(),
|
|
2516
2833
|
name: schemas_exports.string(),
|
|
2517
|
-
|
|
2834
|
+
runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
|
|
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()
|
|
2518
2860
|
});
|
|
2519
2861
|
|
|
2520
2862
|
// src/serialization/resources/namespaces/index.ts
|
|
2521
|
-
var
|
|
2522
|
-
__export(
|
|
2863
|
+
var namespaces_exports2 = {};
|
|
2864
|
+
__export(namespaces_exports2, {
|
|
2523
2865
|
NamespacesCreateRequest: () => NamespacesCreateRequest
|
|
2524
2866
|
});
|
|
2525
2867
|
|
|
2526
2868
|
// src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
|
|
2527
2869
|
var NamespacesCreateRequest = schemas_exports.object({
|
|
2870
|
+
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2528
2871
|
name: schemas_exports.string()
|
|
2529
2872
|
});
|
|
2530
2873
|
|
|
2874
|
+
// src/Client.ts
|
|
2875
|
+
import urlJoin8 from "url-join";
|
|
2876
|
+
|
|
2531
2877
|
// src/errors/RivetError.ts
|
|
2532
2878
|
var RivetError = class _RivetError extends Error {
|
|
2533
2879
|
statusCode;
|
|
@@ -2570,10 +2916,25 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
|
|
|
2570
2916
|
};
|
|
2571
2917
|
|
|
2572
2918
|
// src/api/resources/authTokens/client/Client.ts
|
|
2919
|
+
import urlJoin from "url-join";
|
|
2573
2920
|
var AuthTokens = class {
|
|
2574
2921
|
constructor(_options) {
|
|
2575
2922
|
this._options = _options;
|
|
2576
2923
|
}
|
|
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
|
+
*/
|
|
2577
2938
|
async create(request, requestOptions) {
|
|
2578
2939
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2579
2940
|
url: urlJoin(
|
|
@@ -2590,12 +2951,7 @@ var AuthTokens = class {
|
|
|
2590
2951
|
},
|
|
2591
2952
|
contentType: "application/json",
|
|
2592
2953
|
requestType: "json",
|
|
2593
|
-
body: {
|
|
2594
|
-
namespace: request.namespace,
|
|
2595
|
-
duration: request.duration,
|
|
2596
|
-
subject: request.subject,
|
|
2597
|
-
grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
|
|
2598
|
-
},
|
|
2954
|
+
body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
2599
2955
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2600
2956
|
maxRetries: requestOptions?.maxRetries,
|
|
2601
2957
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -2629,6 +2985,12 @@ var AuthTokens = class {
|
|
|
2629
2985
|
});
|
|
2630
2986
|
}
|
|
2631
2987
|
}
|
|
2988
|
+
/**
|
|
2989
|
+
* @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
2990
|
+
*
|
|
2991
|
+
* @example
|
|
2992
|
+
* await client.authTokens.inspect()
|
|
2993
|
+
*/
|
|
2632
2994
|
async inspect(requestOptions) {
|
|
2633
2995
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2634
2996
|
url: urlJoin(
|
|
@@ -2683,21 +3045,6 @@ var AuthTokens = class {
|
|
|
2683
3045
|
}
|
|
2684
3046
|
};
|
|
2685
3047
|
|
|
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
|
-
|
|
2701
3048
|
// src/api/resources/datacenters/client/Client.ts
|
|
2702
3049
|
import urlJoin2 from "url-join";
|
|
2703
3050
|
var Datacenters = class {
|
|
@@ -2764,23 +3111,45 @@ var Datacenters = class {
|
|
|
2764
3111
|
}
|
|
2765
3112
|
};
|
|
2766
3113
|
|
|
2767
|
-
// src/api/resources/
|
|
3114
|
+
// src/api/resources/envoys/client/Client.ts
|
|
2768
3115
|
import urlJoin3 from "url-join";
|
|
2769
|
-
var
|
|
3116
|
+
var Envoys = class {
|
|
2770
3117
|
constructor(_options) {
|
|
2771
3118
|
this._options = _options;
|
|
2772
3119
|
}
|
|
2773
3120
|
/**
|
|
2774
|
-
* @param {
|
|
3121
|
+
* @param {Rivet.EnvoysListRequest} request
|
|
3122
|
+
* @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
|
|
2775
3123
|
*
|
|
2776
3124
|
* @example
|
|
2777
|
-
* await client.
|
|
3125
|
+
* await client.envoys.list({
|
|
3126
|
+
* namespace: "namespace"
|
|
3127
|
+
* })
|
|
2778
3128
|
*/
|
|
2779
|
-
async
|
|
3129
|
+
async list(request, requestOptions) {
|
|
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
|
+
}
|
|
2780
3149
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2781
3150
|
url: urlJoin3(
|
|
2782
3151
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2783
|
-
"
|
|
3152
|
+
"envoys"
|
|
2784
3153
|
),
|
|
2785
3154
|
method: "GET",
|
|
2786
3155
|
headers: {
|
|
@@ -2791,13 +3160,14 @@ var Metadata = class {
|
|
|
2791
3160
|
...requestOptions?.headers
|
|
2792
3161
|
},
|
|
2793
3162
|
contentType: "application/json",
|
|
3163
|
+
queryParameters: _queryParams,
|
|
2794
3164
|
requestType: "json",
|
|
2795
3165
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2796
3166
|
maxRetries: requestOptions?.maxRetries,
|
|
2797
3167
|
abortSignal: requestOptions?.abortSignal
|
|
2798
3168
|
});
|
|
2799
3169
|
if (_response.ok) {
|
|
2800
|
-
return
|
|
3170
|
+
return EnvoysListResponse.parseOrThrow(_response.body, {
|
|
2801
3171
|
unrecognizedObjectKeys: "passthrough",
|
|
2802
3172
|
allowUnrecognizedUnionMembers: true,
|
|
2803
3173
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2818,7 +3188,7 @@ var Metadata = class {
|
|
|
2818
3188
|
body: _response.error.rawBody
|
|
2819
3189
|
});
|
|
2820
3190
|
case "timeout":
|
|
2821
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3191
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
|
|
2822
3192
|
case "unknown":
|
|
2823
3193
|
throw new RivetError({
|
|
2824
3194
|
message: _response.error.errorMessage
|
|
@@ -2830,35 +3200,23 @@ var Metadata = class {
|
|
|
2830
3200
|
}
|
|
2831
3201
|
};
|
|
2832
3202
|
|
|
2833
|
-
// src/api/resources/
|
|
3203
|
+
// src/api/resources/health/client/Client.ts
|
|
2834
3204
|
import urlJoin4 from "url-join";
|
|
2835
|
-
var
|
|
3205
|
+
var Health = class {
|
|
2836
3206
|
constructor(_options) {
|
|
2837
3207
|
this._options = _options;
|
|
2838
3208
|
}
|
|
2839
3209
|
/**
|
|
2840
|
-
* @param {
|
|
2841
|
-
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3210
|
+
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
2842
3211
|
*
|
|
2843
3212
|
* @example
|
|
2844
|
-
* await client.
|
|
3213
|
+
* await client.health.fanout()
|
|
2845
3214
|
*/
|
|
2846
|
-
async
|
|
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
|
-
}
|
|
3215
|
+
async fanout(requestOptions) {
|
|
2858
3216
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2859
3217
|
url: urlJoin4(
|
|
2860
3218
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2861
|
-
"
|
|
3219
|
+
"health/fanout"
|
|
2862
3220
|
),
|
|
2863
3221
|
method: "GET",
|
|
2864
3222
|
headers: {
|
|
@@ -2869,14 +3227,13 @@ var Namespaces = class {
|
|
|
2869
3227
|
...requestOptions?.headers
|
|
2870
3228
|
},
|
|
2871
3229
|
contentType: "application/json",
|
|
2872
|
-
queryParameters: _queryParams,
|
|
2873
3230
|
requestType: "json",
|
|
2874
3231
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2875
3232
|
maxRetries: requestOptions?.maxRetries,
|
|
2876
3233
|
abortSignal: requestOptions?.abortSignal
|
|
2877
3234
|
});
|
|
2878
3235
|
if (_response.ok) {
|
|
2879
|
-
return
|
|
3236
|
+
return HealthFanoutResponse.parseOrThrow(_response.body, {
|
|
2880
3237
|
unrecognizedObjectKeys: "passthrough",
|
|
2881
3238
|
allowUnrecognizedUnionMembers: true,
|
|
2882
3239
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2897,29 +3254,37 @@ var Namespaces = class {
|
|
|
2897
3254
|
body: _response.error.rawBody
|
|
2898
3255
|
});
|
|
2899
3256
|
case "timeout":
|
|
2900
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3257
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
|
|
2901
3258
|
case "unknown":
|
|
2902
3259
|
throw new RivetError({
|
|
2903
3260
|
message: _response.error.errorMessage
|
|
2904
3261
|
});
|
|
2905
3262
|
}
|
|
2906
3263
|
}
|
|
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
|
+
}
|
|
2907
3275
|
/**
|
|
2908
|
-
* @param {
|
|
2909
|
-
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3276
|
+
* @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
|
|
2910
3277
|
*
|
|
2911
3278
|
* @example
|
|
2912
|
-
* await client.
|
|
2913
|
-
* name: "name"
|
|
2914
|
-
* })
|
|
3279
|
+
* await client.metadata.get()
|
|
2915
3280
|
*/
|
|
2916
|
-
async
|
|
3281
|
+
async get(requestOptions) {
|
|
2917
3282
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2918
|
-
url:
|
|
3283
|
+
url: urlJoin5(
|
|
2919
3284
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2920
|
-
"
|
|
3285
|
+
"metadata"
|
|
2921
3286
|
),
|
|
2922
|
-
method: "
|
|
3287
|
+
method: "GET",
|
|
2923
3288
|
headers: {
|
|
2924
3289
|
Authorization: await this._getAuthorizationHeader(),
|
|
2925
3290
|
"X-Fern-Language": "JavaScript",
|
|
@@ -2929,13 +3294,12 @@ var Namespaces = class {
|
|
|
2929
3294
|
},
|
|
2930
3295
|
contentType: "application/json",
|
|
2931
3296
|
requestType: "json",
|
|
2932
|
-
body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
2933
3297
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2934
3298
|
maxRetries: requestOptions?.maxRetries,
|
|
2935
3299
|
abortSignal: requestOptions?.abortSignal
|
|
2936
3300
|
});
|
|
2937
3301
|
if (_response.ok) {
|
|
2938
|
-
return
|
|
3302
|
+
return MetadataGetResponse.parseOrThrow(_response.body, {
|
|
2939
3303
|
unrecognizedObjectKeys: "passthrough",
|
|
2940
3304
|
allowUnrecognizedUnionMembers: true,
|
|
2941
3305
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2956,7 +3320,7 @@ var Namespaces = class {
|
|
|
2956
3320
|
body: _response.error.rawBody
|
|
2957
3321
|
});
|
|
2958
3322
|
case "timeout":
|
|
2959
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3323
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
|
|
2960
3324
|
case "unknown":
|
|
2961
3325
|
throw new RivetError({
|
|
2962
3326
|
message: _response.error.errorMessage
|
|
@@ -2968,40 +3332,49 @@ var Namespaces = class {
|
|
|
2968
3332
|
}
|
|
2969
3333
|
};
|
|
2970
3334
|
|
|
2971
|
-
// src/api/resources/
|
|
2972
|
-
import
|
|
2973
|
-
var
|
|
3335
|
+
// src/api/resources/namespaces/client/Client.ts
|
|
3336
|
+
import urlJoin6 from "url-join";
|
|
3337
|
+
var Namespaces = class {
|
|
2974
3338
|
constructor(_options) {
|
|
2975
3339
|
this._options = _options;
|
|
2976
3340
|
}
|
|
2977
3341
|
/**
|
|
2978
|
-
*
|
|
2979
|
-
*
|
|
2980
|
-
* @param {Rivet.PoolsListRequest} request
|
|
2981
|
-
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3342
|
+
* @param {Rivet.NamespacesListRequest} request
|
|
3343
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
2982
3344
|
*
|
|
2983
3345
|
* @example
|
|
2984
|
-
* await client.
|
|
2985
|
-
* namespace: "namespace"
|
|
2986
|
-
* })
|
|
3346
|
+
* await client.namespaces.list()
|
|
2987
3347
|
*/
|
|
2988
|
-
async list(request, requestOptions) {
|
|
2989
|
-
const {
|
|
3348
|
+
async list(request = {}, requestOptions) {
|
|
3349
|
+
const { limit, cursor, name, namespaceIds, namespaceId } = request;
|
|
2990
3350
|
const _queryParams = {};
|
|
2991
|
-
if (namespace != null)
|
|
2992
|
-
_queryParams["namespace"] = namespace;
|
|
2993
3351
|
if (limit != null) {
|
|
2994
3352
|
_queryParams["limit"] = limit.toString();
|
|
2995
3353
|
}
|
|
2996
3354
|
if (cursor != null) {
|
|
2997
3355
|
_queryParams["cursor"] = cursor;
|
|
2998
3356
|
}
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
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
|
+
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3373
|
+
url: urlJoin6(
|
|
3374
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3375
|
+
"namespaces"
|
|
3376
|
+
),
|
|
3377
|
+
method: "GET",
|
|
3005
3378
|
headers: {
|
|
3006
3379
|
Authorization: await this._getAuthorizationHeader(),
|
|
3007
3380
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3017,7 +3390,7 @@ var Pools = class {
|
|
|
3017
3390
|
abortSignal: requestOptions?.abortSignal
|
|
3018
3391
|
});
|
|
3019
3392
|
if (_response.ok) {
|
|
3020
|
-
return
|
|
3393
|
+
return NamespaceListResponse.parseOrThrow(_response.body, {
|
|
3021
3394
|
unrecognizedObjectKeys: "passthrough",
|
|
3022
3395
|
allowUnrecognizedUnionMembers: true,
|
|
3023
3396
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3038,7 +3411,7 @@ var Pools = class {
|
|
|
3038
3411
|
body: _response.error.rawBody
|
|
3039
3412
|
});
|
|
3040
3413
|
case "timeout":
|
|
3041
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3414
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
|
|
3042
3415
|
case "unknown":
|
|
3043
3416
|
throw new RivetError({
|
|
3044
3417
|
message: _response.error.errorMessage
|
|
@@ -3046,34 +3419,22 @@ var Pools = class {
|
|
|
3046
3419
|
}
|
|
3047
3420
|
}
|
|
3048
3421
|
/**
|
|
3049
|
-
*
|
|
3050
|
-
*
|
|
3051
|
-
* @param {string} pool
|
|
3052
|
-
* @param {Rivet.PoolsListNodesRequest} request
|
|
3053
|
-
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3422
|
+
* @param {Rivet.NamespacesCreateRequest} request
|
|
3423
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3054
3424
|
*
|
|
3055
3425
|
* @example
|
|
3056
|
-
* await client.
|
|
3057
|
-
*
|
|
3426
|
+
* await client.namespaces.create({
|
|
3427
|
+
* displayName: "display_name",
|
|
3428
|
+
* name: "name"
|
|
3058
3429
|
* })
|
|
3059
3430
|
*/
|
|
3060
|
-
async
|
|
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
|
-
}
|
|
3431
|
+
async create(request, requestOptions) {
|
|
3071
3432
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3072
|
-
url:
|
|
3433
|
+
url: urlJoin6(
|
|
3073
3434
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3074
|
-
|
|
3435
|
+
"namespaces"
|
|
3075
3436
|
),
|
|
3076
|
-
method: "
|
|
3437
|
+
method: "POST",
|
|
3077
3438
|
headers: {
|
|
3078
3439
|
Authorization: await this._getAuthorizationHeader(),
|
|
3079
3440
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3082,14 +3443,14 @@ var Pools = class {
|
|
|
3082
3443
|
...requestOptions?.headers
|
|
3083
3444
|
},
|
|
3084
3445
|
contentType: "application/json",
|
|
3085
|
-
queryParameters: _queryParams,
|
|
3086
3446
|
requestType: "json",
|
|
3447
|
+
body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
3087
3448
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3088
3449
|
maxRetries: requestOptions?.maxRetries,
|
|
3089
3450
|
abortSignal: requestOptions?.abortSignal
|
|
3090
3451
|
});
|
|
3091
3452
|
if (_response.ok) {
|
|
3092
|
-
return
|
|
3453
|
+
return NamespacesCreateResponse.parseOrThrow(_response.body, {
|
|
3093
3454
|
unrecognizedObjectKeys: "passthrough",
|
|
3094
3455
|
allowUnrecognizedUnionMembers: true,
|
|
3095
3456
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3110,21 +3471,65 @@ var Pools = class {
|
|
|
3110
3471
|
body: _response.error.rawBody
|
|
3111
3472
|
});
|
|
3112
3473
|
case "timeout":
|
|
3113
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3474
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
|
|
3114
3475
|
case "unknown":
|
|
3115
3476
|
throw new RivetError({
|
|
3116
3477
|
message: _response.error.errorMessage
|
|
3117
3478
|
});
|
|
3118
3479
|
}
|
|
3119
3480
|
}
|
|
3120
|
-
async
|
|
3481
|
+
async _getAuthorizationHeader() {
|
|
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;
|
|
3121
3503
|
const _queryParams = {};
|
|
3122
|
-
|
|
3123
|
-
|
|
3504
|
+
_queryParams["namespace"] = namespace;
|
|
3505
|
+
if (name != null) {
|
|
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
|
+
}
|
|
3124
3529
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3125
|
-
url:
|
|
3530
|
+
url: urlJoin7(
|
|
3126
3531
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3127
|
-
|
|
3532
|
+
"runners"
|
|
3128
3533
|
),
|
|
3129
3534
|
method: "GET",
|
|
3130
3535
|
headers: {
|
|
@@ -3142,7 +3547,7 @@ var Pools = class {
|
|
|
3142
3547
|
abortSignal: requestOptions?.abortSignal
|
|
3143
3548
|
});
|
|
3144
3549
|
if (_response.ok) {
|
|
3145
|
-
return
|
|
3550
|
+
return RunnersListResponse.parseOrThrow(_response.body, {
|
|
3146
3551
|
unrecognizedObjectKeys: "passthrough",
|
|
3147
3552
|
allowUnrecognizedUnionMembers: true,
|
|
3148
3553
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3163,23 +3568,43 @@ var Pools = class {
|
|
|
3163
3568
|
body: _response.error.rawBody
|
|
3164
3569
|
});
|
|
3165
3570
|
case "timeout":
|
|
3166
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3571
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
|
|
3167
3572
|
case "unknown":
|
|
3168
3573
|
throw new RivetError({
|
|
3169
3574
|
message: _response.error.errorMessage
|
|
3170
3575
|
});
|
|
3171
3576
|
}
|
|
3172
3577
|
}
|
|
3173
|
-
|
|
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;
|
|
3174
3594
|
const _queryParams = {};
|
|
3175
|
-
|
|
3176
|
-
|
|
3595
|
+
_queryParams["namespace"] = namespace;
|
|
3596
|
+
if (limit != null) {
|
|
3597
|
+
_queryParams["limit"] = limit.toString();
|
|
3598
|
+
}
|
|
3599
|
+
if (cursor != null) {
|
|
3600
|
+
_queryParams["cursor"] = cursor;
|
|
3601
|
+
}
|
|
3177
3602
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3178
|
-
url:
|
|
3603
|
+
url: urlJoin7(
|
|
3179
3604
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3180
|
-
|
|
3605
|
+
"runners/names"
|
|
3181
3606
|
),
|
|
3182
|
-
method: "
|
|
3607
|
+
method: "GET",
|
|
3183
3608
|
headers: {
|
|
3184
3609
|
Authorization: await this._getAuthorizationHeader(),
|
|
3185
3610
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3190,19 +3615,12 @@ var Pools = class {
|
|
|
3190
3615
|
contentType: "application/json",
|
|
3191
3616
|
queryParameters: _queryParams,
|
|
3192
3617
|
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
|
-
},
|
|
3200
3618
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3201
3619
|
maxRetries: requestOptions?.maxRetries,
|
|
3202
3620
|
abortSignal: requestOptions?.abortSignal
|
|
3203
3621
|
});
|
|
3204
3622
|
if (_response.ok) {
|
|
3205
|
-
return
|
|
3623
|
+
return RunnersListNamesResponse.parseOrThrow(_response.body, {
|
|
3206
3624
|
unrecognizedObjectKeys: "passthrough",
|
|
3207
3625
|
allowUnrecognizedUnionMembers: true,
|
|
3208
3626
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3223,54 +3641,7 @@ var Pools = class {
|
|
|
3223
3641
|
body: _response.error.rawBody
|
|
3224
3642
|
});
|
|
3225
3643
|
case "timeout":
|
|
3226
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
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}.");
|
|
3644
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
|
|
3274
3645
|
case "unknown":
|
|
3275
3646
|
throw new RivetError({
|
|
3276
3647
|
message: _response.error.errorMessage
|
|
@@ -3289,23 +3660,31 @@ var RivetClient = class {
|
|
|
3289
3660
|
}
|
|
3290
3661
|
_authTokens;
|
|
3291
3662
|
_datacenters;
|
|
3663
|
+
_envoys;
|
|
3664
|
+
_health;
|
|
3292
3665
|
_metadata;
|
|
3293
3666
|
_namespaces;
|
|
3294
|
-
|
|
3667
|
+
_runners;
|
|
3295
3668
|
get authTokens() {
|
|
3296
3669
|
return this._authTokens ??= new AuthTokens(this._options);
|
|
3297
3670
|
}
|
|
3298
3671
|
get datacenters() {
|
|
3299
3672
|
return this._datacenters ??= new Datacenters(this._options);
|
|
3300
3673
|
}
|
|
3674
|
+
get envoys() {
|
|
3675
|
+
return this._envoys ??= new Envoys(this._options);
|
|
3676
|
+
}
|
|
3677
|
+
get health() {
|
|
3678
|
+
return this._health ??= new Health(this._options);
|
|
3679
|
+
}
|
|
3301
3680
|
get metadata() {
|
|
3302
3681
|
return this._metadata ??= new Metadata(this._options);
|
|
3303
3682
|
}
|
|
3304
3683
|
get namespaces() {
|
|
3305
3684
|
return this._namespaces ??= new Namespaces(this._options);
|
|
3306
3685
|
}
|
|
3307
|
-
get
|
|
3308
|
-
return this.
|
|
3686
|
+
get runners() {
|
|
3687
|
+
return this._runners ??= new Runners(this._options);
|
|
3309
3688
|
}
|
|
3310
3689
|
/**
|
|
3311
3690
|
* **If key is some & `include_destroyed` is false**
|
|
@@ -3342,8 +3721,7 @@ var RivetClient = class {
|
|
|
3342
3721
|
async actorsList(request, requestOptions) {
|
|
3343
3722
|
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3344
3723
|
const _queryParams = {};
|
|
3345
|
-
|
|
3346
|
-
_queryParams["namespace"] = namespace;
|
|
3724
|
+
_queryParams["namespace"] = namespace;
|
|
3347
3725
|
if (name != null) {
|
|
3348
3726
|
_queryParams["name"] = name;
|
|
3349
3727
|
}
|
|
@@ -3353,8 +3731,15 @@ var RivetClient = class {
|
|
|
3353
3731
|
if (actorIds != null) {
|
|
3354
3732
|
_queryParams["actor_ids"] = actorIds;
|
|
3355
3733
|
}
|
|
3356
|
-
if (actorId != null)
|
|
3357
|
-
|
|
3734
|
+
if (actorId != null) {
|
|
3735
|
+
if (Array.isArray(actorId)) {
|
|
3736
|
+
_queryParams["actor_id"] = actorId.map(
|
|
3737
|
+
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3738
|
+
);
|
|
3739
|
+
} else {
|
|
3740
|
+
_queryParams["actor_id"] = actorId;
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3358
3743
|
if (includeDestroyed != null) {
|
|
3359
3744
|
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3360
3745
|
}
|
|
@@ -3365,7 +3750,7 @@ var RivetClient = class {
|
|
|
3365
3750
|
_queryParams["cursor"] = cursor;
|
|
3366
3751
|
}
|
|
3367
3752
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3368
|
-
url:
|
|
3753
|
+
url: urlJoin8(
|
|
3369
3754
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3370
3755
|
"actors"
|
|
3371
3756
|
),
|
|
@@ -3437,17 +3822,17 @@ var RivetClient = class {
|
|
|
3437
3822
|
* @example
|
|
3438
3823
|
* await client.actorsCreate({
|
|
3439
3824
|
* namespace: "namespace",
|
|
3825
|
+
* crashPolicy: "restart",
|
|
3440
3826
|
* name: "name",
|
|
3441
|
-
*
|
|
3827
|
+
* runnerNameSelector: "runner_name_selector"
|
|
3442
3828
|
* })
|
|
3443
3829
|
*/
|
|
3444
3830
|
async actorsCreate(request, requestOptions) {
|
|
3445
3831
|
const { namespace, ..._body } = request;
|
|
3446
3832
|
const _queryParams = {};
|
|
3447
|
-
|
|
3448
|
-
_queryParams["namespace"] = namespace;
|
|
3833
|
+
_queryParams["namespace"] = namespace;
|
|
3449
3834
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3450
|
-
url:
|
|
3835
|
+
url: urlJoin8(
|
|
3451
3836
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3452
3837
|
"actors"
|
|
3453
3838
|
),
|
|
@@ -3529,18 +3914,18 @@ var RivetClient = class {
|
|
|
3529
3914
|
* @example
|
|
3530
3915
|
* await client.actorsGetOrCreate({
|
|
3531
3916
|
* namespace: "namespace",
|
|
3917
|
+
* crashPolicy: "restart",
|
|
3532
3918
|
* key: "key",
|
|
3533
3919
|
* name: "name",
|
|
3534
|
-
*
|
|
3920
|
+
* runnerNameSelector: "runner_name_selector"
|
|
3535
3921
|
* })
|
|
3536
3922
|
*/
|
|
3537
3923
|
async actorsGetOrCreate(request, requestOptions) {
|
|
3538
3924
|
const { namespace, ..._body } = request;
|
|
3539
3925
|
const _queryParams = {};
|
|
3540
|
-
|
|
3541
|
-
_queryParams["namespace"] = namespace;
|
|
3926
|
+
_queryParams["namespace"] = namespace;
|
|
3542
3927
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3543
|
-
url:
|
|
3928
|
+
url: urlJoin8(
|
|
3544
3929
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3545
3930
|
"actors"
|
|
3546
3931
|
),
|
|
@@ -3606,8 +3991,7 @@ var RivetClient = class {
|
|
|
3606
3991
|
async actorsListNames(request, requestOptions) {
|
|
3607
3992
|
const { namespace, limit, cursor } = request;
|
|
3608
3993
|
const _queryParams = {};
|
|
3609
|
-
|
|
3610
|
-
_queryParams["namespace"] = namespace;
|
|
3994
|
+
_queryParams["namespace"] = namespace;
|
|
3611
3995
|
if (limit != null) {
|
|
3612
3996
|
_queryParams["limit"] = limit.toString();
|
|
3613
3997
|
}
|
|
@@ -3615,7 +3999,7 @@ var RivetClient = class {
|
|
|
3615
3999
|
_queryParams["cursor"] = cursor;
|
|
3616
4000
|
}
|
|
3617
4001
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3618
|
-
url:
|
|
4002
|
+
url: urlJoin8(
|
|
3619
4003
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3620
4004
|
"actors/names"
|
|
3621
4005
|
),
|
|
@@ -3678,18 +4062,16 @@ var RivetClient = class {
|
|
|
3678
4062
|
* namespace: "namespace"
|
|
3679
4063
|
* })
|
|
3680
4064
|
*/
|
|
3681
|
-
|
|
3682
|
-
async actorsGet(actorId, request, requestOptions) {
|
|
4065
|
+
async actorsDelete(actorId, request, requestOptions) {
|
|
3683
4066
|
const { namespace } = request;
|
|
3684
4067
|
const _queryParams = {};
|
|
3685
|
-
|
|
3686
|
-
_queryParams["namespace"] = namespace;
|
|
4068
|
+
_queryParams["namespace"] = namespace;
|
|
3687
4069
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3688
|
-
url:
|
|
4070
|
+
url: urlJoin8(
|
|
3689
4071
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3690
4072
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
3691
4073
|
),
|
|
3692
|
-
method: "
|
|
4074
|
+
method: "DELETE",
|
|
3693
4075
|
headers: {
|
|
3694
4076
|
Authorization: await this._getAuthorizationHeader(),
|
|
3695
4077
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3705,7 +4087,7 @@ var RivetClient = class {
|
|
|
3705
4087
|
abortSignal: requestOptions?.abortSignal
|
|
3706
4088
|
});
|
|
3707
4089
|
if (_response.ok) {
|
|
3708
|
-
return
|
|
4090
|
+
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
3709
4091
|
unrecognizedObjectKeys: "passthrough",
|
|
3710
4092
|
allowUnrecognizedUnionMembers: true,
|
|
3711
4093
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3726,24 +4108,34 @@ var RivetClient = class {
|
|
|
3726
4108
|
body: _response.error.rawBody
|
|
3727
4109
|
});
|
|
3728
4110
|
case "timeout":
|
|
3729
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
4111
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
3730
4112
|
case "unknown":
|
|
3731
4113
|
throw new RivetError({
|
|
3732
4114
|
message: _response.error.errorMessage
|
|
3733
4115
|
});
|
|
3734
4116
|
}
|
|
3735
4117
|
}
|
|
3736
|
-
|
|
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) {
|
|
3737
4130
|
const { namespace } = request;
|
|
3738
4131
|
const _queryParams = {};
|
|
3739
|
-
|
|
3740
|
-
_queryParams["namespace"] = namespace;
|
|
4132
|
+
_queryParams["namespace"] = namespace;
|
|
3741
4133
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3742
|
-
url:
|
|
4134
|
+
url: urlJoin8(
|
|
3743
4135
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3744
|
-
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4136
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
|
|
3745
4137
|
),
|
|
3746
|
-
method: "
|
|
4138
|
+
method: "GET",
|
|
3747
4139
|
headers: {
|
|
3748
4140
|
Authorization: await this._getAuthorizationHeader(),
|
|
3749
4141
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3759,7 +4151,7 @@ var RivetClient = class {
|
|
|
3759
4151
|
abortSignal: requestOptions?.abortSignal
|
|
3760
4152
|
});
|
|
3761
4153
|
if (_response.ok) {
|
|
3762
|
-
return
|
|
4154
|
+
return ActorsKvGetResponse.parseOrThrow(_response.body, {
|
|
3763
4155
|
unrecognizedObjectKeys: "passthrough",
|
|
3764
4156
|
allowUnrecognizedUnionMembers: true,
|
|
3765
4157
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3780,7 +4172,9 @@ var RivetClient = class {
|
|
|
3780
4172
|
body: _response.error.rawBody
|
|
3781
4173
|
});
|
|
3782
4174
|
case "timeout":
|
|
3783
|
-
throw new RivetTimeoutError(
|
|
4175
|
+
throw new RivetTimeoutError(
|
|
4176
|
+
"Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
|
|
4177
|
+
);
|
|
3784
4178
|
case "unknown":
|
|
3785
4179
|
throw new RivetError({
|
|
3786
4180
|
message: _response.error.errorMessage
|
|
@@ -3795,15 +4189,17 @@ var RivetClient = class {
|
|
|
3795
4189
|
* @example
|
|
3796
4190
|
* await client.actorsReschedule("actor_id", {
|
|
3797
4191
|
* namespace: "namespace",
|
|
4192
|
+
* body: {
|
|
4193
|
+
* "key": "value"
|
|
4194
|
+
* }
|
|
3798
4195
|
* })
|
|
3799
4196
|
*/
|
|
3800
4197
|
async actorsReschedule(actorId, request, requestOptions) {
|
|
3801
|
-
const { namespace } = request;
|
|
4198
|
+
const { namespace, body: _body } = request;
|
|
3802
4199
|
const _queryParams = {};
|
|
3803
|
-
|
|
3804
|
-
_queryParams["namespace"] = namespace;
|
|
4200
|
+
_queryParams["namespace"] = namespace;
|
|
3805
4201
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3806
|
-
url:
|
|
4202
|
+
url: urlJoin8(
|
|
3807
4203
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3808
4204
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
|
|
3809
4205
|
),
|
|
@@ -3818,6 +4214,7 @@ var RivetClient = class {
|
|
|
3818
4214
|
contentType: "application/json",
|
|
3819
4215
|
queryParameters: _queryParams,
|
|
3820
4216
|
requestType: "json",
|
|
4217
|
+
body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3821
4218
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3822
4219
|
maxRetries: requestOptions?.maxRetries,
|
|
3823
4220
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3859,15 +4256,17 @@ var RivetClient = class {
|
|
|
3859
4256
|
* @example
|
|
3860
4257
|
* await client.actorsSleep("actor_id", {
|
|
3861
4258
|
* namespace: "namespace",
|
|
4259
|
+
* body: {
|
|
4260
|
+
* "key": "value"
|
|
4261
|
+
* }
|
|
3862
4262
|
* })
|
|
3863
4263
|
*/
|
|
3864
4264
|
async actorsSleep(actorId, request, requestOptions) {
|
|
3865
|
-
const { namespace } = request;
|
|
4265
|
+
const { namespace, body: _body } = request;
|
|
3866
4266
|
const _queryParams = {};
|
|
3867
|
-
|
|
3868
|
-
_queryParams["namespace"] = namespace;
|
|
4267
|
+
_queryParams["namespace"] = namespace;
|
|
3869
4268
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3870
|
-
url:
|
|
4269
|
+
url: urlJoin8(
|
|
3871
4270
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3872
4271
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
|
|
3873
4272
|
),
|
|
@@ -3882,6 +4281,7 @@ var RivetClient = class {
|
|
|
3882
4281
|
contentType: "application/json",
|
|
3883
4282
|
queryParameters: _queryParams,
|
|
3884
4283
|
requestType: "json",
|
|
4284
|
+
body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3885
4285
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3886
4286
|
maxRetries: requestOptions?.maxRetries,
|
|
3887
4287
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3915,6 +4315,360 @@ var RivetClient = class {
|
|
|
3915
4315
|
});
|
|
3916
4316
|
}
|
|
3917
4317
|
}
|
|
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
|
+
}
|
|
3918
4672
|
async _getAuthorizationHeader() {
|
|
3919
4673
|
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3920
4674
|
}
|