@rivetkit/engine-api-full 0.0.0-sqlite-profiling-compat.87d61c0 → 0.0.0-sqlite-sync-3x-release.a00b07f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cjs/index.js +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
|
@@ -580,53 +580,18 @@ module.exports = __toCommonJS(src_exports);
|
|
|
580
580
|
// src/api/index.ts
|
|
581
581
|
var api_exports = {};
|
|
582
582
|
__export(api_exports, {
|
|
583
|
-
|
|
584
|
-
HealthStatus: () => HealthStatus,
|
|
585
|
-
RunnerConfigVariant: () => RunnerConfigVariant,
|
|
583
|
+
authTokens: () => authTokens_exports,
|
|
586
584
|
datacenters: () => datacenters_exports,
|
|
587
|
-
envoys: () => envoys_exports,
|
|
588
|
-
health: () => health_exports,
|
|
589
585
|
metadata: () => metadata_exports,
|
|
590
|
-
namespaces: () =>
|
|
591
|
-
|
|
586
|
+
namespaces: () => namespaces_exports2,
|
|
587
|
+
pools: () => pools_exports
|
|
592
588
|
});
|
|
593
589
|
|
|
594
|
-
// src/api/
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
// src/api/types/HealthStatus.ts
|
|
602
|
-
var HealthStatus = {
|
|
603
|
-
Ok: "ok",
|
|
604
|
-
Error: "error"
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
// src/api/types/RunnerConfigVariant.ts
|
|
608
|
-
var RunnerConfigVariant = {
|
|
609
|
-
Serverless: "serverless",
|
|
610
|
-
Normal: "normal"
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
// src/api/resources/datacenters/index.ts
|
|
614
|
-
var datacenters_exports = {};
|
|
615
|
-
|
|
616
|
-
// src/api/resources/envoys/index.ts
|
|
617
|
-
var envoys_exports = {};
|
|
618
|
-
|
|
619
|
-
// src/api/resources/health/index.ts
|
|
620
|
-
var health_exports = {};
|
|
621
|
-
|
|
622
|
-
// src/api/resources/metadata/index.ts
|
|
623
|
-
var metadata_exports = {};
|
|
624
|
-
|
|
625
|
-
// src/api/resources/namespaces/index.ts
|
|
626
|
-
var namespaces_exports = {};
|
|
627
|
-
|
|
628
|
-
// src/api/resources/runners/index.ts
|
|
629
|
-
var runners_exports = {};
|
|
590
|
+
// src/api/resources/authTokens/index.ts
|
|
591
|
+
var authTokens_exports = {};
|
|
592
|
+
__export(authTokens_exports, {
|
|
593
|
+
AuthTokens: () => AuthTokens
|
|
594
|
+
});
|
|
630
595
|
|
|
631
596
|
// src/core/json.ts
|
|
632
597
|
var toJson = (value, replacer, space) => {
|
|
@@ -2340,6 +2305,9 @@ function transformAndValidateUnion({
|
|
|
2340
2305
|
};
|
|
2341
2306
|
}
|
|
2342
2307
|
|
|
2308
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2309
|
+
var import_url_join = __toESM(require("url-join"));
|
|
2310
|
+
|
|
2343
2311
|
// src/serialization/index.ts
|
|
2344
2312
|
var serialization_exports = {};
|
|
2345
2313
|
__export(serialization_exports, {
|
|
@@ -2350,82 +2318,53 @@ __export(serialization_exports, {
|
|
|
2350
2318
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
2351
2319
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
2352
2320
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
2353
|
-
|
|
2321
|
+
ActorsGetResponse: () => ActorsGetResponse,
|
|
2354
2322
|
ActorsListNamesResponse: () => ActorsListNamesResponse,
|
|
2355
2323
|
ActorsListResponse: () => ActorsListResponse,
|
|
2356
|
-
ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
|
|
2357
2324
|
ActorsRescheduleResponse: () => ActorsRescheduleResponse,
|
|
2358
|
-
ActorsSleepRequestBody: () => ActorsSleepRequestBody,
|
|
2359
2325
|
ActorsSleepResponse: () => ActorsSleepResponse,
|
|
2360
|
-
|
|
2326
|
+
AuthOperationKind: () => AuthOperationKind,
|
|
2327
|
+
AuthResourceKind: () => AuthResourceKind,
|
|
2328
|
+
AuthTargetScope: () => AuthTargetScope,
|
|
2329
|
+
AuthTokenCreateResponse: () => AuthTokenCreateResponse,
|
|
2330
|
+
AuthTokenGrant: () => AuthTokenGrant,
|
|
2331
|
+
AuthTokenInspectResponse: () => AuthTokenInspectResponse,
|
|
2361
2332
|
Datacenter: () => Datacenter,
|
|
2362
|
-
DatacenterHealth: () => DatacenterHealth,
|
|
2363
2333
|
DatacentersListResponse: () => DatacentersListResponse,
|
|
2364
|
-
|
|
2365
|
-
EnvoysListResponse: () => EnvoysListResponse,
|
|
2366
|
-
HealthFanoutResponse: () => HealthFanoutResponse,
|
|
2367
|
-
HealthResponse: () => HealthResponse,
|
|
2368
|
-
HealthStatus: () => HealthStatus2,
|
|
2334
|
+
ErrorResponse: () => ErrorResponse,
|
|
2369
2335
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
2370
2336
|
Namespace: () => Namespace,
|
|
2371
2337
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
2372
2338
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
2373
2339
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
2340
|
+
Node: () => Node,
|
|
2374
2341
|
Pagination: () => Pagination,
|
|
2342
|
+
Pool: () => Pool,
|
|
2343
|
+
PoolResponse: () => PoolResponse,
|
|
2344
|
+
PoolsDeleteResponse: () => PoolsDeleteResponse,
|
|
2345
|
+
PoolsListNodesResponse: () => PoolsListNodesResponse,
|
|
2346
|
+
PoolsListResponse: () => PoolsListResponse,
|
|
2375
2347
|
RivetId: () => RivetId,
|
|
2376
|
-
|
|
2377
|
-
RunnerConfig: () => RunnerConfig,
|
|
2378
|
-
RunnerConfigKind: () => RunnerConfigKind,
|
|
2379
|
-
RunnerConfigKindNormal: () => RunnerConfigKindNormal,
|
|
2380
|
-
RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
|
|
2381
|
-
RunnerConfigKindServerless: () => RunnerConfigKindServerless,
|
|
2382
|
-
RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
|
|
2383
|
-
RunnerConfigNormal: () => RunnerConfigNormal,
|
|
2384
|
-
RunnerConfigResponse: () => RunnerConfigResponse,
|
|
2385
|
-
RunnerConfigServerless: () => RunnerConfigServerless,
|
|
2386
|
-
RunnerConfigVariant: () => RunnerConfigVariant2,
|
|
2387
|
-
RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
|
|
2388
|
-
RunnerConfigsListResponse: () => RunnerConfigsListResponse,
|
|
2389
|
-
RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
|
|
2390
|
-
RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
|
|
2391
|
-
RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
|
|
2392
|
-
RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
|
|
2393
|
-
RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
|
|
2394
|
-
RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
|
|
2395
|
-
RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
|
|
2396
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2397
|
-
RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
|
|
2398
|
-
RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
|
|
2399
|
-
RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
|
|
2400
|
-
RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
|
|
2401
|
-
RunnersListNamesResponse: () => RunnersListNamesResponse,
|
|
2402
|
-
RunnersListResponse: () => RunnersListResponse,
|
|
2403
|
-
namespaces: () => namespaces_exports2
|
|
2348
|
+
namespaces: () => namespaces_exports
|
|
2404
2349
|
});
|
|
2405
2350
|
|
|
2406
2351
|
// src/serialization/types/RivetId.ts
|
|
2407
2352
|
var RivetId = schemas_exports.string();
|
|
2408
2353
|
|
|
2409
|
-
// src/serialization/types/CrashPolicy.ts
|
|
2410
|
-
var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
|
|
2411
|
-
|
|
2412
2354
|
// src/serialization/types/Actor.ts
|
|
2413
2355
|
var Actor = schemas_exports.object({
|
|
2414
2356
|
actorId: schemas_exports.property("actor_id", RivetId),
|
|
2415
|
-
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
|
|
2416
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2417
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2418
|
-
datacenter: schemas_exports.string(),
|
|
2419
|
-
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
|
|
2420
|
-
error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2421
|
-
key: schemas_exports.string().optional(),
|
|
2422
2357
|
name: schemas_exports.string(),
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2358
|
+
key: schemas_exports.string(),
|
|
2359
|
+
namespace: schemas_exports.string(),
|
|
2360
|
+
pool: schemas_exports.string(),
|
|
2361
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2362
|
+
startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
|
|
2363
|
+
pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
|
|
2364
|
+
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
|
|
2365
|
+
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
|
|
2366
|
+
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
|
|
2367
|
+
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
|
|
2429
2368
|
});
|
|
2430
2369
|
|
|
2431
2370
|
// src/serialization/types/ActorName.ts
|
|
@@ -2435,11 +2374,12 @@ var ActorName = schemas_exports.object({
|
|
|
2435
2374
|
|
|
2436
2375
|
// src/serialization/types/ActorsCreateResponse.ts
|
|
2437
2376
|
var ActorsCreateResponse = schemas_exports.object({
|
|
2438
|
-
actor: Actor
|
|
2377
|
+
actor: Actor,
|
|
2378
|
+
created: schemas_exports.boolean()
|
|
2439
2379
|
});
|
|
2440
2380
|
|
|
2441
2381
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
2442
|
-
var ActorsDeleteResponse = schemas_exports.
|
|
2382
|
+
var ActorsDeleteResponse = schemas_exports.object({});
|
|
2443
2383
|
|
|
2444
2384
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
2445
2385
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
@@ -2447,21 +2387,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
|
2447
2387
|
created: schemas_exports.boolean()
|
|
2448
2388
|
});
|
|
2449
2389
|
|
|
2450
|
-
// src/serialization/types/
|
|
2451
|
-
var
|
|
2452
|
-
|
|
2453
|
-
value: schemas_exports.string()
|
|
2454
|
-
});
|
|
2455
|
-
|
|
2456
|
-
// src/serialization/types/Pagination.ts
|
|
2457
|
-
var Pagination = schemas_exports.object({
|
|
2458
|
-
cursor: schemas_exports.string().optional()
|
|
2390
|
+
// src/serialization/types/ActorsGetResponse.ts
|
|
2391
|
+
var ActorsGetResponse = schemas_exports.object({
|
|
2392
|
+
actor: Actor
|
|
2459
2393
|
});
|
|
2460
2394
|
|
|
2461
2395
|
// src/serialization/types/ActorsListNamesResponse.ts
|
|
2462
2396
|
var ActorsListNamesResponse = schemas_exports.object({
|
|
2463
|
-
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2464
|
-
|
|
2397
|
+
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2398
|
+
});
|
|
2399
|
+
|
|
2400
|
+
// src/serialization/types/Pagination.ts
|
|
2401
|
+
var Pagination = schemas_exports.object({
|
|
2402
|
+
cursor: schemas_exports.string().nullable()
|
|
2465
2403
|
});
|
|
2466
2404
|
|
|
2467
2405
|
// src/serialization/types/ActorsListResponse.ts
|
|
@@ -2470,98 +2408,76 @@ var ActorsListResponse = schemas_exports.object({
|
|
|
2470
2408
|
pagination: Pagination
|
|
2471
2409
|
});
|
|
2472
2410
|
|
|
2473
|
-
// src/serialization/types/ActorsRescheduleRequestBody.ts
|
|
2474
|
-
var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2475
|
-
|
|
2476
2411
|
// src/serialization/types/ActorsRescheduleResponse.ts
|
|
2477
|
-
var ActorsRescheduleResponse = schemas_exports.
|
|
2478
|
-
|
|
2479
|
-
// src/serialization/types/ActorsSleepRequestBody.ts
|
|
2480
|
-
var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2412
|
+
var ActorsRescheduleResponse = schemas_exports.object({});
|
|
2481
2413
|
|
|
2482
2414
|
// src/serialization/types/ActorsSleepResponse.ts
|
|
2483
|
-
var ActorsSleepResponse = schemas_exports.
|
|
2415
|
+
var ActorsSleepResponse = schemas_exports.object({});
|
|
2484
2416
|
|
|
2485
|
-
// src/serialization/types/
|
|
2486
|
-
var
|
|
2487
|
-
label: schemas_exports.number(),
|
|
2488
|
-
name: schemas_exports.string(),
|
|
2489
|
-
url: schemas_exports.string()
|
|
2490
|
-
});
|
|
2417
|
+
// src/serialization/types/AuthOperationKind.ts
|
|
2418
|
+
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
|
|
2491
2419
|
|
|
2492
|
-
// src/serialization/types/
|
|
2493
|
-
var
|
|
2494
|
-
runtime: schemas_exports.string(),
|
|
2495
|
-
status: schemas_exports.string(),
|
|
2496
|
-
version: schemas_exports.string()
|
|
2497
|
-
});
|
|
2420
|
+
// src/serialization/types/AuthResourceKind.ts
|
|
2421
|
+
var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
|
|
2498
2422
|
|
|
2499
|
-
// src/serialization/types/
|
|
2500
|
-
var
|
|
2423
|
+
// src/serialization/types/AuthTargetScope.ts
|
|
2424
|
+
var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
|
|
2425
|
+
id: RivetId
|
|
2426
|
+
})]);
|
|
2501
2427
|
|
|
2502
|
-
// src/serialization/types/
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
response: HealthResponse.optional(),
|
|
2508
|
-
rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
|
|
2509
|
-
status: HealthStatus2
|
|
2428
|
+
// src/serialization/types/AuthTokenCreateResponse.ts
|
|
2429
|
+
var AuthTokenCreateResponse = schemas_exports.object({
|
|
2430
|
+
token: schemas_exports.string(),
|
|
2431
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2432
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2510
2433
|
});
|
|
2511
2434
|
|
|
2512
|
-
// src/serialization/types/
|
|
2513
|
-
var
|
|
2514
|
-
|
|
2515
|
-
|
|
2435
|
+
// src/serialization/types/AuthTokenGrant.ts
|
|
2436
|
+
var AuthTokenGrant = schemas_exports.object({
|
|
2437
|
+
resource: AuthResourceKind,
|
|
2438
|
+
target: AuthTargetScope,
|
|
2439
|
+
operations: schemas_exports.list(AuthOperationKind)
|
|
2516
2440
|
});
|
|
2517
2441
|
|
|
2518
|
-
// src/serialization/types/
|
|
2519
|
-
var
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2526
|
-
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2527
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2528
|
-
poolName: schemas_exports.property("pool_name", schemas_exports.string()),
|
|
2529
|
-
slots: schemas_exports.number(),
|
|
2530
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2531
|
-
version: schemas_exports.number()
|
|
2442
|
+
// src/serialization/types/AuthTokenInspectResponse.ts
|
|
2443
|
+
var AuthTokenInspectResponse = schemas_exports.object({
|
|
2444
|
+
namespace: schemas_exports.string(),
|
|
2445
|
+
subject: schemas_exports.string().nullable(),
|
|
2446
|
+
grants: schemas_exports.list(AuthTokenGrant),
|
|
2447
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2448
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2532
2449
|
});
|
|
2533
2450
|
|
|
2534
|
-
// src/serialization/types/
|
|
2535
|
-
var
|
|
2536
|
-
|
|
2537
|
-
pagination: Pagination
|
|
2451
|
+
// src/serialization/types/Datacenter.ts
|
|
2452
|
+
var Datacenter = schemas_exports.object({
|
|
2453
|
+
name: schemas_exports.string()
|
|
2538
2454
|
});
|
|
2539
2455
|
|
|
2540
|
-
// src/serialization/types/
|
|
2541
|
-
var
|
|
2542
|
-
datacenters: schemas_exports.list(
|
|
2456
|
+
// src/serialization/types/DatacentersListResponse.ts
|
|
2457
|
+
var DatacentersListResponse = schemas_exports.object({
|
|
2458
|
+
datacenters: schemas_exports.list(Datacenter)
|
|
2459
|
+
});
|
|
2460
|
+
|
|
2461
|
+
// src/serialization/types/ErrorResponse.ts
|
|
2462
|
+
var ErrorResponse = schemas_exports.object({
|
|
2463
|
+
group: schemas_exports.string(),
|
|
2464
|
+
code: schemas_exports.string(),
|
|
2465
|
+
message: schemas_exports.string(),
|
|
2466
|
+
metadata: schemas_exports.unknown().optional()
|
|
2543
2467
|
});
|
|
2544
2468
|
|
|
2545
2469
|
// src/serialization/types/MetadataGetResponse.ts
|
|
2546
2470
|
var MetadataGetResponse = schemas_exports.object({
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
|
|
2552
|
-
gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
|
|
2553
|
-
runtime: schemas_exports.string(),
|
|
2554
|
-
rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
|
|
2555
|
-
rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
|
|
2556
|
-
version: schemas_exports.string()
|
|
2471
|
+
runtime: schemas_exports.stringLiteral("engine"),
|
|
2472
|
+
version: schemas_exports.string(),
|
|
2473
|
+
envoyProtocolVersion: schemas_exports.number(),
|
|
2474
|
+
actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
|
|
2557
2475
|
});
|
|
2558
2476
|
|
|
2559
2477
|
// src/serialization/types/Namespace.ts
|
|
2560
2478
|
var Namespace = schemas_exports.object({
|
|
2561
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2562
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2563
2479
|
name: schemas_exports.string(),
|
|
2564
|
-
|
|
2480
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number())
|
|
2565
2481
|
});
|
|
2566
2482
|
|
|
2567
2483
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -2575,244 +2491,75 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
2575
2491
|
namespace: Namespace
|
|
2576
2492
|
});
|
|
2577
2493
|
|
|
2578
|
-
// src/serialization/types/
|
|
2579
|
-
var
|
|
2580
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2581
|
-
datacenter: schemas_exports.string(),
|
|
2582
|
-
drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
|
|
2494
|
+
// src/serialization/types/Node.ts
|
|
2495
|
+
var Node = schemas_exports.object({
|
|
2583
2496
|
key: schemas_exports.string(),
|
|
2584
|
-
|
|
2497
|
+
pool: schemas_exports.string(),
|
|
2498
|
+
namespace: schemas_exports.string(),
|
|
2499
|
+
datacenter: schemas_exports.string(),
|
|
2500
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2585
2501
|
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
name: schemas_exports.string(),
|
|
2589
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2590
|
-
remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
|
|
2591
|
-
runnerId: schemas_exports.property("runner_id", RivetId),
|
|
2592
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2593
|
-
totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
|
|
2594
|
-
version: schemas_exports.number()
|
|
2595
|
-
});
|
|
2596
|
-
|
|
2597
|
-
// src/serialization/types/RunnerConfigNormal.ts
|
|
2598
|
-
var RunnerConfigNormal = schemas_exports.object({
|
|
2599
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2600
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2601
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2602
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2603
|
-
"drain_on_version_upgrade",
|
|
2604
|
-
schemas_exports.boolean().optional()
|
|
2605
|
-
)
|
|
2606
|
-
});
|
|
2607
|
-
|
|
2608
|
-
// src/serialization/types/RunnerConfigServerless.ts
|
|
2609
|
-
var RunnerConfigServerless = schemas_exports.object({
|
|
2610
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2611
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2612
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2613
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2614
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2615
|
-
"drain_on_version_upgrade",
|
|
2616
|
-
schemas_exports.boolean().optional()
|
|
2617
|
-
),
|
|
2618
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2619
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2620
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
|
|
2621
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2622
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2623
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2624
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2625
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
|
|
2626
|
-
url: schemas_exports.string()
|
|
2627
|
-
});
|
|
2628
|
-
|
|
2629
|
-
// src/serialization/types/RunnerConfig.ts
|
|
2630
|
-
var RunnerConfig = schemas_exports.object({
|
|
2631
|
-
normal: RunnerConfigNormal.optional(),
|
|
2632
|
-
serverless: RunnerConfigServerless.optional(),
|
|
2633
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2634
|
-
"drain_on_version_upgrade",
|
|
2635
|
-
schemas_exports.boolean().optional()
|
|
2636
|
-
),
|
|
2637
|
-
metadata: schemas_exports.unknown().optional()
|
|
2638
|
-
});
|
|
2639
|
-
|
|
2640
|
-
// src/serialization/types/RunnerConfigKindNormalNormal.ts
|
|
2641
|
-
var RunnerConfigKindNormalNormal = schemas_exports.object({
|
|
2642
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2643
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2644
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2645
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2646
|
-
"drain_on_version_upgrade",
|
|
2647
|
-
schemas_exports.boolean().optional()
|
|
2648
|
-
)
|
|
2649
|
-
});
|
|
2650
|
-
|
|
2651
|
-
// src/serialization/types/RunnerConfigKindNormal.ts
|
|
2652
|
-
var RunnerConfigKindNormal = schemas_exports.object({
|
|
2653
|
-
normal: RunnerConfigKindNormalNormal
|
|
2654
|
-
});
|
|
2655
|
-
|
|
2656
|
-
// src/serialization/types/RunnerConfigKindServerlessServerless.ts
|
|
2657
|
-
var RunnerConfigKindServerlessServerless = schemas_exports.object({
|
|
2658
|
-
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
|
|
2659
|
-
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
|
|
2660
|
-
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
|
|
2661
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2662
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2663
|
-
"drain_on_version_upgrade",
|
|
2664
|
-
schemas_exports.boolean().optional()
|
|
2665
|
-
),
|
|
2666
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2667
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2668
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
|
|
2669
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2670
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2671
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2672
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2673
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
|
|
2674
|
-
url: schemas_exports.string()
|
|
2675
|
-
});
|
|
2676
|
-
|
|
2677
|
-
// src/serialization/types/RunnerConfigKindServerless.ts
|
|
2678
|
-
var RunnerConfigKindServerless = schemas_exports.object({
|
|
2679
|
-
serverless: RunnerConfigKindServerlessServerless
|
|
2680
|
-
});
|
|
2681
|
-
|
|
2682
|
-
// src/serialization/types/RunnerConfigKind.ts
|
|
2683
|
-
var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
|
|
2684
|
-
|
|
2685
|
-
// src/serialization/types/RunnerConfigResponse.ts
|
|
2686
|
-
var RunnerConfigResponse = schemas_exports.object({
|
|
2687
|
-
protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
|
|
2688
|
-
runnerPoolError: schemas_exports.property(
|
|
2689
|
-
"runner_pool_error",
|
|
2690
|
-
schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
|
|
2691
|
-
)
|
|
2692
|
-
}).extend(RunnerConfig);
|
|
2693
|
-
|
|
2694
|
-
// src/serialization/types/RunnerConfigVariant.ts
|
|
2695
|
-
var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
|
|
2696
|
-
|
|
2697
|
-
// src/serialization/types/RunnerConfigsDeleteResponse.ts
|
|
2698
|
-
var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2699
|
-
|
|
2700
|
-
// src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
|
|
2701
|
-
var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
|
|
2702
|
-
datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
|
|
2703
|
-
});
|
|
2704
|
-
|
|
2705
|
-
// src/serialization/types/RunnerConfigsListResponse.ts
|
|
2706
|
-
var RunnerConfigsListResponse = schemas_exports.object({
|
|
2707
|
-
pagination: Pagination,
|
|
2708
|
-
runnerConfigs: schemas_exports.property(
|
|
2709
|
-
"runner_configs",
|
|
2710
|
-
schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
|
|
2711
|
-
)
|
|
2712
|
-
});
|
|
2713
|
-
|
|
2714
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
|
|
2715
|
-
var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2716
|
-
|
|
2717
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
|
|
2718
|
-
var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2719
|
-
|
|
2720
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
|
|
2721
|
-
var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
|
|
2722
|
-
version: schemas_exports.string()
|
|
2502
|
+
connected: schemas_exports.boolean(),
|
|
2503
|
+
stopping: schemas_exports.boolean()
|
|
2723
2504
|
});
|
|
2724
2505
|
|
|
2725
|
-
// src/serialization/types/
|
|
2726
|
-
var
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
message: schemas_exports.string(),
|
|
2734
|
-
metadata: schemas_exports.unknown().optional()
|
|
2735
|
-
});
|
|
2736
|
-
|
|
2737
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
|
|
2738
|
-
var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
|
|
2739
|
-
error: RunnerConfigsServerlessMetadataError
|
|
2506
|
+
// src/serialization/types/Pool.ts
|
|
2507
|
+
var Pool = schemas_exports.object({
|
|
2508
|
+
name: schemas_exports.string(),
|
|
2509
|
+
drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
|
|
2510
|
+
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
|
|
2511
|
+
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
|
|
2512
|
+
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
|
|
2513
|
+
metadata: schemas_exports.unknown()
|
|
2740
2514
|
});
|
|
2741
2515
|
|
|
2742
|
-
// src/serialization/types/
|
|
2743
|
-
var
|
|
2744
|
-
|
|
2516
|
+
// src/serialization/types/PoolResponse.ts
|
|
2517
|
+
var PoolResponse = schemas_exports.object({
|
|
2518
|
+
pool: Pool
|
|
2745
2519
|
});
|
|
2746
2520
|
|
|
2747
|
-
// src/serialization/types/
|
|
2748
|
-
var
|
|
2749
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2750
|
-
RunnerConfigsServerlessHealthCheckResponseFailure
|
|
2751
|
-
]);
|
|
2752
|
-
|
|
2753
|
-
// src/serialization/types/RunnerConfigsUpsertResponse.ts
|
|
2754
|
-
var RunnerConfigsUpsertResponse = schemas_exports.object({
|
|
2755
|
-
endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
|
|
2756
|
-
});
|
|
2521
|
+
// src/serialization/types/PoolsDeleteResponse.ts
|
|
2522
|
+
var PoolsDeleteResponse = schemas_exports.object({});
|
|
2757
2523
|
|
|
2758
|
-
// src/serialization/types/
|
|
2759
|
-
var
|
|
2760
|
-
|
|
2524
|
+
// src/serialization/types/PoolsListNodesResponse.ts
|
|
2525
|
+
var PoolsListNodesResponse = schemas_exports.object({
|
|
2526
|
+
nodes: schemas_exports.list(Node),
|
|
2761
2527
|
pagination: Pagination
|
|
2762
2528
|
});
|
|
2763
2529
|
|
|
2764
|
-
// src/serialization/types/
|
|
2765
|
-
var
|
|
2530
|
+
// src/serialization/types/PoolsListResponse.ts
|
|
2531
|
+
var PoolsListResponse = schemas_exports.object({
|
|
2766
2532
|
pagination: Pagination,
|
|
2767
|
-
|
|
2533
|
+
pools: schemas_exports.list(Pool)
|
|
2768
2534
|
});
|
|
2769
2535
|
|
|
2770
2536
|
// src/serialization/client/requests/ActorsCreateRequest.ts
|
|
2771
2537
|
var ActorsCreateRequest = schemas_exports.object({
|
|
2772
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2773
|
-
datacenter: schemas_exports.string().optional(),
|
|
2774
2538
|
input: schemas_exports.string().optional(),
|
|
2775
2539
|
key: schemas_exports.string().optional(),
|
|
2776
2540
|
name: schemas_exports.string(),
|
|
2777
|
-
|
|
2541
|
+
pool: schemas_exports.string().optional()
|
|
2778
2542
|
});
|
|
2779
2543
|
|
|
2780
2544
|
// src/serialization/client/requests/ActorsGetOrCreateRequest.ts
|
|
2781
2545
|
var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
2782
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2783
|
-
datacenter: schemas_exports.string().optional(),
|
|
2784
2546
|
input: schemas_exports.string().optional(),
|
|
2785
|
-
key: schemas_exports.string(),
|
|
2547
|
+
key: schemas_exports.string().optional(),
|
|
2786
2548
|
name: schemas_exports.string(),
|
|
2787
|
-
|
|
2788
|
-
});
|
|
2789
|
-
|
|
2790
|
-
// src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
|
|
2791
|
-
var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
|
|
2792
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2793
|
-
url: schemas_exports.string()
|
|
2794
|
-
});
|
|
2795
|
-
|
|
2796
|
-
// src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
|
|
2797
|
-
var RunnerConfigsUpsertRequestBody = schemas_exports.object({
|
|
2798
|
-
datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
|
|
2549
|
+
pool: schemas_exports.string().optional()
|
|
2799
2550
|
});
|
|
2800
2551
|
|
|
2801
2552
|
// src/serialization/resources/namespaces/index.ts
|
|
2802
|
-
var
|
|
2803
|
-
__export(
|
|
2553
|
+
var namespaces_exports = {};
|
|
2554
|
+
__export(namespaces_exports, {
|
|
2804
2555
|
NamespacesCreateRequest: () => NamespacesCreateRequest
|
|
2805
2556
|
});
|
|
2806
2557
|
|
|
2807
2558
|
// src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
|
|
2808
2559
|
var NamespacesCreateRequest = schemas_exports.object({
|
|
2809
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2810
2560
|
name: schemas_exports.string()
|
|
2811
2561
|
});
|
|
2812
2562
|
|
|
2813
|
-
// src/Client.ts
|
|
2814
|
-
var import_url_join7 = __toESM(require("url-join"));
|
|
2815
|
-
|
|
2816
2563
|
// src/errors/RivetError.ts
|
|
2817
2564
|
var RivetError = class _RivetError extends Error {
|
|
2818
2565
|
statusCode;
|
|
@@ -2854,25 +2601,18 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
|
|
|
2854
2601
|
}
|
|
2855
2602
|
};
|
|
2856
2603
|
|
|
2857
|
-
// src/api/resources/
|
|
2858
|
-
var
|
|
2859
|
-
var Datacenters = class {
|
|
2604
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2605
|
+
var AuthTokens = class {
|
|
2860
2606
|
constructor(_options) {
|
|
2861
2607
|
this._options = _options;
|
|
2862
2608
|
}
|
|
2863
|
-
|
|
2864
|
-
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
2865
|
-
*
|
|
2866
|
-
* @example
|
|
2867
|
-
* await client.datacenters.list()
|
|
2868
|
-
*/
|
|
2869
|
-
async list(requestOptions) {
|
|
2609
|
+
async create(request, requestOptions) {
|
|
2870
2610
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2871
2611
|
url: (0, import_url_join.default)(
|
|
2872
2612
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2873
|
-
"
|
|
2613
|
+
"auth/tokens"
|
|
2874
2614
|
),
|
|
2875
|
-
method: "
|
|
2615
|
+
method: "POST",
|
|
2876
2616
|
headers: {
|
|
2877
2617
|
Authorization: await this._getAuthorizationHeader(),
|
|
2878
2618
|
"X-Fern-Language": "JavaScript",
|
|
@@ -2882,12 +2622,18 @@ var Datacenters = class {
|
|
|
2882
2622
|
},
|
|
2883
2623
|
contentType: "application/json",
|
|
2884
2624
|
requestType: "json",
|
|
2625
|
+
body: {
|
|
2626
|
+
namespace: request.namespace,
|
|
2627
|
+
duration: request.duration,
|
|
2628
|
+
subject: request.subject,
|
|
2629
|
+
grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
|
|
2630
|
+
},
|
|
2885
2631
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2886
2632
|
maxRetries: requestOptions?.maxRetries,
|
|
2887
2633
|
abortSignal: requestOptions?.abortSignal
|
|
2888
2634
|
});
|
|
2889
2635
|
if (_response.ok) {
|
|
2890
|
-
return
|
|
2636
|
+
return AuthTokenCreateResponse.parseOrThrow(_response.body, {
|
|
2891
2637
|
unrecognizedObjectKeys: "passthrough",
|
|
2892
2638
|
allowUnrecognizedUnionMembers: true,
|
|
2893
2639
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2908,57 +2654,18 @@ var Datacenters = class {
|
|
|
2908
2654
|
body: _response.error.rawBody
|
|
2909
2655
|
});
|
|
2910
2656
|
case "timeout":
|
|
2911
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
2657
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /auth/tokens.");
|
|
2912
2658
|
case "unknown":
|
|
2913
2659
|
throw new RivetError({
|
|
2914
2660
|
message: _response.error.errorMessage
|
|
2915
2661
|
});
|
|
2916
2662
|
}
|
|
2917
2663
|
}
|
|
2918
|
-
async
|
|
2919
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
2920
|
-
}
|
|
2921
|
-
};
|
|
2922
|
-
|
|
2923
|
-
// src/api/resources/envoys/client/Client.ts
|
|
2924
|
-
var import_url_join2 = __toESM(require("url-join"));
|
|
2925
|
-
var Envoys = class {
|
|
2926
|
-
constructor(_options) {
|
|
2927
|
-
this._options = _options;
|
|
2928
|
-
}
|
|
2929
|
-
/**
|
|
2930
|
-
* @param {Rivet.EnvoysListRequest} request
|
|
2931
|
-
* @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
|
|
2932
|
-
*
|
|
2933
|
-
* @example
|
|
2934
|
-
* await client.envoys.list({
|
|
2935
|
-
* namespace: "namespace"
|
|
2936
|
-
* })
|
|
2937
|
-
*/
|
|
2938
|
-
async list(request, requestOptions) {
|
|
2939
|
-
const { namespace, name, envoyKey, limit, cursor } = request;
|
|
2940
|
-
const _queryParams = {};
|
|
2941
|
-
_queryParams["namespace"] = namespace;
|
|
2942
|
-
if (name != null) {
|
|
2943
|
-
_queryParams["name"] = name;
|
|
2944
|
-
}
|
|
2945
|
-
if (envoyKey != null) {
|
|
2946
|
-
if (Array.isArray(envoyKey)) {
|
|
2947
|
-
_queryParams["envoy_key"] = envoyKey.map((item) => item);
|
|
2948
|
-
} else {
|
|
2949
|
-
_queryParams["envoy_key"] = envoyKey;
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
if (limit != null) {
|
|
2953
|
-
_queryParams["limit"] = limit.toString();
|
|
2954
|
-
}
|
|
2955
|
-
if (cursor != null) {
|
|
2956
|
-
_queryParams["cursor"] = cursor;
|
|
2957
|
-
}
|
|
2664
|
+
async inspect(requestOptions) {
|
|
2958
2665
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2959
|
-
url: (0,
|
|
2666
|
+
url: (0, import_url_join.default)(
|
|
2960
2667
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2961
|
-
"
|
|
2668
|
+
"auth/tokens/inspect"
|
|
2962
2669
|
),
|
|
2963
2670
|
method: "GET",
|
|
2964
2671
|
headers: {
|
|
@@ -2969,14 +2676,13 @@ var Envoys = class {
|
|
|
2969
2676
|
...requestOptions?.headers
|
|
2970
2677
|
},
|
|
2971
2678
|
contentType: "application/json",
|
|
2972
|
-
queryParameters: _queryParams,
|
|
2973
2679
|
requestType: "json",
|
|
2974
2680
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2975
2681
|
maxRetries: requestOptions?.maxRetries,
|
|
2976
2682
|
abortSignal: requestOptions?.abortSignal
|
|
2977
2683
|
});
|
|
2978
2684
|
if (_response.ok) {
|
|
2979
|
-
return
|
|
2685
|
+
return AuthTokenInspectResponse.parseOrThrow(_response.body, {
|
|
2980
2686
|
unrecognizedObjectKeys: "passthrough",
|
|
2981
2687
|
allowUnrecognizedUnionMembers: true,
|
|
2982
2688
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2997,7 +2703,7 @@ var Envoys = class {
|
|
|
2997
2703
|
body: _response.error.rawBody
|
|
2998
2704
|
});
|
|
2999
2705
|
case "timeout":
|
|
3000
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2706
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /auth/tokens/inspect.");
|
|
3001
2707
|
case "unknown":
|
|
3002
2708
|
throw new RivetError({
|
|
3003
2709
|
message: _response.error.errorMessage
|
|
@@ -3009,23 +2715,38 @@ var Envoys = class {
|
|
|
3009
2715
|
}
|
|
3010
2716
|
};
|
|
3011
2717
|
|
|
3012
|
-
// src/api/resources/
|
|
3013
|
-
var
|
|
3014
|
-
|
|
2718
|
+
// src/api/resources/datacenters/index.ts
|
|
2719
|
+
var datacenters_exports = {};
|
|
2720
|
+
|
|
2721
|
+
// src/api/resources/metadata/index.ts
|
|
2722
|
+
var metadata_exports = {};
|
|
2723
|
+
|
|
2724
|
+
// src/api/resources/namespaces/index.ts
|
|
2725
|
+
var namespaces_exports2 = {};
|
|
2726
|
+
|
|
2727
|
+
// src/api/resources/pools/index.ts
|
|
2728
|
+
var pools_exports = {};
|
|
2729
|
+
|
|
2730
|
+
// src/Client.ts
|
|
2731
|
+
var import_url_join6 = __toESM(require("url-join"));
|
|
2732
|
+
|
|
2733
|
+
// src/api/resources/datacenters/client/Client.ts
|
|
2734
|
+
var import_url_join2 = __toESM(require("url-join"));
|
|
2735
|
+
var Datacenters = class {
|
|
3015
2736
|
constructor(_options) {
|
|
3016
2737
|
this._options = _options;
|
|
3017
2738
|
}
|
|
3018
2739
|
/**
|
|
3019
|
-
* @param {
|
|
2740
|
+
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
3020
2741
|
*
|
|
3021
2742
|
* @example
|
|
3022
|
-
* await client.
|
|
2743
|
+
* await client.datacenters.list()
|
|
3023
2744
|
*/
|
|
3024
|
-
async
|
|
2745
|
+
async list(requestOptions) {
|
|
3025
2746
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3026
|
-
url: (0,
|
|
2747
|
+
url: (0, import_url_join2.default)(
|
|
3027
2748
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3028
|
-
"
|
|
2749
|
+
"datacenters"
|
|
3029
2750
|
),
|
|
3030
2751
|
method: "GET",
|
|
3031
2752
|
headers: {
|
|
@@ -3042,7 +2763,7 @@ var Health = class {
|
|
|
3042
2763
|
abortSignal: requestOptions?.abortSignal
|
|
3043
2764
|
});
|
|
3044
2765
|
if (_response.ok) {
|
|
3045
|
-
return
|
|
2766
|
+
return DatacentersListResponse.parseOrThrow(_response.body, {
|
|
3046
2767
|
unrecognizedObjectKeys: "passthrough",
|
|
3047
2768
|
allowUnrecognizedUnionMembers: true,
|
|
3048
2769
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3063,7 +2784,7 @@ var Health = class {
|
|
|
3063
2784
|
body: _response.error.rawBody
|
|
3064
2785
|
});
|
|
3065
2786
|
case "timeout":
|
|
3066
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2787
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
|
|
3067
2788
|
case "unknown":
|
|
3068
2789
|
throw new RivetError({
|
|
3069
2790
|
message: _response.error.errorMessage
|
|
@@ -3076,7 +2797,7 @@ var Health = class {
|
|
|
3076
2797
|
};
|
|
3077
2798
|
|
|
3078
2799
|
// src/api/resources/metadata/client/Client.ts
|
|
3079
|
-
var
|
|
2800
|
+
var import_url_join3 = __toESM(require("url-join"));
|
|
3080
2801
|
var Metadata = class {
|
|
3081
2802
|
constructor(_options) {
|
|
3082
2803
|
this._options = _options;
|
|
@@ -3089,7 +2810,7 @@ var Metadata = class {
|
|
|
3089
2810
|
*/
|
|
3090
2811
|
async get(requestOptions) {
|
|
3091
2812
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3092
|
-
url: (0,
|
|
2813
|
+
url: (0, import_url_join3.default)(
|
|
3093
2814
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3094
2815
|
"metadata"
|
|
3095
2816
|
),
|
|
@@ -3142,7 +2863,7 @@ var Metadata = class {
|
|
|
3142
2863
|
};
|
|
3143
2864
|
|
|
3144
2865
|
// src/api/resources/namespaces/client/Client.ts
|
|
3145
|
-
var
|
|
2866
|
+
var import_url_join4 = __toESM(require("url-join"));
|
|
3146
2867
|
var Namespaces = class {
|
|
3147
2868
|
constructor(_options) {
|
|
3148
2869
|
this._options = _options;
|
|
@@ -3155,7 +2876,7 @@ var Namespaces = class {
|
|
|
3155
2876
|
* await client.namespaces.list()
|
|
3156
2877
|
*/
|
|
3157
2878
|
async list(request = {}, requestOptions) {
|
|
3158
|
-
const { limit, cursor, name
|
|
2879
|
+
const { limit, cursor, name } = request;
|
|
3159
2880
|
const _queryParams = {};
|
|
3160
2881
|
if (limit != null) {
|
|
3161
2882
|
_queryParams["limit"] = limit.toString();
|
|
@@ -3166,20 +2887,8 @@ var Namespaces = class {
|
|
|
3166
2887
|
if (name != null) {
|
|
3167
2888
|
_queryParams["name"] = name;
|
|
3168
2889
|
}
|
|
3169
|
-
if (namespaceIds != null) {
|
|
3170
|
-
_queryParams["namespace_ids"] = namespaceIds;
|
|
3171
|
-
}
|
|
3172
|
-
if (namespaceId != null) {
|
|
3173
|
-
if (Array.isArray(namespaceId)) {
|
|
3174
|
-
_queryParams["namespace_id"] = namespaceId.map(
|
|
3175
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3176
|
-
);
|
|
3177
|
-
} else {
|
|
3178
|
-
_queryParams["namespace_id"] = namespaceId;
|
|
3179
|
-
}
|
|
3180
|
-
}
|
|
3181
2890
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3182
|
-
url: (0,
|
|
2891
|
+
url: (0, import_url_join4.default)(
|
|
3183
2892
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3184
2893
|
"namespaces"
|
|
3185
2894
|
),
|
|
@@ -3233,13 +2942,12 @@ var Namespaces = class {
|
|
|
3233
2942
|
*
|
|
3234
2943
|
* @example
|
|
3235
2944
|
* await client.namespaces.create({
|
|
3236
|
-
* displayName: "display_name",
|
|
3237
2945
|
* name: "name"
|
|
3238
2946
|
* })
|
|
3239
2947
|
*/
|
|
3240
2948
|
async create(request, requestOptions) {
|
|
3241
2949
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3242
|
-
url: (0,
|
|
2950
|
+
url: (0, import_url_join4.default)(
|
|
3243
2951
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3244
2952
|
"namespaces"
|
|
3245
2953
|
),
|
|
@@ -3292,43 +3000,28 @@ var Namespaces = class {
|
|
|
3292
3000
|
}
|
|
3293
3001
|
};
|
|
3294
3002
|
|
|
3295
|
-
// src/api/resources/
|
|
3296
|
-
var
|
|
3297
|
-
var
|
|
3003
|
+
// src/api/resources/pools/client/Client.ts
|
|
3004
|
+
var import_url_join5 = __toESM(require("url-join"));
|
|
3005
|
+
var Pools = class {
|
|
3298
3006
|
constructor(_options) {
|
|
3299
3007
|
this._options = _options;
|
|
3300
3008
|
}
|
|
3301
3009
|
/**
|
|
3302
|
-
*
|
|
3303
|
-
*
|
|
3010
|
+
* Lists the namespace's pools by name. Changes apply on each node's next connection.
|
|
3011
|
+
*
|
|
3012
|
+
* @param {Rivet.PoolsListRequest} request
|
|
3013
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3304
3014
|
*
|
|
3305
3015
|
* @example
|
|
3306
|
-
* await client.
|
|
3016
|
+
* await client.pools.list({
|
|
3307
3017
|
* namespace: "namespace"
|
|
3308
3018
|
* })
|
|
3309
3019
|
*/
|
|
3310
3020
|
async list(request, requestOptions) {
|
|
3311
|
-
const { namespace,
|
|
3021
|
+
const { namespace, limit, cursor } = request;
|
|
3312
3022
|
const _queryParams = {};
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
_queryParams["name"] = name;
|
|
3316
|
-
}
|
|
3317
|
-
if (runnerIds != null) {
|
|
3318
|
-
_queryParams["runner_ids"] = runnerIds;
|
|
3319
|
-
}
|
|
3320
|
-
if (runnerId != null) {
|
|
3321
|
-
if (Array.isArray(runnerId)) {
|
|
3322
|
-
_queryParams["runner_id"] = runnerId.map(
|
|
3323
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3324
|
-
);
|
|
3325
|
-
} else {
|
|
3326
|
-
_queryParams["runner_id"] = runnerId;
|
|
3327
|
-
}
|
|
3328
|
-
}
|
|
3329
|
-
if (includeStopped != null) {
|
|
3330
|
-
_queryParams["include_stopped"] = includeStopped.toString();
|
|
3331
|
-
}
|
|
3023
|
+
if (namespace != null)
|
|
3024
|
+
_queryParams["namespace"] = namespace;
|
|
3332
3025
|
if (limit != null) {
|
|
3333
3026
|
_queryParams["limit"] = limit.toString();
|
|
3334
3027
|
}
|
|
@@ -3336,9 +3029,9 @@ var Runners = class {
|
|
|
3336
3029
|
_queryParams["cursor"] = cursor;
|
|
3337
3030
|
}
|
|
3338
3031
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3339
|
-
url: (0,
|
|
3032
|
+
url: (0, import_url_join5.default)(
|
|
3340
3033
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3341
|
-
"
|
|
3034
|
+
"pools"
|
|
3342
3035
|
),
|
|
3343
3036
|
method: "GET",
|
|
3344
3037
|
headers: {
|
|
@@ -3356,7 +3049,7 @@ var Runners = class {
|
|
|
3356
3049
|
abortSignal: requestOptions?.abortSignal
|
|
3357
3050
|
});
|
|
3358
3051
|
if (_response.ok) {
|
|
3359
|
-
return
|
|
3052
|
+
return PoolsListResponse.parseOrThrow(_response.body, {
|
|
3360
3053
|
unrecognizedObjectKeys: "passthrough",
|
|
3361
3054
|
allowUnrecognizedUnionMembers: true,
|
|
3362
3055
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3377,7 +3070,7 @@ var Runners = class {
|
|
|
3377
3070
|
body: _response.error.rawBody
|
|
3378
3071
|
});
|
|
3379
3072
|
case "timeout":
|
|
3380
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3073
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
|
|
3381
3074
|
case "unknown":
|
|
3382
3075
|
throw new RivetError({
|
|
3383
3076
|
message: _response.error.errorMessage
|
|
@@ -3385,23 +3078,22 @@ var Runners = class {
|
|
|
3385
3078
|
}
|
|
3386
3079
|
}
|
|
3387
3080
|
/**
|
|
3388
|
-
*
|
|
3389
|
-
*
|
|
3390
|
-
* - GET /runners/names (fanout)
|
|
3391
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3081
|
+
* Lists the live nodes of a pool in node key order.
|
|
3392
3082
|
*
|
|
3393
|
-
* @param {
|
|
3394
|
-
* @param {
|
|
3083
|
+
* @param {string} pool
|
|
3084
|
+
* @param {Rivet.PoolsListNodesRequest} request
|
|
3085
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3395
3086
|
*
|
|
3396
3087
|
* @example
|
|
3397
|
-
* await client.
|
|
3088
|
+
* await client.pools.listNodes("pool", {
|
|
3398
3089
|
* namespace: "namespace"
|
|
3399
3090
|
* })
|
|
3400
3091
|
*/
|
|
3401
|
-
async
|
|
3092
|
+
async listNodes(pool, request, requestOptions) {
|
|
3402
3093
|
const { namespace, limit, cursor } = request;
|
|
3403
3094
|
const _queryParams = {};
|
|
3404
|
-
|
|
3095
|
+
if (namespace != null)
|
|
3096
|
+
_queryParams["namespace"] = namespace;
|
|
3405
3097
|
if (limit != null) {
|
|
3406
3098
|
_queryParams["limit"] = limit.toString();
|
|
3407
3099
|
}
|
|
@@ -3409,9 +3101,9 @@ var Runners = class {
|
|
|
3409
3101
|
_queryParams["cursor"] = cursor;
|
|
3410
3102
|
}
|
|
3411
3103
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3412
|
-
url: (0,
|
|
3104
|
+
url: (0, import_url_join5.default)(
|
|
3413
3105
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3414
|
-
|
|
3106
|
+
`pools/${encodeURIComponent(pool)}/nodes`
|
|
3415
3107
|
),
|
|
3416
3108
|
method: "GET",
|
|
3417
3109
|
headers: {
|
|
@@ -3429,7 +3121,7 @@ var Runners = class {
|
|
|
3429
3121
|
abortSignal: requestOptions?.abortSignal
|
|
3430
3122
|
});
|
|
3431
3123
|
if (_response.ok) {
|
|
3432
|
-
return
|
|
3124
|
+
return PoolsListNodesResponse.parseOrThrow(_response.body, {
|
|
3433
3125
|
unrecognizedObjectKeys: "passthrough",
|
|
3434
3126
|
allowUnrecognizedUnionMembers: true,
|
|
3435
3127
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3450,114 +3142,21 @@ var Runners = class {
|
|
|
3450
3142
|
body: _response.error.rawBody
|
|
3451
3143
|
});
|
|
3452
3144
|
case "timeout":
|
|
3453
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3145
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
|
|
3454
3146
|
case "unknown":
|
|
3455
3147
|
throw new RivetError({
|
|
3456
3148
|
message: _response.error.errorMessage
|
|
3457
3149
|
});
|
|
3458
3150
|
}
|
|
3459
3151
|
}
|
|
3460
|
-
async
|
|
3461
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3462
|
-
}
|
|
3463
|
-
};
|
|
3464
|
-
|
|
3465
|
-
// src/Client.ts
|
|
3466
|
-
var RivetClient = class {
|
|
3467
|
-
constructor(_options) {
|
|
3468
|
-
this._options = _options;
|
|
3469
|
-
}
|
|
3470
|
-
_datacenters;
|
|
3471
|
-
_envoys;
|
|
3472
|
-
_health;
|
|
3473
|
-
_metadata;
|
|
3474
|
-
_namespaces;
|
|
3475
|
-
_runners;
|
|
3476
|
-
get datacenters() {
|
|
3477
|
-
return this._datacenters ??= new Datacenters(this._options);
|
|
3478
|
-
}
|
|
3479
|
-
get envoys() {
|
|
3480
|
-
return this._envoys ??= new Envoys(this._options);
|
|
3481
|
-
}
|
|
3482
|
-
get health() {
|
|
3483
|
-
return this._health ??= new Health(this._options);
|
|
3484
|
-
}
|
|
3485
|
-
get metadata() {
|
|
3486
|
-
return this._metadata ??= new Metadata(this._options);
|
|
3487
|
-
}
|
|
3488
|
-
get namespaces() {
|
|
3489
|
-
return this._namespaces ??= new Namespaces(this._options);
|
|
3490
|
-
}
|
|
3491
|
-
get runners() {
|
|
3492
|
-
return this._runners ??= new Runners(this._options);
|
|
3493
|
-
}
|
|
3494
|
-
/**
|
|
3495
|
-
* **If key is some & `include_destroyed` is false**
|
|
3496
|
-
*
|
|
3497
|
-
* 2 round trips:
|
|
3498
|
-
*
|
|
3499
|
-
* - namespace::ops::resolve_for_name_global
|
|
3500
|
-
* - GET /actors (multiple DCs based on actor IDs)
|
|
3501
|
-
*
|
|
3502
|
-
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3503
|
-
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3504
|
-
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3505
|
-
*
|
|
3506
|
-
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3507
|
-
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3508
|
-
*
|
|
3509
|
-
* **Otherwise**
|
|
3510
|
-
*
|
|
3511
|
-
* 2 round trips:
|
|
3512
|
-
*
|
|
3513
|
-
* - namespace::ops::resolve_for_name_global
|
|
3514
|
-
* - GET /actors (fanout)
|
|
3515
|
-
*
|
|
3516
|
-
* ## Optimized Alternative Routes
|
|
3517
|
-
*
|
|
3518
|
-
* @param {Rivet.ActorsListRequest} request
|
|
3519
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3520
|
-
*
|
|
3521
|
-
* @example
|
|
3522
|
-
* await client.actorsList({
|
|
3523
|
-
* namespace: "namespace"
|
|
3524
|
-
* })
|
|
3525
|
-
*/
|
|
3526
|
-
async actorsList(request, requestOptions) {
|
|
3527
|
-
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3152
|
+
async get(name, request = {}, requestOptions) {
|
|
3528
3153
|
const _queryParams = {};
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
_queryParams["name"] = name;
|
|
3532
|
-
}
|
|
3533
|
-
if (key != null) {
|
|
3534
|
-
_queryParams["key"] = key;
|
|
3535
|
-
}
|
|
3536
|
-
if (actorIds != null) {
|
|
3537
|
-
_queryParams["actor_ids"] = actorIds;
|
|
3538
|
-
}
|
|
3539
|
-
if (actorId != null) {
|
|
3540
|
-
if (Array.isArray(actorId)) {
|
|
3541
|
-
_queryParams["actor_id"] = actorId.map(
|
|
3542
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3543
|
-
);
|
|
3544
|
-
} else {
|
|
3545
|
-
_queryParams["actor_id"] = actorId;
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
if (includeDestroyed != null) {
|
|
3549
|
-
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3550
|
-
}
|
|
3551
|
-
if (limit != null) {
|
|
3552
|
-
_queryParams["limit"] = limit.toString();
|
|
3553
|
-
}
|
|
3554
|
-
if (cursor != null) {
|
|
3555
|
-
_queryParams["cursor"] = cursor;
|
|
3556
|
-
}
|
|
3154
|
+
if (request.namespace != null)
|
|
3155
|
+
_queryParams["namespace"] = request.namespace;
|
|
3557
3156
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3558
|
-
url: (0,
|
|
3157
|
+
url: (0, import_url_join5.default)(
|
|
3559
3158
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3560
|
-
|
|
3159
|
+
`pools/${encodeURIComponent(name)}`
|
|
3561
3160
|
),
|
|
3562
3161
|
method: "GET",
|
|
3563
3162
|
headers: {
|
|
@@ -3575,7 +3174,7 @@ var RivetClient = class {
|
|
|
3575
3174
|
abortSignal: requestOptions?.abortSignal
|
|
3576
3175
|
});
|
|
3577
3176
|
if (_response.ok) {
|
|
3578
|
-
return
|
|
3177
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3579
3178
|
unrecognizedObjectKeys: "passthrough",
|
|
3580
3179
|
allowUnrecognizedUnionMembers: true,
|
|
3581
3180
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3596,52 +3195,23 @@ var RivetClient = class {
|
|
|
3596
3195
|
body: _response.error.rawBody
|
|
3597
3196
|
});
|
|
3598
3197
|
case "timeout":
|
|
3599
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3198
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
|
|
3600
3199
|
case "unknown":
|
|
3601
3200
|
throw new RivetError({
|
|
3602
3201
|
message: _response.error.errorMessage
|
|
3603
3202
|
});
|
|
3604
3203
|
}
|
|
3605
3204
|
}
|
|
3606
|
-
|
|
3607
|
-
* **If actor is created in the current datacenter:**
|
|
3608
|
-
*
|
|
3609
|
-
* 2 round trips:
|
|
3610
|
-
*
|
|
3611
|
-
* - namespace::ops::resolve_for_name_global
|
|
3612
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3613
|
-
*
|
|
3614
|
-
* **If actor is created in a different datacenter:**
|
|
3615
|
-
*
|
|
3616
|
-
* 3 round trips:
|
|
3617
|
-
*
|
|
3618
|
-
* - namespace::ops::resolve_for_name_global
|
|
3619
|
-
* - POST /actors to remote datacenter
|
|
3620
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3621
|
-
*
|
|
3622
|
-
* actor::get will always be in the same datacenter.
|
|
3623
|
-
*
|
|
3624
|
-
* @param {Rivet.ActorsCreateRequest} request
|
|
3625
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3626
|
-
*
|
|
3627
|
-
* @example
|
|
3628
|
-
* await client.actorsCreate({
|
|
3629
|
-
* namespace: "namespace",
|
|
3630
|
-
* crashPolicy: "restart",
|
|
3631
|
-
* name: "name",
|
|
3632
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3633
|
-
* })
|
|
3634
|
-
*/
|
|
3635
|
-
async actorsCreate(request, requestOptions) {
|
|
3636
|
-
const { namespace, ..._body } = request;
|
|
3205
|
+
async upsert(name, request, requestOptions) {
|
|
3637
3206
|
const _queryParams = {};
|
|
3638
|
-
|
|
3207
|
+
if (request.namespace != null)
|
|
3208
|
+
_queryParams["namespace"] = request.namespace;
|
|
3639
3209
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3640
|
-
url: (0,
|
|
3210
|
+
url: (0, import_url_join5.default)(
|
|
3641
3211
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3642
|
-
|
|
3212
|
+
`pools/${encodeURIComponent(name)}`
|
|
3643
3213
|
),
|
|
3644
|
-
method: "
|
|
3214
|
+
method: "PUT",
|
|
3645
3215
|
headers: {
|
|
3646
3216
|
Authorization: await this._getAuthorizationHeader(),
|
|
3647
3217
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3652,13 +3222,19 @@ var RivetClient = class {
|
|
|
3652
3222
|
contentType: "application/json",
|
|
3653
3223
|
queryParameters: _queryParams,
|
|
3654
3224
|
requestType: "json",
|
|
3655
|
-
body:
|
|
3225
|
+
body: {
|
|
3226
|
+
drain_on_version_upgrade: request.drainOnVersionUpgrade,
|
|
3227
|
+
actor_eviction_delay: request.actorEvictionDelay,
|
|
3228
|
+
actor_eviction_period: request.actorEvictionPeriod,
|
|
3229
|
+
actor_eviction_rate: request.actorEvictionRate,
|
|
3230
|
+
metadata: request.metadata
|
|
3231
|
+
},
|
|
3656
3232
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3657
3233
|
maxRetries: requestOptions?.maxRetries,
|
|
3658
3234
|
abortSignal: requestOptions?.abortSignal
|
|
3659
3235
|
});
|
|
3660
3236
|
if (_response.ok) {
|
|
3661
|
-
return
|
|
3237
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3662
3238
|
unrecognizedObjectKeys: "passthrough",
|
|
3663
3239
|
allowUnrecognizedUnionMembers: true,
|
|
3664
3240
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3679,62 +3255,23 @@ var RivetClient = class {
|
|
|
3679
3255
|
body: _response.error.rawBody
|
|
3680
3256
|
});
|
|
3681
3257
|
case "timeout":
|
|
3682
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3258
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
|
|
3683
3259
|
case "unknown":
|
|
3684
3260
|
throw new RivetError({
|
|
3685
3261
|
message: _response.error.errorMessage
|
|
3686
3262
|
});
|
|
3687
3263
|
}
|
|
3688
3264
|
}
|
|
3689
|
-
|
|
3690
|
-
* **If actor exists**
|
|
3691
|
-
*
|
|
3692
|
-
* 2 round trips:
|
|
3693
|
-
*
|
|
3694
|
-
* - namespace::ops::resolve_for_name_global
|
|
3695
|
-
* - GET /actors/{}
|
|
3696
|
-
*
|
|
3697
|
-
* **If actor does not exist and is created in the current datacenter:**
|
|
3698
|
-
*
|
|
3699
|
-
* 2 round trips:
|
|
3700
|
-
*
|
|
3701
|
-
* - namespace::ops::resolve_for_name_global
|
|
3702
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3703
|
-
*
|
|
3704
|
-
* **If actor does not exist and is created in a different datacenter:**
|
|
3705
|
-
*
|
|
3706
|
-
* 3 round trips:
|
|
3707
|
-
*
|
|
3708
|
-
* - namespace::ops::resolve_for_name_global
|
|
3709
|
-
* - POST /actors to remote datacenter
|
|
3710
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3711
|
-
*
|
|
3712
|
-
* actor::get will always be in the same datacenter.
|
|
3713
|
-
*
|
|
3714
|
-
* ## Optimized Alternative Routes
|
|
3715
|
-
*
|
|
3716
|
-
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
3717
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3718
|
-
*
|
|
3719
|
-
* @example
|
|
3720
|
-
* await client.actorsGetOrCreate({
|
|
3721
|
-
* namespace: "namespace",
|
|
3722
|
-
* crashPolicy: "restart",
|
|
3723
|
-
* key: "key",
|
|
3724
|
-
* name: "name",
|
|
3725
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3726
|
-
* })
|
|
3727
|
-
*/
|
|
3728
|
-
async actorsGetOrCreate(request, requestOptions) {
|
|
3729
|
-
const { namespace, ..._body } = request;
|
|
3265
|
+
async delete(name, request = {}, requestOptions) {
|
|
3730
3266
|
const _queryParams = {};
|
|
3731
|
-
|
|
3267
|
+
if (request.namespace != null)
|
|
3268
|
+
_queryParams["namespace"] = request.namespace;
|
|
3732
3269
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3733
|
-
url: (0,
|
|
3270
|
+
url: (0, import_url_join5.default)(
|
|
3734
3271
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3735
|
-
|
|
3272
|
+
`pools/${encodeURIComponent(name)}`
|
|
3736
3273
|
),
|
|
3737
|
-
method: "
|
|
3274
|
+
method: "DELETE",
|
|
3738
3275
|
headers: {
|
|
3739
3276
|
Authorization: await this._getAuthorizationHeader(),
|
|
3740
3277
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3745,19 +3282,12 @@ var RivetClient = class {
|
|
|
3745
3282
|
contentType: "application/json",
|
|
3746
3283
|
queryParameters: _queryParams,
|
|
3747
3284
|
requestType: "json",
|
|
3748
|
-
body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3749
3285
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3750
3286
|
maxRetries: requestOptions?.maxRetries,
|
|
3751
3287
|
abortSignal: requestOptions?.abortSignal
|
|
3752
3288
|
});
|
|
3753
3289
|
if (_response.ok) {
|
|
3754
|
-
return
|
|
3755
|
-
unrecognizedObjectKeys: "passthrough",
|
|
3756
|
-
allowUnrecognizedUnionMembers: true,
|
|
3757
|
-
allowUnrecognizedEnumValues: true,
|
|
3758
|
-
skipValidation: true,
|
|
3759
|
-
breadcrumbsPrefix: ["response"]
|
|
3760
|
-
});
|
|
3290
|
+
return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
|
|
3761
3291
|
}
|
|
3762
3292
|
if (_response.error.reason === "status-code") {
|
|
3763
3293
|
throw new RivetError({
|
|
@@ -3772,31 +3302,94 @@ var RivetClient = class {
|
|
|
3772
3302
|
body: _response.error.rawBody
|
|
3773
3303
|
});
|
|
3774
3304
|
case "timeout":
|
|
3775
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3305
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
|
|
3776
3306
|
case "unknown":
|
|
3777
3307
|
throw new RivetError({
|
|
3778
3308
|
message: _response.error.errorMessage
|
|
3779
3309
|
});
|
|
3780
3310
|
}
|
|
3781
3311
|
}
|
|
3312
|
+
async _getAuthorizationHeader() {
|
|
3313
|
+
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3314
|
+
}
|
|
3315
|
+
};
|
|
3316
|
+
|
|
3317
|
+
// src/Client.ts
|
|
3318
|
+
var RivetClient = class {
|
|
3319
|
+
constructor(_options) {
|
|
3320
|
+
this._options = _options;
|
|
3321
|
+
}
|
|
3322
|
+
_authTokens;
|
|
3323
|
+
_datacenters;
|
|
3324
|
+
_metadata;
|
|
3325
|
+
_namespaces;
|
|
3326
|
+
_pools;
|
|
3327
|
+
get authTokens() {
|
|
3328
|
+
return this._authTokens ??= new AuthTokens(this._options);
|
|
3329
|
+
}
|
|
3330
|
+
get datacenters() {
|
|
3331
|
+
return this._datacenters ??= new Datacenters(this._options);
|
|
3332
|
+
}
|
|
3333
|
+
get metadata() {
|
|
3334
|
+
return this._metadata ??= new Metadata(this._options);
|
|
3335
|
+
}
|
|
3336
|
+
get namespaces() {
|
|
3337
|
+
return this._namespaces ??= new Namespaces(this._options);
|
|
3338
|
+
}
|
|
3339
|
+
get pools() {
|
|
3340
|
+
return this._pools ??= new Pools(this._options);
|
|
3341
|
+
}
|
|
3782
3342
|
/**
|
|
3343
|
+
* **If key is some & `include_destroyed` is false**
|
|
3344
|
+
*
|
|
3783
3345
|
* 2 round trips:
|
|
3784
3346
|
*
|
|
3785
|
-
* -
|
|
3786
|
-
* -
|
|
3347
|
+
* - namespace::ops::resolve_for_name_global
|
|
3348
|
+
* - GET /actors (multiple DCs based on actor IDs)
|
|
3787
3349
|
*
|
|
3788
|
-
*
|
|
3350
|
+
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3351
|
+
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3352
|
+
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3353
|
+
*
|
|
3354
|
+
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3355
|
+
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3356
|
+
*
|
|
3357
|
+
* **Otherwise**
|
|
3358
|
+
*
|
|
3359
|
+
* 2 round trips:
|
|
3360
|
+
*
|
|
3361
|
+
* - namespace::ops::resolve_for_name_global
|
|
3362
|
+
* - GET /actors (fanout)
|
|
3363
|
+
*
|
|
3364
|
+
* ## Optimized Alternative Routes
|
|
3365
|
+
*
|
|
3366
|
+
* @param {Rivet.ActorsListRequest} request
|
|
3789
3367
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3790
3368
|
*
|
|
3791
3369
|
* @example
|
|
3792
|
-
* await client.
|
|
3370
|
+
* await client.actorsList({
|
|
3793
3371
|
* namespace: "namespace"
|
|
3794
3372
|
* })
|
|
3795
3373
|
*/
|
|
3796
|
-
async
|
|
3797
|
-
const { namespace, limit, cursor } = request;
|
|
3374
|
+
async actorsList(request, requestOptions) {
|
|
3375
|
+
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3798
3376
|
const _queryParams = {};
|
|
3799
|
-
|
|
3377
|
+
if (namespace != null)
|
|
3378
|
+
_queryParams["namespace"] = namespace;
|
|
3379
|
+
if (name != null) {
|
|
3380
|
+
_queryParams["name"] = name;
|
|
3381
|
+
}
|
|
3382
|
+
if (key != null) {
|
|
3383
|
+
_queryParams["key"] = key;
|
|
3384
|
+
}
|
|
3385
|
+
if (actorIds != null) {
|
|
3386
|
+
_queryParams["actor_ids"] = actorIds;
|
|
3387
|
+
}
|
|
3388
|
+
if (actorId != null)
|
|
3389
|
+
_queryParams["actor_id"] = actorId;
|
|
3390
|
+
if (includeDestroyed != null) {
|
|
3391
|
+
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3392
|
+
}
|
|
3800
3393
|
if (limit != null) {
|
|
3801
3394
|
_queryParams["limit"] = limit.toString();
|
|
3802
3395
|
}
|
|
@@ -3804,9 +3397,9 @@ var RivetClient = class {
|
|
|
3804
3397
|
_queryParams["cursor"] = cursor;
|
|
3805
3398
|
}
|
|
3806
3399
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3807
|
-
url: (0,
|
|
3400
|
+
url: (0, import_url_join6.default)(
|
|
3808
3401
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3809
|
-
"actors
|
|
3402
|
+
"actors"
|
|
3810
3403
|
),
|
|
3811
3404
|
method: "GET",
|
|
3812
3405
|
headers: {
|
|
@@ -3824,7 +3417,7 @@ var RivetClient = class {
|
|
|
3824
3417
|
abortSignal: requestOptions?.abortSignal
|
|
3825
3418
|
});
|
|
3826
3419
|
if (_response.ok) {
|
|
3827
|
-
return
|
|
3420
|
+
return ActorsListResponse.parseOrThrow(_response.body, {
|
|
3828
3421
|
unrecognizedObjectKeys: "passthrough",
|
|
3829
3422
|
allowUnrecognizedUnionMembers: true,
|
|
3830
3423
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3845,7 +3438,7 @@ var RivetClient = class {
|
|
|
3845
3438
|
body: _response.error.rawBody
|
|
3846
3439
|
});
|
|
3847
3440
|
case "timeout":
|
|
3848
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors
|
|
3441
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
|
|
3849
3442
|
case "unknown":
|
|
3850
3443
|
throw new RivetError({
|
|
3851
3444
|
message: _response.error.errorMessage
|
|
@@ -3853,160 +3446,42 @@ var RivetClient = class {
|
|
|
3853
3446
|
}
|
|
3854
3447
|
}
|
|
3855
3448
|
/**
|
|
3856
|
-
*
|
|
3449
|
+
* **If actor is created in the current datacenter:**
|
|
3857
3450
|
*
|
|
3858
|
-
*
|
|
3859
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3451
|
+
* 2 round trips:
|
|
3860
3452
|
*
|
|
3861
|
-
*
|
|
3862
|
-
*
|
|
3863
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3453
|
+
* - namespace::ops::resolve_for_name_global
|
|
3454
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3864
3455
|
*
|
|
3865
|
-
*
|
|
3866
|
-
* await client.actorsDelete("actor_id", {
|
|
3867
|
-
* namespace: "namespace"
|
|
3868
|
-
* })
|
|
3869
|
-
*/
|
|
3870
|
-
async actorsDelete(actorId, request, requestOptions) {
|
|
3871
|
-
const { namespace } = request;
|
|
3872
|
-
const _queryParams = {};
|
|
3873
|
-
_queryParams["namespace"] = namespace;
|
|
3874
|
-
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3875
|
-
url: (0, import_url_join7.default)(
|
|
3876
|
-
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3877
|
-
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
3878
|
-
),
|
|
3879
|
-
method: "DELETE",
|
|
3880
|
-
headers: {
|
|
3881
|
-
Authorization: await this._getAuthorizationHeader(),
|
|
3882
|
-
"X-Fern-Language": "JavaScript",
|
|
3883
|
-
"X-Fern-Runtime": RUNTIME.type,
|
|
3884
|
-
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
3885
|
-
...requestOptions?.headers
|
|
3886
|
-
},
|
|
3887
|
-
contentType: "application/json",
|
|
3888
|
-
queryParameters: _queryParams,
|
|
3889
|
-
requestType: "json",
|
|
3890
|
-
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3891
|
-
maxRetries: requestOptions?.maxRetries,
|
|
3892
|
-
abortSignal: requestOptions?.abortSignal
|
|
3893
|
-
});
|
|
3894
|
-
if (_response.ok) {
|
|
3895
|
-
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
3896
|
-
unrecognizedObjectKeys: "passthrough",
|
|
3897
|
-
allowUnrecognizedUnionMembers: true,
|
|
3898
|
-
allowUnrecognizedEnumValues: true,
|
|
3899
|
-
skipValidation: true,
|
|
3900
|
-
breadcrumbsPrefix: ["response"]
|
|
3901
|
-
});
|
|
3902
|
-
}
|
|
3903
|
-
if (_response.error.reason === "status-code") {
|
|
3904
|
-
throw new RivetError({
|
|
3905
|
-
statusCode: _response.error.statusCode,
|
|
3906
|
-
body: _response.error.body
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
switch (_response.error.reason) {
|
|
3910
|
-
case "non-json":
|
|
3911
|
-
throw new RivetError({
|
|
3912
|
-
statusCode: _response.error.statusCode,
|
|
3913
|
-
body: _response.error.rawBody
|
|
3914
|
-
});
|
|
3915
|
-
case "timeout":
|
|
3916
|
-
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
3917
|
-
case "unknown":
|
|
3918
|
-
throw new RivetError({
|
|
3919
|
-
message: _response.error.errorMessage
|
|
3920
|
-
});
|
|
3921
|
-
}
|
|
3922
|
-
}
|
|
3923
|
-
/**
|
|
3924
|
-
* @param {Rivet.RivetId} actorId
|
|
3925
|
-
* @param {string} key
|
|
3926
|
-
* @param {Rivet.ActorsKvGetRequest} request
|
|
3927
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3456
|
+
* **If actor is created in a different datacenter:**
|
|
3928
3457
|
*
|
|
3929
|
-
*
|
|
3930
|
-
*
|
|
3931
|
-
*
|
|
3932
|
-
*
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3939
|
-
url: (0, import_url_join7.default)(
|
|
3940
|
-
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3941
|
-
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
|
|
3942
|
-
),
|
|
3943
|
-
method: "GET",
|
|
3944
|
-
headers: {
|
|
3945
|
-
Authorization: await this._getAuthorizationHeader(),
|
|
3946
|
-
"X-Fern-Language": "JavaScript",
|
|
3947
|
-
"X-Fern-Runtime": RUNTIME.type,
|
|
3948
|
-
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
3949
|
-
...requestOptions?.headers
|
|
3950
|
-
},
|
|
3951
|
-
contentType: "application/json",
|
|
3952
|
-
queryParameters: _queryParams,
|
|
3953
|
-
requestType: "json",
|
|
3954
|
-
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3955
|
-
maxRetries: requestOptions?.maxRetries,
|
|
3956
|
-
abortSignal: requestOptions?.abortSignal
|
|
3957
|
-
});
|
|
3958
|
-
if (_response.ok) {
|
|
3959
|
-
return ActorsKvGetResponse.parseOrThrow(_response.body, {
|
|
3960
|
-
unrecognizedObjectKeys: "passthrough",
|
|
3961
|
-
allowUnrecognizedUnionMembers: true,
|
|
3962
|
-
allowUnrecognizedEnumValues: true,
|
|
3963
|
-
skipValidation: true,
|
|
3964
|
-
breadcrumbsPrefix: ["response"]
|
|
3965
|
-
});
|
|
3966
|
-
}
|
|
3967
|
-
if (_response.error.reason === "status-code") {
|
|
3968
|
-
throw new RivetError({
|
|
3969
|
-
statusCode: _response.error.statusCode,
|
|
3970
|
-
body: _response.error.body
|
|
3971
|
-
});
|
|
3972
|
-
}
|
|
3973
|
-
switch (_response.error.reason) {
|
|
3974
|
-
case "non-json":
|
|
3975
|
-
throw new RivetError({
|
|
3976
|
-
statusCode: _response.error.statusCode,
|
|
3977
|
-
body: _response.error.rawBody
|
|
3978
|
-
});
|
|
3979
|
-
case "timeout":
|
|
3980
|
-
throw new RivetTimeoutError(
|
|
3981
|
-
"Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
|
|
3982
|
-
);
|
|
3983
|
-
case "unknown":
|
|
3984
|
-
throw new RivetError({
|
|
3985
|
-
message: _response.error.errorMessage
|
|
3986
|
-
});
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
|
-
/**
|
|
3990
|
-
* @param {Rivet.RivetId} actorId
|
|
3991
|
-
* @param {Rivet.ActorsRescheduleRequest} request
|
|
3458
|
+
* 3 round trips:
|
|
3459
|
+
*
|
|
3460
|
+
* - namespace::ops::resolve_for_name_global
|
|
3461
|
+
* - POST /actors to remote datacenter
|
|
3462
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3463
|
+
*
|
|
3464
|
+
* actor::get will always be in the same datacenter.
|
|
3465
|
+
*
|
|
3466
|
+
* @param {Rivet.ActorsCreateRequest} request
|
|
3992
3467
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3993
3468
|
*
|
|
3994
3469
|
* @example
|
|
3995
|
-
* await client.
|
|
3470
|
+
* await client.actorsCreate({
|
|
3996
3471
|
* namespace: "namespace",
|
|
3997
|
-
*
|
|
3998
|
-
*
|
|
3999
|
-
* }
|
|
3472
|
+
* name: "name",
|
|
3473
|
+
* pool: "pool"
|
|
4000
3474
|
* })
|
|
4001
3475
|
*/
|
|
4002
|
-
async
|
|
4003
|
-
const { namespace,
|
|
3476
|
+
async actorsCreate(request, requestOptions) {
|
|
3477
|
+
const { namespace, ..._body } = request;
|
|
4004
3478
|
const _queryParams = {};
|
|
4005
|
-
|
|
3479
|
+
if (namespace != null)
|
|
3480
|
+
_queryParams["namespace"] = namespace;
|
|
4006
3481
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4007
|
-
url: (0,
|
|
3482
|
+
url: (0, import_url_join6.default)(
|
|
4008
3483
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4009
|
-
|
|
3484
|
+
"actors"
|
|
4010
3485
|
),
|
|
4011
3486
|
method: "POST",
|
|
4012
3487
|
headers: {
|
|
@@ -4019,13 +3494,13 @@ var RivetClient = class {
|
|
|
4019
3494
|
contentType: "application/json",
|
|
4020
3495
|
queryParameters: _queryParams,
|
|
4021
3496
|
requestType: "json",
|
|
4022
|
-
body:
|
|
3497
|
+
body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4023
3498
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4024
3499
|
maxRetries: requestOptions?.maxRetries,
|
|
4025
3500
|
abortSignal: requestOptions?.abortSignal
|
|
4026
3501
|
});
|
|
4027
3502
|
if (_response.ok) {
|
|
4028
|
-
return
|
|
3503
|
+
return ActorsCreateResponse.parseOrThrow(_response.body, {
|
|
4029
3504
|
unrecognizedObjectKeys: "passthrough",
|
|
4030
3505
|
allowUnrecognizedUnionMembers: true,
|
|
4031
3506
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4046,7 +3521,7 @@ var RivetClient = class {
|
|
|
4046
3521
|
body: _response.error.rawBody
|
|
4047
3522
|
});
|
|
4048
3523
|
case "timeout":
|
|
4049
|
-
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors
|
|
3524
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
|
|
4050
3525
|
case "unknown":
|
|
4051
3526
|
throw new RivetError({
|
|
4052
3527
|
message: _response.error.errorMessage
|
|
@@ -4054,28 +3529,54 @@ var RivetClient = class {
|
|
|
4054
3529
|
}
|
|
4055
3530
|
}
|
|
4056
3531
|
/**
|
|
4057
|
-
*
|
|
4058
|
-
*
|
|
3532
|
+
* **If actor exists**
|
|
3533
|
+
*
|
|
3534
|
+
* 2 round trips:
|
|
3535
|
+
*
|
|
3536
|
+
* - namespace::ops::resolve_for_name_global
|
|
3537
|
+
* - GET /actors/{}
|
|
3538
|
+
*
|
|
3539
|
+
* **If actor does not exist and is created in the current datacenter:**
|
|
3540
|
+
*
|
|
3541
|
+
* 2 round trips:
|
|
3542
|
+
*
|
|
3543
|
+
* - namespace::ops::resolve_for_name_global
|
|
3544
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3545
|
+
*
|
|
3546
|
+
* **If actor does not exist and is created in a different datacenter:**
|
|
3547
|
+
*
|
|
3548
|
+
* 3 round trips:
|
|
3549
|
+
*
|
|
3550
|
+
* - namespace::ops::resolve_for_name_global
|
|
3551
|
+
* - POST /actors to remote datacenter
|
|
3552
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3553
|
+
*
|
|
3554
|
+
* actor::get will always be in the same datacenter.
|
|
3555
|
+
*
|
|
3556
|
+
* ## Optimized Alternative Routes
|
|
3557
|
+
*
|
|
3558
|
+
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
4059
3559
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4060
3560
|
*
|
|
4061
3561
|
* @example
|
|
4062
|
-
* await client.
|
|
3562
|
+
* await client.actorsGetOrCreate({
|
|
4063
3563
|
* namespace: "namespace",
|
|
4064
|
-
*
|
|
4065
|
-
*
|
|
4066
|
-
*
|
|
3564
|
+
* key: "key",
|
|
3565
|
+
* name: "name",
|
|
3566
|
+
* pool: "pool"
|
|
4067
3567
|
* })
|
|
4068
3568
|
*/
|
|
4069
|
-
async
|
|
4070
|
-
const { namespace,
|
|
3569
|
+
async actorsGetOrCreate(request, requestOptions) {
|
|
3570
|
+
const { namespace, ..._body } = request;
|
|
4071
3571
|
const _queryParams = {};
|
|
4072
|
-
|
|
3572
|
+
if (namespace != null)
|
|
3573
|
+
_queryParams["namespace"] = namespace;
|
|
4073
3574
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4074
|
-
url: (0,
|
|
3575
|
+
url: (0, import_url_join6.default)(
|
|
4075
3576
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4076
|
-
|
|
3577
|
+
"actors"
|
|
4077
3578
|
),
|
|
4078
|
-
method: "
|
|
3579
|
+
method: "PUT",
|
|
4079
3580
|
headers: {
|
|
4080
3581
|
Authorization: await this._getAuthorizationHeader(),
|
|
4081
3582
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4086,13 +3587,13 @@ var RivetClient = class {
|
|
|
4086
3587
|
contentType: "application/json",
|
|
4087
3588
|
queryParameters: _queryParams,
|
|
4088
3589
|
requestType: "json",
|
|
4089
|
-
body:
|
|
3590
|
+
body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4090
3591
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4091
3592
|
maxRetries: requestOptions?.maxRetries,
|
|
4092
3593
|
abortSignal: requestOptions?.abortSignal
|
|
4093
3594
|
});
|
|
4094
3595
|
if (_response.ok) {
|
|
4095
|
-
return
|
|
3596
|
+
return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
|
|
4096
3597
|
unrecognizedObjectKeys: "passthrough",
|
|
4097
3598
|
allowUnrecognizedUnionMembers: true,
|
|
4098
3599
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4113,7 +3614,7 @@ var RivetClient = class {
|
|
|
4113
3614
|
body: _response.error.rawBody
|
|
4114
3615
|
});
|
|
4115
3616
|
case "timeout":
|
|
4116
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3617
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
|
|
4117
3618
|
case "unknown":
|
|
4118
3619
|
throw new RivetError({
|
|
4119
3620
|
message: _response.error.errorMessage
|
|
@@ -4121,43 +3622,34 @@ var RivetClient = class {
|
|
|
4121
3622
|
}
|
|
4122
3623
|
}
|
|
4123
3624
|
/**
|
|
4124
|
-
*
|
|
3625
|
+
* 2 round trips:
|
|
3626
|
+
*
|
|
3627
|
+
* - GET /actors/names (fanout)
|
|
3628
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3629
|
+
*
|
|
3630
|
+
* @param {Rivet.ActorsListNamesRequest} request
|
|
4125
3631
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4126
3632
|
*
|
|
4127
3633
|
* @example
|
|
4128
|
-
* await client.
|
|
3634
|
+
* await client.actorsListNames({
|
|
4129
3635
|
* namespace: "namespace"
|
|
4130
3636
|
* })
|
|
4131
3637
|
*/
|
|
4132
|
-
async
|
|
4133
|
-
const { namespace, limit, cursor
|
|
3638
|
+
async actorsListNames(request, requestOptions) {
|
|
3639
|
+
const { namespace, limit, cursor } = request;
|
|
4134
3640
|
const _queryParams = {};
|
|
4135
|
-
|
|
3641
|
+
if (namespace != null)
|
|
3642
|
+
_queryParams["namespace"] = namespace;
|
|
4136
3643
|
if (limit != null) {
|
|
4137
3644
|
_queryParams["limit"] = limit.toString();
|
|
4138
3645
|
}
|
|
4139
3646
|
if (cursor != null) {
|
|
4140
3647
|
_queryParams["cursor"] = cursor;
|
|
4141
3648
|
}
|
|
4142
|
-
if (variant != null) {
|
|
4143
|
-
_queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
|
|
4144
|
-
unrecognizedObjectKeys: "strip"
|
|
4145
|
-
});
|
|
4146
|
-
}
|
|
4147
|
-
if (runnerNames != null) {
|
|
4148
|
-
_queryParams["runner_names"] = runnerNames;
|
|
4149
|
-
}
|
|
4150
|
-
if (runnerName != null) {
|
|
4151
|
-
if (Array.isArray(runnerName)) {
|
|
4152
|
-
_queryParams["runner_name"] = runnerName.map((item) => item);
|
|
4153
|
-
} else {
|
|
4154
|
-
_queryParams["runner_name"] = runnerName;
|
|
4155
|
-
}
|
|
4156
|
-
}
|
|
4157
3649
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4158
|
-
url: (0,
|
|
3650
|
+
url: (0, import_url_join6.default)(
|
|
4159
3651
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4160
|
-
"
|
|
3652
|
+
"actors/names"
|
|
4161
3653
|
),
|
|
4162
3654
|
method: "GET",
|
|
4163
3655
|
headers: {
|
|
@@ -4175,7 +3667,7 @@ var RivetClient = class {
|
|
|
4175
3667
|
abortSignal: requestOptions?.abortSignal
|
|
4176
3668
|
});
|
|
4177
3669
|
if (_response.ok) {
|
|
4178
|
-
return
|
|
3670
|
+
return ActorsListNamesResponse.parseOrThrow(_response.body, {
|
|
4179
3671
|
unrecognizedObjectKeys: "passthrough",
|
|
4180
3672
|
allowUnrecognizedUnionMembers: true,
|
|
4181
3673
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4196,7 +3688,7 @@ var RivetClient = class {
|
|
|
4196
3688
|
body: _response.error.rawBody
|
|
4197
3689
|
});
|
|
4198
3690
|
case "timeout":
|
|
4199
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3691
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
|
|
4200
3692
|
case "unknown":
|
|
4201
3693
|
throw new RivetError({
|
|
4202
3694
|
message: _response.error.errorMessage
|
|
@@ -4204,25 +3696,32 @@ var RivetClient = class {
|
|
|
4204
3696
|
}
|
|
4205
3697
|
}
|
|
4206
3698
|
/**
|
|
4207
|
-
*
|
|
3699
|
+
* 2 round trip:
|
|
3700
|
+
*
|
|
3701
|
+
* - DELETE /actors/{}
|
|
3702
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3703
|
+
*
|
|
3704
|
+
* @param {Rivet.RivetId} actorId
|
|
3705
|
+
* @param {Rivet.ActorsDeleteRequest} request
|
|
4208
3706
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4209
3707
|
*
|
|
4210
3708
|
* @example
|
|
4211
|
-
* await client.
|
|
4212
|
-
* namespace: "namespace"
|
|
4213
|
-
* url: "url"
|
|
3709
|
+
* await client.actorsDelete("actor_id", {
|
|
3710
|
+
* namespace: "namespace"
|
|
4214
3711
|
* })
|
|
4215
3712
|
*/
|
|
4216
|
-
|
|
4217
|
-
|
|
3713
|
+
/** Returns one actor by ID. */
|
|
3714
|
+
async actorsGet(actorId, request, requestOptions) {
|
|
3715
|
+
const { namespace } = request;
|
|
4218
3716
|
const _queryParams = {};
|
|
4219
|
-
|
|
3717
|
+
if (namespace != null)
|
|
3718
|
+
_queryParams["namespace"] = namespace;
|
|
4220
3719
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4221
|
-
url: (0,
|
|
3720
|
+
url: (0, import_url_join6.default)(
|
|
4222
3721
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4223
|
-
|
|
3722
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4224
3723
|
),
|
|
4225
|
-
method: "
|
|
3724
|
+
method: "GET",
|
|
4226
3725
|
headers: {
|
|
4227
3726
|
Authorization: await this._getAuthorizationHeader(),
|
|
4228
3727
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4233,15 +3732,12 @@ var RivetClient = class {
|
|
|
4233
3732
|
contentType: "application/json",
|
|
4234
3733
|
queryParameters: _queryParams,
|
|
4235
3734
|
requestType: "json",
|
|
4236
|
-
body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
|
|
4237
|
-
unrecognizedObjectKeys: "strip"
|
|
4238
|
-
}),
|
|
4239
3735
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4240
3736
|
maxRetries: requestOptions?.maxRetries,
|
|
4241
3737
|
abortSignal: requestOptions?.abortSignal
|
|
4242
3738
|
});
|
|
4243
3739
|
if (_response.ok) {
|
|
4244
|
-
return
|
|
3740
|
+
return ActorsGetResponse.parseOrThrow(_response.body, {
|
|
4245
3741
|
unrecognizedObjectKeys: "passthrough",
|
|
4246
3742
|
allowUnrecognizedUnionMembers: true,
|
|
4247
3743
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4262,38 +3758,24 @@ var RivetClient = class {
|
|
|
4262
3758
|
body: _response.error.rawBody
|
|
4263
3759
|
});
|
|
4264
3760
|
case "timeout":
|
|
4265
|
-
throw new RivetTimeoutError(
|
|
4266
|
-
"Timeout exceeded when calling POST /runner-configs/serverless-health-check."
|
|
4267
|
-
);
|
|
3761
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
|
|
4268
3762
|
case "unknown":
|
|
4269
3763
|
throw new RivetError({
|
|
4270
3764
|
message: _response.error.errorMessage
|
|
4271
3765
|
});
|
|
4272
3766
|
}
|
|
4273
3767
|
}
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
* @param {Rivet.RunnerConfigsUpsertRequestBody} request
|
|
4277
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4278
|
-
*
|
|
4279
|
-
* @example
|
|
4280
|
-
* await client.runnerConfigsUpsert("runner_name", {
|
|
4281
|
-
* namespace: "namespace",
|
|
4282
|
-
* datacenters: {
|
|
4283
|
-
* "key": {}
|
|
4284
|
-
* }
|
|
4285
|
-
* })
|
|
4286
|
-
*/
|
|
4287
|
-
async runnerConfigsUpsert(runnerName, request, requestOptions) {
|
|
4288
|
-
const { namespace, ..._body } = request;
|
|
3768
|
+
async actorsDelete(actorId, request, requestOptions) {
|
|
3769
|
+
const { namespace } = request;
|
|
4289
3770
|
const _queryParams = {};
|
|
4290
|
-
|
|
3771
|
+
if (namespace != null)
|
|
3772
|
+
_queryParams["namespace"] = namespace;
|
|
4291
3773
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4292
|
-
url: (0,
|
|
3774
|
+
url: (0, import_url_join6.default)(
|
|
4293
3775
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4294
|
-
`
|
|
3776
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4295
3777
|
),
|
|
4296
|
-
method: "
|
|
3778
|
+
method: "DELETE",
|
|
4297
3779
|
headers: {
|
|
4298
3780
|
Authorization: await this._getAuthorizationHeader(),
|
|
4299
3781
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4304,13 +3786,12 @@ var RivetClient = class {
|
|
|
4304
3786
|
contentType: "application/json",
|
|
4305
3787
|
queryParameters: _queryParams,
|
|
4306
3788
|
requestType: "json",
|
|
4307
|
-
body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4308
3789
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4309
3790
|
maxRetries: requestOptions?.maxRetries,
|
|
4310
3791
|
abortSignal: requestOptions?.abortSignal
|
|
4311
3792
|
});
|
|
4312
3793
|
if (_response.ok) {
|
|
4313
|
-
return
|
|
3794
|
+
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
4314
3795
|
unrecognizedObjectKeys: "passthrough",
|
|
4315
3796
|
allowUnrecognizedUnionMembers: true,
|
|
4316
3797
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4331,7 +3812,7 @@ var RivetClient = class {
|
|
|
4331
3812
|
body: _response.error.rawBody
|
|
4332
3813
|
});
|
|
4333
3814
|
case "timeout":
|
|
4334
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3815
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
4335
3816
|
case "unknown":
|
|
4336
3817
|
throw new RivetError({
|
|
4337
3818
|
message: _response.error.errorMessage
|
|
@@ -4339,25 +3820,26 @@ var RivetClient = class {
|
|
|
4339
3820
|
}
|
|
4340
3821
|
}
|
|
4341
3822
|
/**
|
|
4342
|
-
* @param {
|
|
4343
|
-
* @param {Rivet.
|
|
3823
|
+
* @param {Rivet.RivetId} actorId
|
|
3824
|
+
* @param {Rivet.ActorsRescheduleRequest} request
|
|
4344
3825
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4345
3826
|
*
|
|
4346
3827
|
* @example
|
|
4347
|
-
* await client.
|
|
4348
|
-
* namespace: "namespace"
|
|
3828
|
+
* await client.actorsReschedule("actor_id", {
|
|
3829
|
+
* namespace: "namespace",
|
|
4349
3830
|
* })
|
|
4350
3831
|
*/
|
|
4351
|
-
async
|
|
3832
|
+
async actorsReschedule(actorId, request, requestOptions) {
|
|
4352
3833
|
const { namespace } = request;
|
|
4353
3834
|
const _queryParams = {};
|
|
4354
|
-
|
|
3835
|
+
if (namespace != null)
|
|
3836
|
+
_queryParams["namespace"] = namespace;
|
|
4355
3837
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4356
|
-
url: (0,
|
|
3838
|
+
url: (0, import_url_join6.default)(
|
|
4357
3839
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4358
|
-
`
|
|
3840
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
|
|
4359
3841
|
),
|
|
4360
|
-
method: "
|
|
3842
|
+
method: "POST",
|
|
4361
3843
|
headers: {
|
|
4362
3844
|
Authorization: await this._getAuthorizationHeader(),
|
|
4363
3845
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4373,7 +3855,7 @@ var RivetClient = class {
|
|
|
4373
3855
|
abortSignal: requestOptions?.abortSignal
|
|
4374
3856
|
});
|
|
4375
3857
|
if (_response.ok) {
|
|
4376
|
-
return
|
|
3858
|
+
return ActorsRescheduleResponse.parseOrThrow(_response.body, {
|
|
4377
3859
|
unrecognizedObjectKeys: "passthrough",
|
|
4378
3860
|
allowUnrecognizedUnionMembers: true,
|
|
4379
3861
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4394,9 +3876,7 @@ var RivetClient = class {
|
|
|
4394
3876
|
body: _response.error.rawBody
|
|
4395
3877
|
});
|
|
4396
3878
|
case "timeout":
|
|
4397
|
-
throw new RivetTimeoutError(
|
|
4398
|
-
"Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
|
|
4399
|
-
);
|
|
3879
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
|
|
4400
3880
|
case "unknown":
|
|
4401
3881
|
throw new RivetError({
|
|
4402
3882
|
message: _response.error.errorMessage
|
|
@@ -4404,26 +3884,24 @@ var RivetClient = class {
|
|
|
4404
3884
|
}
|
|
4405
3885
|
}
|
|
4406
3886
|
/**
|
|
4407
|
-
* @param {
|
|
4408
|
-
* @param {Rivet.
|
|
3887
|
+
* @param {Rivet.RivetId} actorId
|
|
3888
|
+
* @param {Rivet.ActorsSleepRequest} request
|
|
4409
3889
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4410
3890
|
*
|
|
4411
3891
|
* @example
|
|
4412
|
-
* await client.
|
|
3892
|
+
* await client.actorsSleep("actor_id", {
|
|
4413
3893
|
* namespace: "namespace",
|
|
4414
|
-
* body: {
|
|
4415
|
-
* "key": "value"
|
|
4416
|
-
* }
|
|
4417
3894
|
* })
|
|
4418
3895
|
*/
|
|
4419
|
-
async
|
|
4420
|
-
const { namespace
|
|
3896
|
+
async actorsSleep(actorId, request, requestOptions) {
|
|
3897
|
+
const { namespace } = request;
|
|
4421
3898
|
const _queryParams = {};
|
|
4422
|
-
|
|
3899
|
+
if (namespace != null)
|
|
3900
|
+
_queryParams["namespace"] = namespace;
|
|
4423
3901
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4424
|
-
url: (0,
|
|
3902
|
+
url: (0, import_url_join6.default)(
|
|
4425
3903
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4426
|
-
`
|
|
3904
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
|
|
4427
3905
|
),
|
|
4428
3906
|
method: "POST",
|
|
4429
3907
|
headers: {
|
|
@@ -4436,15 +3914,12 @@ var RivetClient = class {
|
|
|
4436
3914
|
contentType: "application/json",
|
|
4437
3915
|
queryParameters: _queryParams,
|
|
4438
3916
|
requestType: "json",
|
|
4439
|
-
body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
|
|
4440
|
-
unrecognizedObjectKeys: "strip"
|
|
4441
|
-
}),
|
|
4442
3917
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4443
3918
|
maxRetries: requestOptions?.maxRetries,
|
|
4444
3919
|
abortSignal: requestOptions?.abortSignal
|
|
4445
3920
|
});
|
|
4446
3921
|
if (_response.ok) {
|
|
4447
|
-
return
|
|
3922
|
+
return ActorsSleepResponse.parseOrThrow(_response.body, {
|
|
4448
3923
|
unrecognizedObjectKeys: "passthrough",
|
|
4449
3924
|
allowUnrecognizedUnionMembers: true,
|
|
4450
3925
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4465,9 +3940,7 @@ var RivetClient = class {
|
|
|
4465
3940
|
body: _response.error.rawBody
|
|
4466
3941
|
});
|
|
4467
3942
|
case "timeout":
|
|
4468
|
-
throw new RivetTimeoutError(
|
|
4469
|
-
"Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
|
|
4470
|
-
);
|
|
3943
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
|
|
4471
3944
|
case "unknown":
|
|
4472
3945
|
throw new RivetError({
|
|
4473
3946
|
message: _response.error.errorMessage
|