@rivetkit/engine-api-full 0.0.0-sqlite-sync-3x-release.a00b07f → 0.0.0-sqlite-query-metrics-v2.f5d3605
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 -326
- package/dist/browser/cjs/serialization.js +379 -93
- package/dist/browser/esm/index.js +1081 -326
- package/dist/browser/esm/serialization.js +379 -93
- package/dist/node/cjs/index.js +1081 -326
- package/dist/node/cjs/serialization.js +421 -103
- package/dist/node/esm/index.js +1081 -326
- package/dist/node/esm/serialization.js +379 -93
- 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 -18
- 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 -16
- 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,75 +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(),
|
|
2625
|
+
// src/serialization/types/Runner.ts
|
|
2626
|
+
var Runner = schemas_exports.object({
|
|
2467
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()),
|
|
2468
2632
|
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2469
|
-
|
|
2470
|
-
|
|
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()
|
|
2471
2642
|
});
|
|
2472
2643
|
|
|
2473
|
-
// src/serialization/types/
|
|
2474
|
-
var
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
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()
|
|
2481
2722
|
});
|
|
2482
2723
|
|
|
2483
|
-
// src/serialization/types/
|
|
2484
|
-
var
|
|
2485
|
-
|
|
2724
|
+
// src/serialization/types/RunnerConfigKindServerless.ts
|
|
2725
|
+
var RunnerConfigKindServerless = schemas_exports.object({
|
|
2726
|
+
serverless: RunnerConfigKindServerlessServerless
|
|
2486
2727
|
});
|
|
2487
2728
|
|
|
2488
|
-
// src/serialization/types/
|
|
2489
|
-
var
|
|
2729
|
+
// src/serialization/types/RunnerConfigKind.ts
|
|
2730
|
+
var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
|
|
2490
2731
|
|
|
2491
|
-
// src/serialization/types/
|
|
2492
|
-
var
|
|
2493
|
-
|
|
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()),
|
|
2494
2808
|
pagination: Pagination
|
|
2495
2809
|
});
|
|
2496
2810
|
|
|
2497
|
-
// src/serialization/types/
|
|
2498
|
-
var
|
|
2811
|
+
// src/serialization/types/RunnersListResponse.ts
|
|
2812
|
+
var RunnersListResponse = schemas_exports.object({
|
|
2499
2813
|
pagination: Pagination,
|
|
2500
|
-
|
|
2814
|
+
runners: schemas_exports.list(Runner)
|
|
2501
2815
|
});
|
|
2502
2816
|
|
|
2503
2817
|
// src/serialization/client/requests/ActorsCreateRequest.ts
|
|
2504
2818
|
var ActorsCreateRequest = schemas_exports.object({
|
|
2819
|
+
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2820
|
+
datacenter: schemas_exports.string().optional(),
|
|
2505
2821
|
input: schemas_exports.string().optional(),
|
|
2506
2822
|
key: schemas_exports.string().optional(),
|
|
2507
2823
|
name: schemas_exports.string(),
|
|
2508
|
-
|
|
2824
|
+
runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
|
|
2509
2825
|
});
|
|
2510
2826
|
|
|
2511
2827
|
// src/serialization/client/requests/ActorsGetOrCreateRequest.ts
|
|
2512
2828
|
var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
2829
|
+
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2830
|
+
datacenter: schemas_exports.string().optional(),
|
|
2513
2831
|
input: schemas_exports.string().optional(),
|
|
2514
|
-
key: schemas_exports.string()
|
|
2832
|
+
key: schemas_exports.string(),
|
|
2515
2833
|
name: schemas_exports.string(),
|
|
2516
|
-
|
|
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()
|
|
2517
2860
|
});
|
|
2518
2861
|
|
|
2519
2862
|
// src/serialization/resources/namespaces/index.ts
|
|
2520
|
-
var
|
|
2521
|
-
__export(
|
|
2863
|
+
var namespaces_exports2 = {};
|
|
2864
|
+
__export(namespaces_exports2, {
|
|
2522
2865
|
NamespacesCreateRequest: () => NamespacesCreateRequest
|
|
2523
2866
|
});
|
|
2524
2867
|
|
|
2525
2868
|
// src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
|
|
2526
2869
|
var NamespacesCreateRequest = schemas_exports.object({
|
|
2870
|
+
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2527
2871
|
name: schemas_exports.string()
|
|
2528
2872
|
});
|
|
2529
2873
|
|
|
2874
|
+
// src/Client.ts
|
|
2875
|
+
import urlJoin8 from "url-join";
|
|
2876
|
+
|
|
2530
2877
|
// src/errors/RivetError.ts
|
|
2531
2878
|
var RivetError = class _RivetError extends Error {
|
|
2532
2879
|
statusCode;
|
|
@@ -2569,10 +2916,25 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
|
|
|
2569
2916
|
};
|
|
2570
2917
|
|
|
2571
2918
|
// src/api/resources/authTokens/client/Client.ts
|
|
2919
|
+
import urlJoin from "url-join";
|
|
2572
2920
|
var AuthTokens = class {
|
|
2573
2921
|
constructor(_options) {
|
|
2574
2922
|
this._options = _options;
|
|
2575
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
|
+
*/
|
|
2576
2938
|
async create(request, requestOptions) {
|
|
2577
2939
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2578
2940
|
url: urlJoin(
|
|
@@ -2589,12 +2951,7 @@ var AuthTokens = class {
|
|
|
2589
2951
|
},
|
|
2590
2952
|
contentType: "application/json",
|
|
2591
2953
|
requestType: "json",
|
|
2592
|
-
body: {
|
|
2593
|
-
namespace: request.namespace,
|
|
2594
|
-
duration: request.duration,
|
|
2595
|
-
subject: request.subject,
|
|
2596
|
-
grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
|
|
2597
|
-
},
|
|
2954
|
+
body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
2598
2955
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2599
2956
|
maxRetries: requestOptions?.maxRetries,
|
|
2600
2957
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -2628,6 +2985,12 @@ var AuthTokens = class {
|
|
|
2628
2985
|
});
|
|
2629
2986
|
}
|
|
2630
2987
|
}
|
|
2988
|
+
/**
|
|
2989
|
+
* @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
2990
|
+
*
|
|
2991
|
+
* @example
|
|
2992
|
+
* await client.authTokens.inspect()
|
|
2993
|
+
*/
|
|
2631
2994
|
async inspect(requestOptions) {
|
|
2632
2995
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2633
2996
|
url: urlJoin(
|
|
@@ -2682,21 +3045,6 @@ var AuthTokens = class {
|
|
|
2682
3045
|
}
|
|
2683
3046
|
};
|
|
2684
3047
|
|
|
2685
|
-
// src/api/resources/datacenters/index.ts
|
|
2686
|
-
var datacenters_exports = {};
|
|
2687
|
-
|
|
2688
|
-
// src/api/resources/metadata/index.ts
|
|
2689
|
-
var metadata_exports = {};
|
|
2690
|
-
|
|
2691
|
-
// src/api/resources/namespaces/index.ts
|
|
2692
|
-
var namespaces_exports2 = {};
|
|
2693
|
-
|
|
2694
|
-
// src/api/resources/pools/index.ts
|
|
2695
|
-
var pools_exports = {};
|
|
2696
|
-
|
|
2697
|
-
// src/Client.ts
|
|
2698
|
-
import urlJoin6 from "url-join";
|
|
2699
|
-
|
|
2700
3048
|
// src/api/resources/datacenters/client/Client.ts
|
|
2701
3049
|
import urlJoin2 from "url-join";
|
|
2702
3050
|
var Datacenters = class {
|
|
@@ -2763,23 +3111,45 @@ var Datacenters = class {
|
|
|
2763
3111
|
}
|
|
2764
3112
|
};
|
|
2765
3113
|
|
|
2766
|
-
// src/api/resources/
|
|
3114
|
+
// src/api/resources/envoys/client/Client.ts
|
|
2767
3115
|
import urlJoin3 from "url-join";
|
|
2768
|
-
var
|
|
3116
|
+
var Envoys = class {
|
|
2769
3117
|
constructor(_options) {
|
|
2770
3118
|
this._options = _options;
|
|
2771
3119
|
}
|
|
2772
3120
|
/**
|
|
2773
|
-
* @param {
|
|
3121
|
+
* @param {Rivet.EnvoysListRequest} request
|
|
3122
|
+
* @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
|
|
2774
3123
|
*
|
|
2775
3124
|
* @example
|
|
2776
|
-
* await client.
|
|
3125
|
+
* await client.envoys.list({
|
|
3126
|
+
* namespace: "namespace"
|
|
3127
|
+
* })
|
|
2777
3128
|
*/
|
|
2778
|
-
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
|
+
}
|
|
2779
3149
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2780
3150
|
url: urlJoin3(
|
|
2781
3151
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2782
|
-
"
|
|
3152
|
+
"envoys"
|
|
2783
3153
|
),
|
|
2784
3154
|
method: "GET",
|
|
2785
3155
|
headers: {
|
|
@@ -2790,13 +3160,14 @@ var Metadata = class {
|
|
|
2790
3160
|
...requestOptions?.headers
|
|
2791
3161
|
},
|
|
2792
3162
|
contentType: "application/json",
|
|
3163
|
+
queryParameters: _queryParams,
|
|
2793
3164
|
requestType: "json",
|
|
2794
3165
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2795
3166
|
maxRetries: requestOptions?.maxRetries,
|
|
2796
3167
|
abortSignal: requestOptions?.abortSignal
|
|
2797
3168
|
});
|
|
2798
3169
|
if (_response.ok) {
|
|
2799
|
-
return
|
|
3170
|
+
return EnvoysListResponse.parseOrThrow(_response.body, {
|
|
2800
3171
|
unrecognizedObjectKeys: "passthrough",
|
|
2801
3172
|
allowUnrecognizedUnionMembers: true,
|
|
2802
3173
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2817,7 +3188,7 @@ var Metadata = class {
|
|
|
2817
3188
|
body: _response.error.rawBody
|
|
2818
3189
|
});
|
|
2819
3190
|
case "timeout":
|
|
2820
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3191
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
|
|
2821
3192
|
case "unknown":
|
|
2822
3193
|
throw new RivetError({
|
|
2823
3194
|
message: _response.error.errorMessage
|
|
@@ -2829,35 +3200,23 @@ var Metadata = class {
|
|
|
2829
3200
|
}
|
|
2830
3201
|
};
|
|
2831
3202
|
|
|
2832
|
-
// src/api/resources/
|
|
3203
|
+
// src/api/resources/health/client/Client.ts
|
|
2833
3204
|
import urlJoin4 from "url-join";
|
|
2834
|
-
var
|
|
3205
|
+
var Health = class {
|
|
2835
3206
|
constructor(_options) {
|
|
2836
3207
|
this._options = _options;
|
|
2837
3208
|
}
|
|
2838
3209
|
/**
|
|
2839
|
-
* @param {
|
|
2840
|
-
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3210
|
+
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
2841
3211
|
*
|
|
2842
3212
|
* @example
|
|
2843
|
-
* await client.
|
|
3213
|
+
* await client.health.fanout()
|
|
2844
3214
|
*/
|
|
2845
|
-
async
|
|
2846
|
-
const { limit, cursor, name } = request;
|
|
2847
|
-
const _queryParams = {};
|
|
2848
|
-
if (limit != null) {
|
|
2849
|
-
_queryParams["limit"] = limit.toString();
|
|
2850
|
-
}
|
|
2851
|
-
if (cursor != null) {
|
|
2852
|
-
_queryParams["cursor"] = cursor;
|
|
2853
|
-
}
|
|
2854
|
-
if (name != null) {
|
|
2855
|
-
_queryParams["name"] = name;
|
|
2856
|
-
}
|
|
3215
|
+
async fanout(requestOptions) {
|
|
2857
3216
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2858
3217
|
url: urlJoin4(
|
|
2859
3218
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2860
|
-
"
|
|
3219
|
+
"health/fanout"
|
|
2861
3220
|
),
|
|
2862
3221
|
method: "GET",
|
|
2863
3222
|
headers: {
|
|
@@ -2868,14 +3227,13 @@ var Namespaces = class {
|
|
|
2868
3227
|
...requestOptions?.headers
|
|
2869
3228
|
},
|
|
2870
3229
|
contentType: "application/json",
|
|
2871
|
-
queryParameters: _queryParams,
|
|
2872
3230
|
requestType: "json",
|
|
2873
3231
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2874
3232
|
maxRetries: requestOptions?.maxRetries,
|
|
2875
3233
|
abortSignal: requestOptions?.abortSignal
|
|
2876
3234
|
});
|
|
2877
3235
|
if (_response.ok) {
|
|
2878
|
-
return
|
|
3236
|
+
return HealthFanoutResponse.parseOrThrow(_response.body, {
|
|
2879
3237
|
unrecognizedObjectKeys: "passthrough",
|
|
2880
3238
|
allowUnrecognizedUnionMembers: true,
|
|
2881
3239
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2896,29 +3254,37 @@ var Namespaces = class {
|
|
|
2896
3254
|
body: _response.error.rawBody
|
|
2897
3255
|
});
|
|
2898
3256
|
case "timeout":
|
|
2899
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3257
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
|
|
2900
3258
|
case "unknown":
|
|
2901
3259
|
throw new RivetError({
|
|
2902
3260
|
message: _response.error.errorMessage
|
|
2903
3261
|
});
|
|
2904
3262
|
}
|
|
2905
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
|
+
}
|
|
2906
3275
|
/**
|
|
2907
|
-
* @param {
|
|
2908
|
-
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3276
|
+
* @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
|
|
2909
3277
|
*
|
|
2910
3278
|
* @example
|
|
2911
|
-
* await client.
|
|
2912
|
-
* name: "name"
|
|
2913
|
-
* })
|
|
3279
|
+
* await client.metadata.get()
|
|
2914
3280
|
*/
|
|
2915
|
-
async
|
|
3281
|
+
async get(requestOptions) {
|
|
2916
3282
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2917
|
-
url:
|
|
3283
|
+
url: urlJoin5(
|
|
2918
3284
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2919
|
-
"
|
|
3285
|
+
"metadata"
|
|
2920
3286
|
),
|
|
2921
|
-
method: "
|
|
3287
|
+
method: "GET",
|
|
2922
3288
|
headers: {
|
|
2923
3289
|
Authorization: await this._getAuthorizationHeader(),
|
|
2924
3290
|
"X-Fern-Language": "JavaScript",
|
|
@@ -2928,13 +3294,12 @@ var Namespaces = class {
|
|
|
2928
3294
|
},
|
|
2929
3295
|
contentType: "application/json",
|
|
2930
3296
|
requestType: "json",
|
|
2931
|
-
body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
2932
3297
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2933
3298
|
maxRetries: requestOptions?.maxRetries,
|
|
2934
3299
|
abortSignal: requestOptions?.abortSignal
|
|
2935
3300
|
});
|
|
2936
3301
|
if (_response.ok) {
|
|
2937
|
-
return
|
|
3302
|
+
return MetadataGetResponse.parseOrThrow(_response.body, {
|
|
2938
3303
|
unrecognizedObjectKeys: "passthrough",
|
|
2939
3304
|
allowUnrecognizedUnionMembers: true,
|
|
2940
3305
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2955,7 +3320,7 @@ var Namespaces = class {
|
|
|
2955
3320
|
body: _response.error.rawBody
|
|
2956
3321
|
});
|
|
2957
3322
|
case "timeout":
|
|
2958
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3323
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
|
|
2959
3324
|
case "unknown":
|
|
2960
3325
|
throw new RivetError({
|
|
2961
3326
|
message: _response.error.errorMessage
|
|
@@ -2967,40 +3332,49 @@ var Namespaces = class {
|
|
|
2967
3332
|
}
|
|
2968
3333
|
};
|
|
2969
3334
|
|
|
2970
|
-
// src/api/resources/
|
|
2971
|
-
import
|
|
2972
|
-
var
|
|
3335
|
+
// src/api/resources/namespaces/client/Client.ts
|
|
3336
|
+
import urlJoin6 from "url-join";
|
|
3337
|
+
var Namespaces = class {
|
|
2973
3338
|
constructor(_options) {
|
|
2974
3339
|
this._options = _options;
|
|
2975
3340
|
}
|
|
2976
3341
|
/**
|
|
2977
|
-
*
|
|
2978
|
-
*
|
|
2979
|
-
* @param {Rivet.PoolsListRequest} request
|
|
2980
|
-
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3342
|
+
* @param {Rivet.NamespacesListRequest} request
|
|
3343
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
2981
3344
|
*
|
|
2982
3345
|
* @example
|
|
2983
|
-
* await client.
|
|
2984
|
-
* namespace: "namespace"
|
|
2985
|
-
* })
|
|
3346
|
+
* await client.namespaces.list()
|
|
2986
3347
|
*/
|
|
2987
|
-
async list(request, requestOptions) {
|
|
2988
|
-
const {
|
|
3348
|
+
async list(request = {}, requestOptions) {
|
|
3349
|
+
const { limit, cursor, name, namespaceIds, namespaceId } = request;
|
|
2989
3350
|
const _queryParams = {};
|
|
2990
|
-
if (namespace != null)
|
|
2991
|
-
_queryParams["namespace"] = namespace;
|
|
2992
3351
|
if (limit != null) {
|
|
2993
3352
|
_queryParams["limit"] = limit.toString();
|
|
2994
3353
|
}
|
|
2995
3354
|
if (cursor != null) {
|
|
2996
3355
|
_queryParams["cursor"] = cursor;
|
|
2997
3356
|
}
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
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",
|
|
3004
3378
|
headers: {
|
|
3005
3379
|
Authorization: await this._getAuthorizationHeader(),
|
|
3006
3380
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3016,7 +3390,7 @@ var Pools = class {
|
|
|
3016
3390
|
abortSignal: requestOptions?.abortSignal
|
|
3017
3391
|
});
|
|
3018
3392
|
if (_response.ok) {
|
|
3019
|
-
return
|
|
3393
|
+
return NamespaceListResponse.parseOrThrow(_response.body, {
|
|
3020
3394
|
unrecognizedObjectKeys: "passthrough",
|
|
3021
3395
|
allowUnrecognizedUnionMembers: true,
|
|
3022
3396
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3037,7 +3411,7 @@ var Pools = class {
|
|
|
3037
3411
|
body: _response.error.rawBody
|
|
3038
3412
|
});
|
|
3039
3413
|
case "timeout":
|
|
3040
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3414
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
|
|
3041
3415
|
case "unknown":
|
|
3042
3416
|
throw new RivetError({
|
|
3043
3417
|
message: _response.error.errorMessage
|
|
@@ -3045,34 +3419,22 @@ var Pools = class {
|
|
|
3045
3419
|
}
|
|
3046
3420
|
}
|
|
3047
3421
|
/**
|
|
3048
|
-
*
|
|
3049
|
-
*
|
|
3050
|
-
* @param {string} pool
|
|
3051
|
-
* @param {Rivet.PoolsListNodesRequest} request
|
|
3052
|
-
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3422
|
+
* @param {Rivet.NamespacesCreateRequest} request
|
|
3423
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3053
3424
|
*
|
|
3054
3425
|
* @example
|
|
3055
|
-
* await client.
|
|
3056
|
-
*
|
|
3426
|
+
* await client.namespaces.create({
|
|
3427
|
+
* displayName: "display_name",
|
|
3428
|
+
* name: "name"
|
|
3057
3429
|
* })
|
|
3058
3430
|
*/
|
|
3059
|
-
async
|
|
3060
|
-
const { namespace, limit, cursor } = request;
|
|
3061
|
-
const _queryParams = {};
|
|
3062
|
-
if (namespace != null)
|
|
3063
|
-
_queryParams["namespace"] = namespace;
|
|
3064
|
-
if (limit != null) {
|
|
3065
|
-
_queryParams["limit"] = limit.toString();
|
|
3066
|
-
}
|
|
3067
|
-
if (cursor != null) {
|
|
3068
|
-
_queryParams["cursor"] = cursor;
|
|
3069
|
-
}
|
|
3431
|
+
async create(request, requestOptions) {
|
|
3070
3432
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3071
|
-
url:
|
|
3433
|
+
url: urlJoin6(
|
|
3072
3434
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3073
|
-
|
|
3435
|
+
"namespaces"
|
|
3074
3436
|
),
|
|
3075
|
-
method: "
|
|
3437
|
+
method: "POST",
|
|
3076
3438
|
headers: {
|
|
3077
3439
|
Authorization: await this._getAuthorizationHeader(),
|
|
3078
3440
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3081,14 +3443,14 @@ var Pools = class {
|
|
|
3081
3443
|
...requestOptions?.headers
|
|
3082
3444
|
},
|
|
3083
3445
|
contentType: "application/json",
|
|
3084
|
-
queryParameters: _queryParams,
|
|
3085
3446
|
requestType: "json",
|
|
3447
|
+
body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
3086
3448
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3087
3449
|
maxRetries: requestOptions?.maxRetries,
|
|
3088
3450
|
abortSignal: requestOptions?.abortSignal
|
|
3089
3451
|
});
|
|
3090
3452
|
if (_response.ok) {
|
|
3091
|
-
return
|
|
3453
|
+
return NamespacesCreateResponse.parseOrThrow(_response.body, {
|
|
3092
3454
|
unrecognizedObjectKeys: "passthrough",
|
|
3093
3455
|
allowUnrecognizedUnionMembers: true,
|
|
3094
3456
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3109,21 +3471,65 @@ var Pools = class {
|
|
|
3109
3471
|
body: _response.error.rawBody
|
|
3110
3472
|
});
|
|
3111
3473
|
case "timeout":
|
|
3112
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3474
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
|
|
3113
3475
|
case "unknown":
|
|
3114
3476
|
throw new RivetError({
|
|
3115
3477
|
message: _response.error.errorMessage
|
|
3116
3478
|
});
|
|
3117
3479
|
}
|
|
3118
3480
|
}
|
|
3119
|
-
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;
|
|
3120
3503
|
const _queryParams = {};
|
|
3121
|
-
|
|
3122
|
-
|
|
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
|
+
}
|
|
3123
3529
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3124
|
-
url:
|
|
3530
|
+
url: urlJoin7(
|
|
3125
3531
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3126
|
-
|
|
3532
|
+
"runners"
|
|
3127
3533
|
),
|
|
3128
3534
|
method: "GET",
|
|
3129
3535
|
headers: {
|
|
@@ -3141,7 +3547,7 @@ var Pools = class {
|
|
|
3141
3547
|
abortSignal: requestOptions?.abortSignal
|
|
3142
3548
|
});
|
|
3143
3549
|
if (_response.ok) {
|
|
3144
|
-
return
|
|
3550
|
+
return RunnersListResponse.parseOrThrow(_response.body, {
|
|
3145
3551
|
unrecognizedObjectKeys: "passthrough",
|
|
3146
3552
|
allowUnrecognizedUnionMembers: true,
|
|
3147
3553
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3162,23 +3568,43 @@ var Pools = class {
|
|
|
3162
3568
|
body: _response.error.rawBody
|
|
3163
3569
|
});
|
|
3164
3570
|
case "timeout":
|
|
3165
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3571
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
|
|
3166
3572
|
case "unknown":
|
|
3167
3573
|
throw new RivetError({
|
|
3168
3574
|
message: _response.error.errorMessage
|
|
3169
3575
|
});
|
|
3170
3576
|
}
|
|
3171
3577
|
}
|
|
3172
|
-
|
|
3578
|
+
/**
|
|
3579
|
+
* 2 round trips:
|
|
3580
|
+
*
|
|
3581
|
+
* - GET /runners/names (fanout)
|
|
3582
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3583
|
+
*
|
|
3584
|
+
* @param {Rivet.RunnersListNamesRequest} request
|
|
3585
|
+
* @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
|
|
3586
|
+
*
|
|
3587
|
+
* @example
|
|
3588
|
+
* await client.runners.listNames({
|
|
3589
|
+
* namespace: "namespace"
|
|
3590
|
+
* })
|
|
3591
|
+
*/
|
|
3592
|
+
async listNames(request, requestOptions) {
|
|
3593
|
+
const { namespace, limit, cursor } = request;
|
|
3173
3594
|
const _queryParams = {};
|
|
3174
|
-
|
|
3175
|
-
|
|
3595
|
+
_queryParams["namespace"] = namespace;
|
|
3596
|
+
if (limit != null) {
|
|
3597
|
+
_queryParams["limit"] = limit.toString();
|
|
3598
|
+
}
|
|
3599
|
+
if (cursor != null) {
|
|
3600
|
+
_queryParams["cursor"] = cursor;
|
|
3601
|
+
}
|
|
3176
3602
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3177
|
-
url:
|
|
3603
|
+
url: urlJoin7(
|
|
3178
3604
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3179
|
-
|
|
3605
|
+
"runners/names"
|
|
3180
3606
|
),
|
|
3181
|
-
method: "
|
|
3607
|
+
method: "GET",
|
|
3182
3608
|
headers: {
|
|
3183
3609
|
Authorization: await this._getAuthorizationHeader(),
|
|
3184
3610
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3189,19 +3615,12 @@ var Pools = class {
|
|
|
3189
3615
|
contentType: "application/json",
|
|
3190
3616
|
queryParameters: _queryParams,
|
|
3191
3617
|
requestType: "json",
|
|
3192
|
-
body: {
|
|
3193
|
-
drain_on_version_upgrade: request.drainOnVersionUpgrade,
|
|
3194
|
-
actor_eviction_delay: request.actorEvictionDelay,
|
|
3195
|
-
actor_eviction_period: request.actorEvictionPeriod,
|
|
3196
|
-
actor_eviction_rate: request.actorEvictionRate,
|
|
3197
|
-
metadata: request.metadata
|
|
3198
|
-
},
|
|
3199
3618
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3200
3619
|
maxRetries: requestOptions?.maxRetries,
|
|
3201
3620
|
abortSignal: requestOptions?.abortSignal
|
|
3202
3621
|
});
|
|
3203
3622
|
if (_response.ok) {
|
|
3204
|
-
return
|
|
3623
|
+
return RunnersListNamesResponse.parseOrThrow(_response.body, {
|
|
3205
3624
|
unrecognizedObjectKeys: "passthrough",
|
|
3206
3625
|
allowUnrecognizedUnionMembers: true,
|
|
3207
3626
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3222,54 +3641,7 @@ var Pools = class {
|
|
|
3222
3641
|
body: _response.error.rawBody
|
|
3223
3642
|
});
|
|
3224
3643
|
case "timeout":
|
|
3225
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3226
|
-
case "unknown":
|
|
3227
|
-
throw new RivetError({
|
|
3228
|
-
message: _response.error.errorMessage
|
|
3229
|
-
});
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
async delete(name, request = {}, requestOptions) {
|
|
3233
|
-
const _queryParams = {};
|
|
3234
|
-
if (request.namespace != null)
|
|
3235
|
-
_queryParams["namespace"] = request.namespace;
|
|
3236
|
-
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3237
|
-
url: urlJoin5(
|
|
3238
|
-
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3239
|
-
`pools/${encodeURIComponent(name)}`
|
|
3240
|
-
),
|
|
3241
|
-
method: "DELETE",
|
|
3242
|
-
headers: {
|
|
3243
|
-
Authorization: await this._getAuthorizationHeader(),
|
|
3244
|
-
"X-Fern-Language": "JavaScript",
|
|
3245
|
-
"X-Fern-Runtime": RUNTIME.type,
|
|
3246
|
-
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
3247
|
-
...requestOptions?.headers
|
|
3248
|
-
},
|
|
3249
|
-
contentType: "application/json",
|
|
3250
|
-
queryParameters: _queryParams,
|
|
3251
|
-
requestType: "json",
|
|
3252
|
-
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3253
|
-
maxRetries: requestOptions?.maxRetries,
|
|
3254
|
-
abortSignal: requestOptions?.abortSignal
|
|
3255
|
-
});
|
|
3256
|
-
if (_response.ok) {
|
|
3257
|
-
return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
|
|
3258
|
-
}
|
|
3259
|
-
if (_response.error.reason === "status-code") {
|
|
3260
|
-
throw new RivetError({
|
|
3261
|
-
statusCode: _response.error.statusCode,
|
|
3262
|
-
body: _response.error.body
|
|
3263
|
-
});
|
|
3264
|
-
}
|
|
3265
|
-
switch (_response.error.reason) {
|
|
3266
|
-
case "non-json":
|
|
3267
|
-
throw new RivetError({
|
|
3268
|
-
statusCode: _response.error.statusCode,
|
|
3269
|
-
body: _response.error.rawBody
|
|
3270
|
-
});
|
|
3271
|
-
case "timeout":
|
|
3272
|
-
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
|
|
3644
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
|
|
3273
3645
|
case "unknown":
|
|
3274
3646
|
throw new RivetError({
|
|
3275
3647
|
message: _response.error.errorMessage
|
|
@@ -3288,23 +3660,31 @@ var RivetClient = class {
|
|
|
3288
3660
|
}
|
|
3289
3661
|
_authTokens;
|
|
3290
3662
|
_datacenters;
|
|
3663
|
+
_envoys;
|
|
3664
|
+
_health;
|
|
3291
3665
|
_metadata;
|
|
3292
3666
|
_namespaces;
|
|
3293
|
-
|
|
3667
|
+
_runners;
|
|
3294
3668
|
get authTokens() {
|
|
3295
3669
|
return this._authTokens ??= new AuthTokens(this._options);
|
|
3296
3670
|
}
|
|
3297
3671
|
get datacenters() {
|
|
3298
3672
|
return this._datacenters ??= new Datacenters(this._options);
|
|
3299
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
|
+
}
|
|
3300
3680
|
get metadata() {
|
|
3301
3681
|
return this._metadata ??= new Metadata(this._options);
|
|
3302
3682
|
}
|
|
3303
3683
|
get namespaces() {
|
|
3304
3684
|
return this._namespaces ??= new Namespaces(this._options);
|
|
3305
3685
|
}
|
|
3306
|
-
get
|
|
3307
|
-
return this.
|
|
3686
|
+
get runners() {
|
|
3687
|
+
return this._runners ??= new Runners(this._options);
|
|
3308
3688
|
}
|
|
3309
3689
|
/**
|
|
3310
3690
|
* **If key is some & `include_destroyed` is false**
|
|
@@ -3341,8 +3721,7 @@ var RivetClient = class {
|
|
|
3341
3721
|
async actorsList(request, requestOptions) {
|
|
3342
3722
|
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3343
3723
|
const _queryParams = {};
|
|
3344
|
-
|
|
3345
|
-
_queryParams["namespace"] = namespace;
|
|
3724
|
+
_queryParams["namespace"] = namespace;
|
|
3346
3725
|
if (name != null) {
|
|
3347
3726
|
_queryParams["name"] = name;
|
|
3348
3727
|
}
|
|
@@ -3352,8 +3731,15 @@ var RivetClient = class {
|
|
|
3352
3731
|
if (actorIds != null) {
|
|
3353
3732
|
_queryParams["actor_ids"] = actorIds;
|
|
3354
3733
|
}
|
|
3355
|
-
if (actorId != null)
|
|
3356
|
-
|
|
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
|
+
}
|
|
3357
3743
|
if (includeDestroyed != null) {
|
|
3358
3744
|
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3359
3745
|
}
|
|
@@ -3364,7 +3750,7 @@ var RivetClient = class {
|
|
|
3364
3750
|
_queryParams["cursor"] = cursor;
|
|
3365
3751
|
}
|
|
3366
3752
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3367
|
-
url:
|
|
3753
|
+
url: urlJoin8(
|
|
3368
3754
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3369
3755
|
"actors"
|
|
3370
3756
|
),
|
|
@@ -3436,17 +3822,17 @@ var RivetClient = class {
|
|
|
3436
3822
|
* @example
|
|
3437
3823
|
* await client.actorsCreate({
|
|
3438
3824
|
* namespace: "namespace",
|
|
3825
|
+
* crashPolicy: "restart",
|
|
3439
3826
|
* name: "name",
|
|
3440
|
-
*
|
|
3827
|
+
* runnerNameSelector: "runner_name_selector"
|
|
3441
3828
|
* })
|
|
3442
3829
|
*/
|
|
3443
3830
|
async actorsCreate(request, requestOptions) {
|
|
3444
3831
|
const { namespace, ..._body } = request;
|
|
3445
3832
|
const _queryParams = {};
|
|
3446
|
-
|
|
3447
|
-
_queryParams["namespace"] = namespace;
|
|
3833
|
+
_queryParams["namespace"] = namespace;
|
|
3448
3834
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3449
|
-
url:
|
|
3835
|
+
url: urlJoin8(
|
|
3450
3836
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3451
3837
|
"actors"
|
|
3452
3838
|
),
|
|
@@ -3528,18 +3914,18 @@ var RivetClient = class {
|
|
|
3528
3914
|
* @example
|
|
3529
3915
|
* await client.actorsGetOrCreate({
|
|
3530
3916
|
* namespace: "namespace",
|
|
3917
|
+
* crashPolicy: "restart",
|
|
3531
3918
|
* key: "key",
|
|
3532
3919
|
* name: "name",
|
|
3533
|
-
*
|
|
3920
|
+
* runnerNameSelector: "runner_name_selector"
|
|
3534
3921
|
* })
|
|
3535
3922
|
*/
|
|
3536
3923
|
async actorsGetOrCreate(request, requestOptions) {
|
|
3537
3924
|
const { namespace, ..._body } = request;
|
|
3538
3925
|
const _queryParams = {};
|
|
3539
|
-
|
|
3540
|
-
_queryParams["namespace"] = namespace;
|
|
3926
|
+
_queryParams["namespace"] = namespace;
|
|
3541
3927
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3542
|
-
url:
|
|
3928
|
+
url: urlJoin8(
|
|
3543
3929
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3544
3930
|
"actors"
|
|
3545
3931
|
),
|
|
@@ -3605,8 +3991,7 @@ var RivetClient = class {
|
|
|
3605
3991
|
async actorsListNames(request, requestOptions) {
|
|
3606
3992
|
const { namespace, limit, cursor } = request;
|
|
3607
3993
|
const _queryParams = {};
|
|
3608
|
-
|
|
3609
|
-
_queryParams["namespace"] = namespace;
|
|
3994
|
+
_queryParams["namespace"] = namespace;
|
|
3610
3995
|
if (limit != null) {
|
|
3611
3996
|
_queryParams["limit"] = limit.toString();
|
|
3612
3997
|
}
|
|
@@ -3614,7 +3999,7 @@ var RivetClient = class {
|
|
|
3614
3999
|
_queryParams["cursor"] = cursor;
|
|
3615
4000
|
}
|
|
3616
4001
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3617
|
-
url:
|
|
4002
|
+
url: urlJoin8(
|
|
3618
4003
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3619
4004
|
"actors/names"
|
|
3620
4005
|
),
|
|
@@ -3677,18 +4062,16 @@ var RivetClient = class {
|
|
|
3677
4062
|
* namespace: "namespace"
|
|
3678
4063
|
* })
|
|
3679
4064
|
*/
|
|
3680
|
-
|
|
3681
|
-
async actorsGet(actorId, request, requestOptions) {
|
|
4065
|
+
async actorsDelete(actorId, request, requestOptions) {
|
|
3682
4066
|
const { namespace } = request;
|
|
3683
4067
|
const _queryParams = {};
|
|
3684
|
-
|
|
3685
|
-
_queryParams["namespace"] = namespace;
|
|
4068
|
+
_queryParams["namespace"] = namespace;
|
|
3686
4069
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3687
|
-
url:
|
|
4070
|
+
url: urlJoin8(
|
|
3688
4071
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3689
4072
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
3690
4073
|
),
|
|
3691
|
-
method: "
|
|
4074
|
+
method: "DELETE",
|
|
3692
4075
|
headers: {
|
|
3693
4076
|
Authorization: await this._getAuthorizationHeader(),
|
|
3694
4077
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3704,7 +4087,7 @@ var RivetClient = class {
|
|
|
3704
4087
|
abortSignal: requestOptions?.abortSignal
|
|
3705
4088
|
});
|
|
3706
4089
|
if (_response.ok) {
|
|
3707
|
-
return
|
|
4090
|
+
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
3708
4091
|
unrecognizedObjectKeys: "passthrough",
|
|
3709
4092
|
allowUnrecognizedUnionMembers: true,
|
|
3710
4093
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3725,24 +4108,34 @@ var RivetClient = class {
|
|
|
3725
4108
|
body: _response.error.rawBody
|
|
3726
4109
|
});
|
|
3727
4110
|
case "timeout":
|
|
3728
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
4111
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
3729
4112
|
case "unknown":
|
|
3730
4113
|
throw new RivetError({
|
|
3731
4114
|
message: _response.error.errorMessage
|
|
3732
4115
|
});
|
|
3733
4116
|
}
|
|
3734
4117
|
}
|
|
3735
|
-
|
|
4118
|
+
/**
|
|
4119
|
+
* @param {Rivet.RivetId} actorId
|
|
4120
|
+
* @param {string} key
|
|
4121
|
+
* @param {Rivet.ActorsKvGetRequest} request
|
|
4122
|
+
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4123
|
+
*
|
|
4124
|
+
* @example
|
|
4125
|
+
* await client.actorsKvGet("actor_id", "key", {
|
|
4126
|
+
* namespace: "namespace"
|
|
4127
|
+
* })
|
|
4128
|
+
*/
|
|
4129
|
+
async actorsKvGet(actorId, key, request, requestOptions) {
|
|
3736
4130
|
const { namespace } = request;
|
|
3737
4131
|
const _queryParams = {};
|
|
3738
|
-
|
|
3739
|
-
_queryParams["namespace"] = namespace;
|
|
4132
|
+
_queryParams["namespace"] = namespace;
|
|
3740
4133
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3741
|
-
url:
|
|
4134
|
+
url: urlJoin8(
|
|
3742
4135
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3743
|
-
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4136
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
|
|
3744
4137
|
),
|
|
3745
|
-
method: "
|
|
4138
|
+
method: "GET",
|
|
3746
4139
|
headers: {
|
|
3747
4140
|
Authorization: await this._getAuthorizationHeader(),
|
|
3748
4141
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3758,7 +4151,7 @@ var RivetClient = class {
|
|
|
3758
4151
|
abortSignal: requestOptions?.abortSignal
|
|
3759
4152
|
});
|
|
3760
4153
|
if (_response.ok) {
|
|
3761
|
-
return
|
|
4154
|
+
return ActorsKvGetResponse.parseOrThrow(_response.body, {
|
|
3762
4155
|
unrecognizedObjectKeys: "passthrough",
|
|
3763
4156
|
allowUnrecognizedUnionMembers: true,
|
|
3764
4157
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3779,7 +4172,9 @@ var RivetClient = class {
|
|
|
3779
4172
|
body: _response.error.rawBody
|
|
3780
4173
|
});
|
|
3781
4174
|
case "timeout":
|
|
3782
|
-
throw new RivetTimeoutError(
|
|
4175
|
+
throw new RivetTimeoutError(
|
|
4176
|
+
"Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
|
|
4177
|
+
);
|
|
3783
4178
|
case "unknown":
|
|
3784
4179
|
throw new RivetError({
|
|
3785
4180
|
message: _response.error.errorMessage
|
|
@@ -3794,15 +4189,17 @@ var RivetClient = class {
|
|
|
3794
4189
|
* @example
|
|
3795
4190
|
* await client.actorsReschedule("actor_id", {
|
|
3796
4191
|
* namespace: "namespace",
|
|
4192
|
+
* body: {
|
|
4193
|
+
* "key": "value"
|
|
4194
|
+
* }
|
|
3797
4195
|
* })
|
|
3798
4196
|
*/
|
|
3799
4197
|
async actorsReschedule(actorId, request, requestOptions) {
|
|
3800
|
-
const { namespace } = request;
|
|
4198
|
+
const { namespace, body: _body } = request;
|
|
3801
4199
|
const _queryParams = {};
|
|
3802
|
-
|
|
3803
|
-
_queryParams["namespace"] = namespace;
|
|
4200
|
+
_queryParams["namespace"] = namespace;
|
|
3804
4201
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3805
|
-
url:
|
|
4202
|
+
url: urlJoin8(
|
|
3806
4203
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3807
4204
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
|
|
3808
4205
|
),
|
|
@@ -3817,6 +4214,7 @@ var RivetClient = class {
|
|
|
3817
4214
|
contentType: "application/json",
|
|
3818
4215
|
queryParameters: _queryParams,
|
|
3819
4216
|
requestType: "json",
|
|
4217
|
+
body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3820
4218
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3821
4219
|
maxRetries: requestOptions?.maxRetries,
|
|
3822
4220
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3858,15 +4256,17 @@ var RivetClient = class {
|
|
|
3858
4256
|
* @example
|
|
3859
4257
|
* await client.actorsSleep("actor_id", {
|
|
3860
4258
|
* namespace: "namespace",
|
|
4259
|
+
* body: {
|
|
4260
|
+
* "key": "value"
|
|
4261
|
+
* }
|
|
3861
4262
|
* })
|
|
3862
4263
|
*/
|
|
3863
4264
|
async actorsSleep(actorId, request, requestOptions) {
|
|
3864
|
-
const { namespace } = request;
|
|
4265
|
+
const { namespace, body: _body } = request;
|
|
3865
4266
|
const _queryParams = {};
|
|
3866
|
-
|
|
3867
|
-
_queryParams["namespace"] = namespace;
|
|
4267
|
+
_queryParams["namespace"] = namespace;
|
|
3868
4268
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3869
|
-
url:
|
|
4269
|
+
url: urlJoin8(
|
|
3870
4270
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3871
4271
|
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
|
|
3872
4272
|
),
|
|
@@ -3881,6 +4281,7 @@ var RivetClient = class {
|
|
|
3881
4281
|
contentType: "application/json",
|
|
3882
4282
|
queryParameters: _queryParams,
|
|
3883
4283
|
requestType: "json",
|
|
4284
|
+
body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3884
4285
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3885
4286
|
maxRetries: requestOptions?.maxRetries,
|
|
3886
4287
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3914,6 +4315,360 @@ var RivetClient = class {
|
|
|
3914
4315
|
});
|
|
3915
4316
|
}
|
|
3916
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
|
+
}
|
|
3917
4672
|
async _getAuthorizationHeader() {
|
|
3918
4673
|
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3919
4674
|
}
|