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