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