@rivetkit/engine-api-full 0.0.0-active-actors-fix-active-count.253e406 → 0.0.0-bisect-sync-sqlite-1.910d1c7
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 +551 -850
- package/dist/browser/cjs/package.json +3 -0
- package/dist/browser/cjs/serialization.js +155 -287
- package/dist/browser/esm/index.js +551 -850
- package/dist/browser/esm/package.json +3 -0
- package/dist/browser/esm/serialization.js +155 -287
- package/dist/node/cjs/index.js +551 -850
- package/dist/node/cjs/package.json +3 -0
- package/dist/node/cjs/serialization.js +175 -322
- package/dist/node/esm/index.js +551 -850
- package/dist/node/esm/package.json +3 -0
- package/dist/node/esm/serialization.js +155 -287
- package/package.json +7 -2
- package/types/Client.d.ts +16 -83
- 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/ActorsForkRequest.d.ts +14 -0
- 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 +2 -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 +12 -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 +23 -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/ActorsForkResponse.d.ts +4 -0
- 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 -10
- package/types/api/types/Namespace.d.ts +13 -6
- package/types/api/types/NamespaceForkedFrom.d.ts +14 -0
- package/types/api/types/NamespaceListResponse.d.ts +1 -4
- package/types/api/types/NamespaceSkippedActor.d.ts +14 -0
- package/types/api/types/NamespaceStatus.d.ts +18 -0
- package/types/api/types/{HealthFanoutResponse.d.ts → NamespacesArchiveResponse.d.ts} +2 -2
- package/types/api/types/NamespacesCreateResponse.d.ts +0 -3
- package/types/api/types/Node.d.ts +20 -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 +19 -33
- package/types/serialization/client/requests/ActorsCreateRequest.d.ts +1 -4
- package/types/serialization/client/requests/ActorsForkRequest.d.ts +10 -0
- package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +2 -5
- package/types/serialization/client/requests/index.d.ts +1 -2
- package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +0 -1
- package/types/serialization/types/Actor.d.ts +11 -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/ActorsForkResponse.d.ts +10 -0
- 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 -10
- package/types/serialization/types/Namespace.d.ts +9 -7
- package/types/serialization/types/NamespaceForkedFrom.d.ts +14 -0
- package/types/serialization/types/NamespaceListResponse.d.ts +1 -4
- package/types/serialization/types/NamespaceSkippedActor.d.ts +14 -0
- package/types/serialization/types/NamespaceStatus.d.ts +10 -0
- package/types/serialization/types/NamespacesArchiveResponse.d.ts +13 -0
- package/types/serialization/types/NamespacesCreateResponse.d.ts +0 -3
- package/types/serialization/types/Node.d.ts +17 -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 +19 -33
- 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/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 -10
- package/types/api/types/RunnerConfigKind.d.ts +0 -5
- package/types/api/types/RunnerConfigKindNormal.d.ts +0 -6
- package/types/api/types/RunnerConfigKindServerless.d.ts +0 -7
- package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +0 -22
- package/types/api/types/RunnerConfigResponse.d.ts +0 -8
- package/types/api/types/RunnerConfigServerless.d.ts +0 -22
- 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 -16
- package/types/serialization/types/RunnerConfigKind.d.ts +0 -12
- package/types/serialization/types/RunnerConfigKindNormal.d.ts +0 -12
- package/types/serialization/types/RunnerConfigKindServerless.d.ts +0 -13
- package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +0 -21
- package/types/serialization/types/RunnerConfigResponse.d.ts +0 -14
- package/types/serialization/types/RunnerConfigServerless.d.ts +0 -21
- package/types/serialization/types/RunnerConfigVariant.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsListResponse.d.ts +0 -15
- package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +0 -10
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +0 -12
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +0 -13
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +0 -12
- package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +0 -14
- package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +0 -12
- package/types/serialization/types/RunnersListNamesResponse.d.ts +0 -14
- package/types/serialization/types/RunnersListResponse.d.ts +0 -15
- /package/types/api/resources/{envoys → authTokens}/index.d.ts +0 -0
- /package/types/api/resources/{envoys → pools}/client/index.d.ts +0 -0
- /package/types/api/resources/{health → pools}/index.d.ts +0 -0
|
@@ -580,53 +580,29 @@ module.exports = __toCommonJS(src_exports);
|
|
|
580
580
|
// src/api/index.ts
|
|
581
581
|
var api_exports = {};
|
|
582
582
|
__export(api_exports, {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
RunnerConfigVariant: () => RunnerConfigVariant,
|
|
583
|
+
NamespaceStatus: () => NamespaceStatus,
|
|
584
|
+
authTokens: () => authTokens_exports,
|
|
586
585
|
datacenters: () => datacenters_exports,
|
|
587
|
-
envoys: () => envoys_exports,
|
|
588
|
-
health: () => health_exports,
|
|
589
586
|
metadata: () => metadata_exports,
|
|
590
|
-
namespaces: () =>
|
|
591
|
-
|
|
587
|
+
namespaces: () => namespaces_exports2,
|
|
588
|
+
pools: () => pools_exports
|
|
592
589
|
});
|
|
593
590
|
|
|
594
|
-
// src/api/types/
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
591
|
+
// src/api/types/NamespaceStatus.ts
|
|
592
|
+
var NamespaceStatus = {
|
|
593
|
+
Creating: "creating",
|
|
594
|
+
Forking: "forking",
|
|
595
|
+
Live: "live",
|
|
596
|
+
Archiving: "archiving",
|
|
597
|
+
Archived: "archived",
|
|
598
|
+
Failed: "failed"
|
|
599
599
|
};
|
|
600
600
|
|
|
601
|
-
// src/api/
|
|
602
|
-
var
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
// src/api/types/RunnerConfigVariant.ts
|
|
608
|
-
var RunnerConfigVariant = {
|
|
609
|
-
Serverless: "serverless",
|
|
610
|
-
Normal: "normal"
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
// src/api/resources/datacenters/index.ts
|
|
614
|
-
var datacenters_exports = {};
|
|
615
|
-
|
|
616
|
-
// src/api/resources/envoys/index.ts
|
|
617
|
-
var envoys_exports = {};
|
|
618
|
-
|
|
619
|
-
// src/api/resources/health/index.ts
|
|
620
|
-
var health_exports = {};
|
|
621
|
-
|
|
622
|
-
// src/api/resources/metadata/index.ts
|
|
623
|
-
var metadata_exports = {};
|
|
624
|
-
|
|
625
|
-
// src/api/resources/namespaces/index.ts
|
|
626
|
-
var namespaces_exports = {};
|
|
627
|
-
|
|
628
|
-
// src/api/resources/runners/index.ts
|
|
629
|
-
var runners_exports = {};
|
|
601
|
+
// src/api/resources/authTokens/index.ts
|
|
602
|
+
var authTokens_exports = {};
|
|
603
|
+
__export(authTokens_exports, {
|
|
604
|
+
AuthTokens: () => AuthTokens
|
|
605
|
+
});
|
|
630
606
|
|
|
631
607
|
// src/core/json.ts
|
|
632
608
|
var toJson = (value, replacer, space) => {
|
|
@@ -2340,6 +2316,9 @@ function transformAndValidateUnion({
|
|
|
2340
2316
|
};
|
|
2341
2317
|
}
|
|
2342
2318
|
|
|
2319
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2320
|
+
var import_url_join = __toESM(require("url-join"));
|
|
2321
|
+
|
|
2343
2322
|
// src/serialization/index.ts
|
|
2344
2323
|
var serialization_exports = {};
|
|
2345
2324
|
__export(serialization_exports, {
|
|
@@ -2348,82 +2327,62 @@ __export(serialization_exports, {
|
|
|
2348
2327
|
ActorsCreateRequest: () => ActorsCreateRequest,
|
|
2349
2328
|
ActorsCreateResponse: () => ActorsCreateResponse,
|
|
2350
2329
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
2330
|
+
ActorsForkRequest: () => ActorsForkRequest,
|
|
2331
|
+
ActorsForkResponse: () => ActorsForkResponse,
|
|
2351
2332
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
2352
2333
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
2353
|
-
|
|
2334
|
+
ActorsGetResponse: () => ActorsGetResponse,
|
|
2354
2335
|
ActorsListNamesResponse: () => ActorsListNamesResponse,
|
|
2355
2336
|
ActorsListResponse: () => ActorsListResponse,
|
|
2356
|
-
ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
|
|
2357
2337
|
ActorsRescheduleResponse: () => ActorsRescheduleResponse,
|
|
2358
|
-
ActorsSleepRequestBody: () => ActorsSleepRequestBody,
|
|
2359
2338
|
ActorsSleepResponse: () => ActorsSleepResponse,
|
|
2360
|
-
|
|
2339
|
+
AuthOperationKind: () => AuthOperationKind,
|
|
2340
|
+
AuthResourceKind: () => AuthResourceKind,
|
|
2341
|
+
AuthTargetScope: () => AuthTargetScope,
|
|
2342
|
+
AuthTokenCreateResponse: () => AuthTokenCreateResponse,
|
|
2343
|
+
AuthTokenGrant: () => AuthTokenGrant,
|
|
2344
|
+
AuthTokenInspectResponse: () => AuthTokenInspectResponse,
|
|
2361
2345
|
Datacenter: () => Datacenter,
|
|
2362
|
-
DatacenterHealth: () => DatacenterHealth,
|
|
2363
2346
|
DatacentersListResponse: () => DatacentersListResponse,
|
|
2364
|
-
|
|
2365
|
-
EnvoysListResponse: () => EnvoysListResponse,
|
|
2366
|
-
HealthFanoutResponse: () => HealthFanoutResponse,
|
|
2367
|
-
HealthResponse: () => HealthResponse,
|
|
2368
|
-
HealthStatus: () => HealthStatus2,
|
|
2347
|
+
ErrorResponse: () => ErrorResponse,
|
|
2369
2348
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
2370
2349
|
Namespace: () => Namespace,
|
|
2350
|
+
NamespaceForkedFrom: () => NamespaceForkedFrom,
|
|
2371
2351
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
2352
|
+
NamespaceSkippedActor: () => NamespaceSkippedActor,
|
|
2353
|
+
NamespaceStatus: () => NamespaceStatus2,
|
|
2354
|
+
NamespacesArchiveResponse: () => NamespacesArchiveResponse,
|
|
2372
2355
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
2373
2356
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
2357
|
+
Node: () => Node,
|
|
2374
2358
|
Pagination: () => Pagination,
|
|
2359
|
+
Pool: () => Pool,
|
|
2360
|
+
PoolResponse: () => PoolResponse,
|
|
2361
|
+
PoolsDeleteResponse: () => PoolsDeleteResponse,
|
|
2362
|
+
PoolsListNodesResponse: () => PoolsListNodesResponse,
|
|
2363
|
+
PoolsListResponse: () => PoolsListResponse,
|
|
2375
2364
|
RivetId: () => RivetId,
|
|
2376
|
-
|
|
2377
|
-
RunnerConfig: () => RunnerConfig,
|
|
2378
|
-
RunnerConfigKind: () => RunnerConfigKind,
|
|
2379
|
-
RunnerConfigKindNormal: () => RunnerConfigKindNormal,
|
|
2380
|
-
RunnerConfigKindServerless: () => RunnerConfigKindServerless,
|
|
2381
|
-
RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
|
|
2382
|
-
RunnerConfigResponse: () => RunnerConfigResponse,
|
|
2383
|
-
RunnerConfigServerless: () => RunnerConfigServerless,
|
|
2384
|
-
RunnerConfigVariant: () => RunnerConfigVariant2,
|
|
2385
|
-
RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
|
|
2386
|
-
RunnerConfigsListResponse: () => RunnerConfigsListResponse,
|
|
2387
|
-
RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
|
|
2388
|
-
RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
|
|
2389
|
-
RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
|
|
2390
|
-
RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
|
|
2391
|
-
RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
|
|
2392
|
-
RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
|
|
2393
|
-
RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
|
|
2394
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2395
|
-
RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
|
|
2396
|
-
RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
|
|
2397
|
-
RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
|
|
2398
|
-
RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
|
|
2399
|
-
RunnersListNamesResponse: () => RunnersListNamesResponse,
|
|
2400
|
-
RunnersListResponse: () => RunnersListResponse,
|
|
2401
|
-
namespaces: () => namespaces_exports2
|
|
2365
|
+
namespaces: () => namespaces_exports
|
|
2402
2366
|
});
|
|
2403
2367
|
|
|
2404
2368
|
// src/serialization/types/RivetId.ts
|
|
2405
2369
|
var RivetId = schemas_exports.string();
|
|
2406
2370
|
|
|
2407
|
-
// src/serialization/types/CrashPolicy.ts
|
|
2408
|
-
var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
|
|
2409
|
-
|
|
2410
2371
|
// src/serialization/types/Actor.ts
|
|
2411
2372
|
var Actor = schemas_exports.object({
|
|
2412
2373
|
actorId: schemas_exports.property("actor_id", RivetId),
|
|
2413
|
-
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
|
|
2414
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2415
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2416
|
-
datacenter: schemas_exports.string(),
|
|
2417
|
-
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
|
|
2418
|
-
error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2419
|
-
key: schemas_exports.string().optional(),
|
|
2420
2374
|
name: schemas_exports.string(),
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2375
|
+
key: schemas_exports.string(),
|
|
2376
|
+
namespace: schemas_exports.string(),
|
|
2377
|
+
pool: schemas_exports.string(),
|
|
2378
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2379
|
+
startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
|
|
2380
|
+
pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
|
|
2381
|
+
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
|
|
2382
|
+
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
|
|
2383
|
+
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
|
|
2384
|
+
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable()),
|
|
2385
|
+
forkedFrom: schemas_exports.property("forked_from", RivetId.nullable().optional())
|
|
2427
2386
|
});
|
|
2428
2387
|
|
|
2429
2388
|
// src/serialization/types/ActorName.ts
|
|
@@ -2433,11 +2392,17 @@ var ActorName = schemas_exports.object({
|
|
|
2433
2392
|
|
|
2434
2393
|
// src/serialization/types/ActorsCreateResponse.ts
|
|
2435
2394
|
var ActorsCreateResponse = schemas_exports.object({
|
|
2436
|
-
actor: Actor
|
|
2395
|
+
actor: Actor,
|
|
2396
|
+
created: schemas_exports.boolean()
|
|
2437
2397
|
});
|
|
2438
2398
|
|
|
2439
2399
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
2440
|
-
var ActorsDeleteResponse = schemas_exports.
|
|
2400
|
+
var ActorsDeleteResponse = schemas_exports.object({});
|
|
2401
|
+
|
|
2402
|
+
// src/serialization/types/ActorsForkResponse.ts
|
|
2403
|
+
var ActorsForkResponse = schemas_exports.object({
|
|
2404
|
+
actor: Actor
|
|
2405
|
+
});
|
|
2441
2406
|
|
|
2442
2407
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
2443
2408
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
@@ -2445,21 +2410,19 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
|
2445
2410
|
created: schemas_exports.boolean()
|
|
2446
2411
|
});
|
|
2447
2412
|
|
|
2448
|
-
// src/serialization/types/
|
|
2449
|
-
var
|
|
2450
|
-
|
|
2451
|
-
value: schemas_exports.string()
|
|
2452
|
-
});
|
|
2453
|
-
|
|
2454
|
-
// src/serialization/types/Pagination.ts
|
|
2455
|
-
var Pagination = schemas_exports.object({
|
|
2456
|
-
cursor: schemas_exports.string().optional()
|
|
2413
|
+
// src/serialization/types/ActorsGetResponse.ts
|
|
2414
|
+
var ActorsGetResponse = schemas_exports.object({
|
|
2415
|
+
actor: Actor
|
|
2457
2416
|
});
|
|
2458
2417
|
|
|
2459
2418
|
// src/serialization/types/ActorsListNamesResponse.ts
|
|
2460
2419
|
var ActorsListNamesResponse = schemas_exports.object({
|
|
2461
|
-
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2462
|
-
|
|
2420
|
+
names: schemas_exports.record(schemas_exports.string(), ActorName)
|
|
2421
|
+
});
|
|
2422
|
+
|
|
2423
|
+
// src/serialization/types/Pagination.ts
|
|
2424
|
+
var Pagination = schemas_exports.object({
|
|
2425
|
+
cursor: schemas_exports.string().nullable()
|
|
2463
2426
|
});
|
|
2464
2427
|
|
|
2465
2428
|
// src/serialization/types/ActorsListResponse.ts
|
|
@@ -2468,96 +2431,98 @@ var ActorsListResponse = schemas_exports.object({
|
|
|
2468
2431
|
pagination: Pagination
|
|
2469
2432
|
});
|
|
2470
2433
|
|
|
2471
|
-
// src/serialization/types/ActorsRescheduleRequestBody.ts
|
|
2472
|
-
var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2473
|
-
|
|
2474
2434
|
// src/serialization/types/ActorsRescheduleResponse.ts
|
|
2475
|
-
var ActorsRescheduleResponse = schemas_exports.
|
|
2476
|
-
|
|
2477
|
-
// src/serialization/types/ActorsSleepRequestBody.ts
|
|
2478
|
-
var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2435
|
+
var ActorsRescheduleResponse = schemas_exports.object({});
|
|
2479
2436
|
|
|
2480
2437
|
// src/serialization/types/ActorsSleepResponse.ts
|
|
2481
|
-
var ActorsSleepResponse = schemas_exports.
|
|
2438
|
+
var ActorsSleepResponse = schemas_exports.object({});
|
|
2482
2439
|
|
|
2483
|
-
// src/serialization/types/
|
|
2484
|
-
var
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2440
|
+
// src/serialization/types/AuthOperationKind.ts
|
|
2441
|
+
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete", "fork"]);
|
|
2442
|
+
|
|
2443
|
+
// src/serialization/types/AuthResourceKind.ts
|
|
2444
|
+
var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
|
|
2445
|
+
|
|
2446
|
+
// src/serialization/types/AuthTargetScope.ts
|
|
2447
|
+
var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
|
|
2448
|
+
id: RivetId
|
|
2449
|
+
})]);
|
|
2450
|
+
|
|
2451
|
+
// src/serialization/types/AuthTokenCreateResponse.ts
|
|
2452
|
+
var AuthTokenCreateResponse = schemas_exports.object({
|
|
2453
|
+
token: schemas_exports.string(),
|
|
2454
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2455
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2488
2456
|
});
|
|
2489
2457
|
|
|
2490
|
-
// src/serialization/types/
|
|
2491
|
-
var
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2458
|
+
// src/serialization/types/AuthTokenGrant.ts
|
|
2459
|
+
var AuthTokenGrant = schemas_exports.object({
|
|
2460
|
+
resource: AuthResourceKind,
|
|
2461
|
+
target: AuthTargetScope,
|
|
2462
|
+
operations: schemas_exports.list(AuthOperationKind)
|
|
2495
2463
|
});
|
|
2496
2464
|
|
|
2497
|
-
// src/serialization/types/
|
|
2498
|
-
var
|
|
2465
|
+
// src/serialization/types/AuthTokenInspectResponse.ts
|
|
2466
|
+
var AuthTokenInspectResponse = schemas_exports.object({
|
|
2467
|
+
namespace: schemas_exports.string(),
|
|
2468
|
+
subject: schemas_exports.string().nullable(),
|
|
2469
|
+
grants: schemas_exports.list(AuthTokenGrant),
|
|
2470
|
+
issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
|
|
2471
|
+
expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
|
|
2472
|
+
});
|
|
2499
2473
|
|
|
2500
|
-
// src/serialization/types/
|
|
2501
|
-
var
|
|
2502
|
-
|
|
2503
|
-
datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
|
|
2504
|
-
error: schemas_exports.string().optional(),
|
|
2505
|
-
response: HealthResponse.optional(),
|
|
2506
|
-
rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
|
|
2507
|
-
status: HealthStatus2
|
|
2474
|
+
// src/serialization/types/Datacenter.ts
|
|
2475
|
+
var Datacenter = schemas_exports.object({
|
|
2476
|
+
name: schemas_exports.string()
|
|
2508
2477
|
});
|
|
2509
2478
|
|
|
2510
2479
|
// src/serialization/types/DatacentersListResponse.ts
|
|
2511
2480
|
var DatacentersListResponse = schemas_exports.object({
|
|
2512
|
-
datacenters: schemas_exports.list(Datacenter)
|
|
2513
|
-
pagination: Pagination
|
|
2481
|
+
datacenters: schemas_exports.list(Datacenter)
|
|
2514
2482
|
});
|
|
2515
2483
|
|
|
2516
|
-
// src/serialization/types/
|
|
2517
|
-
var
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2523
|
-
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2524
|
-
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2525
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2526
|
-
poolName: schemas_exports.property("pool_name", schemas_exports.string()),
|
|
2527
|
-
slots: schemas_exports.number(),
|
|
2528
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2529
|
-
version: schemas_exports.number()
|
|
2484
|
+
// src/serialization/types/ErrorResponse.ts
|
|
2485
|
+
var ErrorResponse = schemas_exports.object({
|
|
2486
|
+
group: schemas_exports.string(),
|
|
2487
|
+
code: schemas_exports.string(),
|
|
2488
|
+
message: schemas_exports.string(),
|
|
2489
|
+
metadata: schemas_exports.unknown().optional()
|
|
2530
2490
|
});
|
|
2531
2491
|
|
|
2532
|
-
// src/serialization/types/
|
|
2533
|
-
var
|
|
2534
|
-
|
|
2535
|
-
|
|
2492
|
+
// src/serialization/types/MetadataGetResponse.ts
|
|
2493
|
+
var MetadataGetResponse = schemas_exports.object({
|
|
2494
|
+
runtime: schemas_exports.stringLiteral("engine"),
|
|
2495
|
+
version: schemas_exports.string(),
|
|
2496
|
+
envoyProtocolVersion: schemas_exports.number(),
|
|
2497
|
+
actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
|
|
2536
2498
|
});
|
|
2537
2499
|
|
|
2538
|
-
// src/serialization/types/
|
|
2539
|
-
var
|
|
2540
|
-
|
|
2500
|
+
// src/serialization/types/NamespaceStatus.ts
|
|
2501
|
+
var NamespaceStatus2 = schemas_exports.enum_(["creating", "forking", "live", "archiving", "archived", "failed"]);
|
|
2502
|
+
|
|
2503
|
+
// src/serialization/types/NamespaceForkedFrom.ts
|
|
2504
|
+
var NamespaceForkedFrom = schemas_exports.object({
|
|
2505
|
+
namespace: schemas_exports.string(),
|
|
2506
|
+
forkNumber: schemas_exports.property("fork_number", schemas_exports.number()),
|
|
2507
|
+
forkedTs: schemas_exports.property("forked_ts", schemas_exports.number())
|
|
2541
2508
|
});
|
|
2542
2509
|
|
|
2543
|
-
// src/serialization/types/
|
|
2544
|
-
var
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
|
|
2549
|
-
runtime: schemas_exports.string(),
|
|
2550
|
-
rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
|
|
2551
|
-
rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
|
|
2552
|
-
version: schemas_exports.string()
|
|
2510
|
+
// src/serialization/types/NamespaceSkippedActor.ts
|
|
2511
|
+
var NamespaceSkippedActor = schemas_exports.object({
|
|
2512
|
+
actorId: schemas_exports.property("actor_id", schemas_exports.string()),
|
|
2513
|
+
name: schemas_exports.string(),
|
|
2514
|
+
key: schemas_exports.string().nullable()
|
|
2553
2515
|
});
|
|
2554
2516
|
|
|
2555
2517
|
// src/serialization/types/Namespace.ts
|
|
2556
2518
|
var Namespace = schemas_exports.object({
|
|
2557
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2558
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2559
2519
|
name: schemas_exports.string(),
|
|
2560
|
-
|
|
2520
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2521
|
+
status: NamespaceStatus2,
|
|
2522
|
+
forkedFrom: schemas_exports.property("forked_from", NamespaceForkedFrom.nullable()),
|
|
2523
|
+
archivedTs: schemas_exports.property("archived_ts", schemas_exports.number().nullable()),
|
|
2524
|
+
skipped: schemas_exports.list(NamespaceSkippedActor).optional(),
|
|
2525
|
+
skippedCount: schemas_exports.property("skipped_count", schemas_exports.number().optional())
|
|
2561
2526
|
});
|
|
2562
2527
|
|
|
2563
2528
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -2571,208 +2536,87 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
2571
2536
|
namespace: Namespace
|
|
2572
2537
|
});
|
|
2573
2538
|
|
|
2574
|
-
// src/serialization/types/
|
|
2575
|
-
var
|
|
2576
|
-
|
|
2577
|
-
datacenter: schemas_exports.string(),
|
|
2578
|
-
drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
|
|
2579
|
-
key: schemas_exports.string(),
|
|
2580
|
-
lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
|
|
2581
|
-
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2582
|
-
lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
|
|
2583
|
-
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2584
|
-
name: schemas_exports.string(),
|
|
2585
|
-
namespaceId: schemas_exports.property("namespace_id", RivetId),
|
|
2586
|
-
remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
|
|
2587
|
-
runnerId: schemas_exports.property("runner_id", RivetId),
|
|
2588
|
-
stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
|
|
2589
|
-
totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
|
|
2590
|
-
version: schemas_exports.number()
|
|
2591
|
-
});
|
|
2592
|
-
|
|
2593
|
-
// src/serialization/types/RunnerConfigServerless.ts
|
|
2594
|
-
var RunnerConfigServerless = schemas_exports.object({
|
|
2595
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2596
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2597
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2598
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
|
|
2599
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2600
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2601
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2602
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2603
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
|
|
2604
|
-
url: schemas_exports.string()
|
|
2605
|
-
});
|
|
2606
|
-
|
|
2607
|
-
// src/serialization/types/RunnerConfig.ts
|
|
2608
|
-
var RunnerConfig = schemas_exports.object({
|
|
2609
|
-
normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
|
|
2610
|
-
serverless: RunnerConfigServerless.optional(),
|
|
2611
|
-
drainOnVersionUpgrade: schemas_exports.property(
|
|
2612
|
-
"drain_on_version_upgrade",
|
|
2613
|
-
schemas_exports.boolean().optional()
|
|
2614
|
-
),
|
|
2615
|
-
metadata: schemas_exports.unknown().optional()
|
|
2616
|
-
});
|
|
2617
|
-
|
|
2618
|
-
// src/serialization/types/RunnerConfigKindNormal.ts
|
|
2619
|
-
var RunnerConfigKindNormal = schemas_exports.object({
|
|
2620
|
-
normal: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown())
|
|
2621
|
-
});
|
|
2622
|
-
|
|
2623
|
-
// src/serialization/types/RunnerConfigKindServerlessServerless.ts
|
|
2624
|
-
var RunnerConfigKindServerlessServerless = schemas_exports.object({
|
|
2625
|
-
drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
|
|
2626
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2627
|
-
maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
|
|
2628
|
-
maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
|
|
2629
|
-
metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
|
|
2630
|
-
minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
|
|
2631
|
-
requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
|
|
2632
|
-
runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
|
|
2633
|
-
slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
|
|
2634
|
-
url: schemas_exports.string()
|
|
2635
|
-
});
|
|
2636
|
-
|
|
2637
|
-
// src/serialization/types/RunnerConfigKindServerless.ts
|
|
2638
|
-
var RunnerConfigKindServerless = schemas_exports.object({
|
|
2639
|
-
serverless: RunnerConfigKindServerlessServerless
|
|
2640
|
-
});
|
|
2641
|
-
|
|
2642
|
-
// src/serialization/types/RunnerConfigKind.ts
|
|
2643
|
-
var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
|
|
2644
|
-
|
|
2645
|
-
// src/serialization/types/RunnerConfigResponse.ts
|
|
2646
|
-
var RunnerConfigResponse = schemas_exports.object({
|
|
2647
|
-
protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
|
|
2648
|
-
runnerPoolError: schemas_exports.property(
|
|
2649
|
-
"runner_pool_error",
|
|
2650
|
-
schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
|
|
2651
|
-
)
|
|
2652
|
-
}).extend(RunnerConfig);
|
|
2653
|
-
|
|
2654
|
-
// src/serialization/types/RunnerConfigVariant.ts
|
|
2655
|
-
var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
|
|
2656
|
-
|
|
2657
|
-
// src/serialization/types/RunnerConfigsDeleteResponse.ts
|
|
2658
|
-
var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2659
|
-
|
|
2660
|
-
// src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
|
|
2661
|
-
var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
|
|
2662
|
-
datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
|
|
2663
|
-
});
|
|
2664
|
-
|
|
2665
|
-
// src/serialization/types/RunnerConfigsListResponse.ts
|
|
2666
|
-
var RunnerConfigsListResponse = schemas_exports.object({
|
|
2667
|
-
pagination: Pagination,
|
|
2668
|
-
runnerConfigs: schemas_exports.property(
|
|
2669
|
-
"runner_configs",
|
|
2670
|
-
schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
|
|
2671
|
-
)
|
|
2672
|
-
});
|
|
2673
|
-
|
|
2674
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
|
|
2675
|
-
var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2676
|
-
|
|
2677
|
-
// src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
|
|
2678
|
-
var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
|
|
2679
|
-
|
|
2680
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
|
|
2681
|
-
var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
|
|
2682
|
-
version: schemas_exports.string()
|
|
2683
|
-
});
|
|
2684
|
-
|
|
2685
|
-
// src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
|
|
2686
|
-
var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
|
|
2687
|
-
success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
|
|
2539
|
+
// src/serialization/types/NamespacesArchiveResponse.ts
|
|
2540
|
+
var NamespacesArchiveResponse = schemas_exports.object({
|
|
2541
|
+
namespace: Namespace
|
|
2688
2542
|
});
|
|
2689
2543
|
|
|
2690
|
-
// src/serialization/types/
|
|
2691
|
-
var
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2544
|
+
// src/serialization/types/Node.ts
|
|
2545
|
+
var Node = schemas_exports.object({
|
|
2546
|
+
key: schemas_exports.string(),
|
|
2547
|
+
pool: schemas_exports.string(),
|
|
2548
|
+
namespace: schemas_exports.string(),
|
|
2549
|
+
datacenter: schemas_exports.string(),
|
|
2550
|
+
version: schemas_exports.number(),
|
|
2551
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
2552
|
+
lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
|
|
2553
|
+
connected: schemas_exports.boolean(),
|
|
2554
|
+
stopping: schemas_exports.boolean()
|
|
2695
2555
|
});
|
|
2696
2556
|
|
|
2697
|
-
// src/serialization/types/
|
|
2698
|
-
var
|
|
2699
|
-
|
|
2557
|
+
// src/serialization/types/Pool.ts
|
|
2558
|
+
var Pool = schemas_exports.object({
|
|
2559
|
+
name: schemas_exports.string(),
|
|
2560
|
+
drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
|
|
2561
|
+
actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
|
|
2562
|
+
actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
|
|
2563
|
+
actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
|
|
2564
|
+
metadata: schemas_exports.unknown()
|
|
2700
2565
|
});
|
|
2701
2566
|
|
|
2702
|
-
// src/serialization/types/
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2567
|
+
// src/serialization/types/PoolResponse.ts
|
|
2568
|
+
var PoolResponse = schemas_exports.object({
|
|
2569
|
+
pool: Pool
|
|
2705
2570
|
});
|
|
2706
2571
|
|
|
2707
|
-
// src/serialization/types/
|
|
2708
|
-
var
|
|
2709
|
-
RunnerConfigsServerlessHealthCheckResponseSuccess,
|
|
2710
|
-
RunnerConfigsServerlessHealthCheckResponseFailure
|
|
2711
|
-
]);
|
|
2712
|
-
|
|
2713
|
-
// src/serialization/types/RunnerConfigsUpsertResponse.ts
|
|
2714
|
-
var RunnerConfigsUpsertResponse = schemas_exports.object({
|
|
2715
|
-
endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
|
|
2716
|
-
});
|
|
2572
|
+
// src/serialization/types/PoolsDeleteResponse.ts
|
|
2573
|
+
var PoolsDeleteResponse = schemas_exports.object({});
|
|
2717
2574
|
|
|
2718
|
-
// src/serialization/types/
|
|
2719
|
-
var
|
|
2720
|
-
|
|
2575
|
+
// src/serialization/types/PoolsListNodesResponse.ts
|
|
2576
|
+
var PoolsListNodesResponse = schemas_exports.object({
|
|
2577
|
+
nodes: schemas_exports.list(Node),
|
|
2721
2578
|
pagination: Pagination
|
|
2722
2579
|
});
|
|
2723
2580
|
|
|
2724
|
-
// src/serialization/types/
|
|
2725
|
-
var
|
|
2581
|
+
// src/serialization/types/PoolsListResponse.ts
|
|
2582
|
+
var PoolsListResponse = schemas_exports.object({
|
|
2726
2583
|
pagination: Pagination,
|
|
2727
|
-
|
|
2584
|
+
pools: schemas_exports.list(Pool)
|
|
2728
2585
|
});
|
|
2729
2586
|
|
|
2730
2587
|
// src/serialization/client/requests/ActorsCreateRequest.ts
|
|
2731
2588
|
var ActorsCreateRequest = schemas_exports.object({
|
|
2732
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2733
|
-
datacenter: schemas_exports.string().optional(),
|
|
2734
2589
|
input: schemas_exports.string().optional(),
|
|
2735
2590
|
key: schemas_exports.string().optional(),
|
|
2736
2591
|
name: schemas_exports.string(),
|
|
2737
|
-
|
|
2592
|
+
pool: schemas_exports.string().optional()
|
|
2738
2593
|
});
|
|
2739
2594
|
|
|
2740
2595
|
// src/serialization/client/requests/ActorsGetOrCreateRequest.ts
|
|
2741
2596
|
var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
2742
|
-
crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
|
|
2743
|
-
datacenter: schemas_exports.string().optional(),
|
|
2744
2597
|
input: schemas_exports.string().optional(),
|
|
2745
|
-
key: schemas_exports.string(),
|
|
2598
|
+
key: schemas_exports.string().optional(),
|
|
2746
2599
|
name: schemas_exports.string(),
|
|
2747
|
-
|
|
2748
|
-
});
|
|
2749
|
-
|
|
2750
|
-
// src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
|
|
2751
|
-
var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
|
|
2752
|
-
headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
2753
|
-
url: schemas_exports.string()
|
|
2600
|
+
pool: schemas_exports.string().optional()
|
|
2754
2601
|
});
|
|
2755
2602
|
|
|
2756
|
-
// src/serialization/client/requests/
|
|
2757
|
-
var
|
|
2758
|
-
|
|
2603
|
+
// src/serialization/client/requests/ActorsForkRequest.ts
|
|
2604
|
+
var ActorsForkRequest = schemas_exports.object({
|
|
2605
|
+
key: schemas_exports.string().optional(),
|
|
2606
|
+
input: schemas_exports.string().optional()
|
|
2759
2607
|
});
|
|
2760
2608
|
|
|
2761
2609
|
// src/serialization/resources/namespaces/index.ts
|
|
2762
|
-
var
|
|
2763
|
-
__export(
|
|
2610
|
+
var namespaces_exports = {};
|
|
2611
|
+
__export(namespaces_exports, {
|
|
2764
2612
|
NamespacesCreateRequest: () => NamespacesCreateRequest
|
|
2765
2613
|
});
|
|
2766
2614
|
|
|
2767
2615
|
// src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
|
|
2768
2616
|
var NamespacesCreateRequest = schemas_exports.object({
|
|
2769
|
-
displayName: schemas_exports.property("display_name", schemas_exports.string()),
|
|
2770
2617
|
name: schemas_exports.string()
|
|
2771
2618
|
});
|
|
2772
2619
|
|
|
2773
|
-
// src/Client.ts
|
|
2774
|
-
var import_url_join7 = __toESM(require("url-join"));
|
|
2775
|
-
|
|
2776
2620
|
// src/errors/RivetError.ts
|
|
2777
2621
|
var RivetError = class _RivetError extends Error {
|
|
2778
2622
|
statusCode;
|
|
@@ -2814,25 +2658,18 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
|
|
|
2814
2658
|
}
|
|
2815
2659
|
};
|
|
2816
2660
|
|
|
2817
|
-
// src/api/resources/
|
|
2818
|
-
var
|
|
2819
|
-
var Datacenters = class {
|
|
2661
|
+
// src/api/resources/authTokens/client/Client.ts
|
|
2662
|
+
var AuthTokens = class {
|
|
2820
2663
|
constructor(_options) {
|
|
2821
2664
|
this._options = _options;
|
|
2822
2665
|
}
|
|
2823
|
-
|
|
2824
|
-
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
2825
|
-
*
|
|
2826
|
-
* @example
|
|
2827
|
-
* await client.datacenters.list()
|
|
2828
|
-
*/
|
|
2829
|
-
async list(requestOptions) {
|
|
2666
|
+
async create(request, requestOptions) {
|
|
2830
2667
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2831
2668
|
url: (0, import_url_join.default)(
|
|
2832
2669
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2833
|
-
"
|
|
2670
|
+
"auth/tokens"
|
|
2834
2671
|
),
|
|
2835
|
-
method: "
|
|
2672
|
+
method: "POST",
|
|
2836
2673
|
headers: {
|
|
2837
2674
|
Authorization: await this._getAuthorizationHeader(),
|
|
2838
2675
|
"X-Fern-Language": "JavaScript",
|
|
@@ -2842,12 +2679,18 @@ var Datacenters = class {
|
|
|
2842
2679
|
},
|
|
2843
2680
|
contentType: "application/json",
|
|
2844
2681
|
requestType: "json",
|
|
2682
|
+
body: {
|
|
2683
|
+
namespace: request.namespace,
|
|
2684
|
+
duration: request.duration,
|
|
2685
|
+
subject: request.subject,
|
|
2686
|
+
grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
|
|
2687
|
+
},
|
|
2845
2688
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2846
2689
|
maxRetries: requestOptions?.maxRetries,
|
|
2847
2690
|
abortSignal: requestOptions?.abortSignal
|
|
2848
2691
|
});
|
|
2849
2692
|
if (_response.ok) {
|
|
2850
|
-
return
|
|
2693
|
+
return AuthTokenCreateResponse.parseOrThrow(_response.body, {
|
|
2851
2694
|
unrecognizedObjectKeys: "passthrough",
|
|
2852
2695
|
allowUnrecognizedUnionMembers: true,
|
|
2853
2696
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2868,57 +2711,18 @@ var Datacenters = class {
|
|
|
2868
2711
|
body: _response.error.rawBody
|
|
2869
2712
|
});
|
|
2870
2713
|
case "timeout":
|
|
2871
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
2714
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /auth/tokens.");
|
|
2872
2715
|
case "unknown":
|
|
2873
2716
|
throw new RivetError({
|
|
2874
2717
|
message: _response.error.errorMessage
|
|
2875
2718
|
});
|
|
2876
2719
|
}
|
|
2877
2720
|
}
|
|
2878
|
-
async
|
|
2879
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
2880
|
-
}
|
|
2881
|
-
};
|
|
2882
|
-
|
|
2883
|
-
// src/api/resources/envoys/client/Client.ts
|
|
2884
|
-
var import_url_join2 = __toESM(require("url-join"));
|
|
2885
|
-
var Envoys = class {
|
|
2886
|
-
constructor(_options) {
|
|
2887
|
-
this._options = _options;
|
|
2888
|
-
}
|
|
2889
|
-
/**
|
|
2890
|
-
* @param {Rivet.EnvoysListRequest} request
|
|
2891
|
-
* @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
|
|
2892
|
-
*
|
|
2893
|
-
* @example
|
|
2894
|
-
* await client.envoys.list({
|
|
2895
|
-
* namespace: "namespace"
|
|
2896
|
-
* })
|
|
2897
|
-
*/
|
|
2898
|
-
async list(request, requestOptions) {
|
|
2899
|
-
const { namespace, name, envoyKey, limit, cursor } = request;
|
|
2900
|
-
const _queryParams = {};
|
|
2901
|
-
_queryParams["namespace"] = namespace;
|
|
2902
|
-
if (name != null) {
|
|
2903
|
-
_queryParams["name"] = name;
|
|
2904
|
-
}
|
|
2905
|
-
if (envoyKey != null) {
|
|
2906
|
-
if (Array.isArray(envoyKey)) {
|
|
2907
|
-
_queryParams["envoy_key"] = envoyKey.map((item) => item);
|
|
2908
|
-
} else {
|
|
2909
|
-
_queryParams["envoy_key"] = envoyKey;
|
|
2910
|
-
}
|
|
2911
|
-
}
|
|
2912
|
-
if (limit != null) {
|
|
2913
|
-
_queryParams["limit"] = limit.toString();
|
|
2914
|
-
}
|
|
2915
|
-
if (cursor != null) {
|
|
2916
|
-
_queryParams["cursor"] = cursor;
|
|
2917
|
-
}
|
|
2721
|
+
async inspect(requestOptions) {
|
|
2918
2722
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2919
|
-
url: (0,
|
|
2723
|
+
url: (0, import_url_join.default)(
|
|
2920
2724
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2921
|
-
"
|
|
2725
|
+
"auth/tokens/inspect"
|
|
2922
2726
|
),
|
|
2923
2727
|
method: "GET",
|
|
2924
2728
|
headers: {
|
|
@@ -2929,14 +2733,13 @@ var Envoys = class {
|
|
|
2929
2733
|
...requestOptions?.headers
|
|
2930
2734
|
},
|
|
2931
2735
|
contentType: "application/json",
|
|
2932
|
-
queryParameters: _queryParams,
|
|
2933
2736
|
requestType: "json",
|
|
2934
2737
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2935
2738
|
maxRetries: requestOptions?.maxRetries,
|
|
2936
2739
|
abortSignal: requestOptions?.abortSignal
|
|
2937
2740
|
});
|
|
2938
2741
|
if (_response.ok) {
|
|
2939
|
-
return
|
|
2742
|
+
return AuthTokenInspectResponse.parseOrThrow(_response.body, {
|
|
2940
2743
|
unrecognizedObjectKeys: "passthrough",
|
|
2941
2744
|
allowUnrecognizedUnionMembers: true,
|
|
2942
2745
|
allowUnrecognizedEnumValues: true,
|
|
@@ -2957,7 +2760,7 @@ var Envoys = class {
|
|
|
2957
2760
|
body: _response.error.rawBody
|
|
2958
2761
|
});
|
|
2959
2762
|
case "timeout":
|
|
2960
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2763
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /auth/tokens/inspect.");
|
|
2961
2764
|
case "unknown":
|
|
2962
2765
|
throw new RivetError({
|
|
2963
2766
|
message: _response.error.errorMessage
|
|
@@ -2969,23 +2772,38 @@ var Envoys = class {
|
|
|
2969
2772
|
}
|
|
2970
2773
|
};
|
|
2971
2774
|
|
|
2972
|
-
// src/api/resources/
|
|
2973
|
-
var
|
|
2974
|
-
|
|
2775
|
+
// src/api/resources/datacenters/index.ts
|
|
2776
|
+
var datacenters_exports = {};
|
|
2777
|
+
|
|
2778
|
+
// src/api/resources/metadata/index.ts
|
|
2779
|
+
var metadata_exports = {};
|
|
2780
|
+
|
|
2781
|
+
// src/api/resources/namespaces/index.ts
|
|
2782
|
+
var namespaces_exports2 = {};
|
|
2783
|
+
|
|
2784
|
+
// src/api/resources/pools/index.ts
|
|
2785
|
+
var pools_exports = {};
|
|
2786
|
+
|
|
2787
|
+
// src/Client.ts
|
|
2788
|
+
var import_url_join6 = __toESM(require("url-join"));
|
|
2789
|
+
|
|
2790
|
+
// src/api/resources/datacenters/client/Client.ts
|
|
2791
|
+
var import_url_join2 = __toESM(require("url-join"));
|
|
2792
|
+
var Datacenters = class {
|
|
2975
2793
|
constructor(_options) {
|
|
2976
2794
|
this._options = _options;
|
|
2977
2795
|
}
|
|
2978
2796
|
/**
|
|
2979
|
-
* @param {
|
|
2797
|
+
* @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
|
|
2980
2798
|
*
|
|
2981
2799
|
* @example
|
|
2982
|
-
* await client.
|
|
2800
|
+
* await client.datacenters.list()
|
|
2983
2801
|
*/
|
|
2984
|
-
async
|
|
2802
|
+
async list(requestOptions) {
|
|
2985
2803
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2986
|
-
url: (0,
|
|
2804
|
+
url: (0, import_url_join2.default)(
|
|
2987
2805
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
2988
|
-
"
|
|
2806
|
+
"datacenters"
|
|
2989
2807
|
),
|
|
2990
2808
|
method: "GET",
|
|
2991
2809
|
headers: {
|
|
@@ -3002,7 +2820,7 @@ var Health = class {
|
|
|
3002
2820
|
abortSignal: requestOptions?.abortSignal
|
|
3003
2821
|
});
|
|
3004
2822
|
if (_response.ok) {
|
|
3005
|
-
return
|
|
2823
|
+
return DatacentersListResponse.parseOrThrow(_response.body, {
|
|
3006
2824
|
unrecognizedObjectKeys: "passthrough",
|
|
3007
2825
|
allowUnrecognizedUnionMembers: true,
|
|
3008
2826
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3023,7 +2841,7 @@ var Health = class {
|
|
|
3023
2841
|
body: _response.error.rawBody
|
|
3024
2842
|
});
|
|
3025
2843
|
case "timeout":
|
|
3026
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
2844
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /datacenters.");
|
|
3027
2845
|
case "unknown":
|
|
3028
2846
|
throw new RivetError({
|
|
3029
2847
|
message: _response.error.errorMessage
|
|
@@ -3036,7 +2854,7 @@ var Health = class {
|
|
|
3036
2854
|
};
|
|
3037
2855
|
|
|
3038
2856
|
// src/api/resources/metadata/client/Client.ts
|
|
3039
|
-
var
|
|
2857
|
+
var import_url_join3 = __toESM(require("url-join"));
|
|
3040
2858
|
var Metadata = class {
|
|
3041
2859
|
constructor(_options) {
|
|
3042
2860
|
this._options = _options;
|
|
@@ -3049,7 +2867,7 @@ var Metadata = class {
|
|
|
3049
2867
|
*/
|
|
3050
2868
|
async get(requestOptions) {
|
|
3051
2869
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3052
|
-
url: (0,
|
|
2870
|
+
url: (0, import_url_join3.default)(
|
|
3053
2871
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3054
2872
|
"metadata"
|
|
3055
2873
|
),
|
|
@@ -3102,7 +2920,7 @@ var Metadata = class {
|
|
|
3102
2920
|
};
|
|
3103
2921
|
|
|
3104
2922
|
// src/api/resources/namespaces/client/Client.ts
|
|
3105
|
-
var
|
|
2923
|
+
var import_url_join4 = __toESM(require("url-join"));
|
|
3106
2924
|
var Namespaces = class {
|
|
3107
2925
|
constructor(_options) {
|
|
3108
2926
|
this._options = _options;
|
|
@@ -3115,7 +2933,7 @@ var Namespaces = class {
|
|
|
3115
2933
|
* await client.namespaces.list()
|
|
3116
2934
|
*/
|
|
3117
2935
|
async list(request = {}, requestOptions) {
|
|
3118
|
-
const { limit, cursor, name
|
|
2936
|
+
const { limit, cursor, name } = request;
|
|
3119
2937
|
const _queryParams = {};
|
|
3120
2938
|
if (limit != null) {
|
|
3121
2939
|
_queryParams["limit"] = limit.toString();
|
|
@@ -3126,20 +2944,8 @@ var Namespaces = class {
|
|
|
3126
2944
|
if (name != null) {
|
|
3127
2945
|
_queryParams["name"] = name;
|
|
3128
2946
|
}
|
|
3129
|
-
if (namespaceIds != null) {
|
|
3130
|
-
_queryParams["namespace_ids"] = namespaceIds;
|
|
3131
|
-
}
|
|
3132
|
-
if (namespaceId != null) {
|
|
3133
|
-
if (Array.isArray(namespaceId)) {
|
|
3134
|
-
_queryParams["namespace_id"] = namespaceId.map(
|
|
3135
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3136
|
-
);
|
|
3137
|
-
} else {
|
|
3138
|
-
_queryParams["namespace_id"] = namespaceId;
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
2947
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3142
|
-
url: (0,
|
|
2948
|
+
url: (0, import_url_join4.default)(
|
|
3143
2949
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3144
2950
|
"namespaces"
|
|
3145
2951
|
),
|
|
@@ -3193,13 +2999,14 @@ var Namespaces = class {
|
|
|
3193
2999
|
*
|
|
3194
3000
|
* @example
|
|
3195
3001
|
* await client.namespaces.create({
|
|
3196
|
-
* displayName: "display_name",
|
|
3197
3002
|
* name: "name"
|
|
3198
3003
|
* })
|
|
3199
3004
|
*/
|
|
3200
3005
|
async create(request, requestOptions) {
|
|
3006
|
+
const _body = request;
|
|
3007
|
+
const _queryParams = {};
|
|
3201
3008
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3202
|
-
url: (0,
|
|
3009
|
+
url: (0, import_url_join4.default)(
|
|
3203
3010
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3204
3011
|
"namespaces"
|
|
3205
3012
|
),
|
|
@@ -3212,8 +3019,9 @@ var Namespaces = class {
|
|
|
3212
3019
|
...requestOptions?.headers
|
|
3213
3020
|
},
|
|
3214
3021
|
contentType: "application/json",
|
|
3022
|
+
queryParameters: _queryParams,
|
|
3215
3023
|
requestType: "json",
|
|
3216
|
-
body: NamespacesCreateRequest.jsonOrThrow(
|
|
3024
|
+
body: NamespacesCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3217
3025
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3218
3026
|
maxRetries: requestOptions?.maxRetries,
|
|
3219
3027
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -3247,60 +3055,24 @@ var Namespaces = class {
|
|
|
3247
3055
|
});
|
|
3248
3056
|
}
|
|
3249
3057
|
}
|
|
3250
|
-
async _getAuthorizationHeader() {
|
|
3251
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3252
|
-
}
|
|
3253
|
-
};
|
|
3254
|
-
|
|
3255
|
-
// src/api/resources/runners/client/Client.ts
|
|
3256
|
-
var import_url_join6 = __toESM(require("url-join"));
|
|
3257
|
-
var Runners = class {
|
|
3258
|
-
constructor(_options) {
|
|
3259
|
-
this._options = _options;
|
|
3260
|
-
}
|
|
3261
3058
|
/**
|
|
3262
|
-
*
|
|
3263
|
-
*
|
|
3059
|
+
* Archives a namespace: refuses new work for it, stops what its nodes host, then closes its
|
|
3060
|
+
* storage. Archiving is final. Answers at once with the namespace at status `archiving`, or
|
|
3061
|
+
* `archived` when it already is.
|
|
3062
|
+
*
|
|
3063
|
+
* @param {string} name - The namespace to archive.
|
|
3064
|
+
* @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3264
3065
|
*
|
|
3265
3066
|
* @example
|
|
3266
|
-
* await client.
|
|
3267
|
-
* namespace: "namespace"
|
|
3268
|
-
* })
|
|
3067
|
+
* await client.namespaces.archive("staging")
|
|
3269
3068
|
*/
|
|
3270
|
-
async
|
|
3271
|
-
const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
|
|
3272
|
-
const _queryParams = {};
|
|
3273
|
-
_queryParams["namespace"] = namespace;
|
|
3274
|
-
if (name != null) {
|
|
3275
|
-
_queryParams["name"] = name;
|
|
3276
|
-
}
|
|
3277
|
-
if (runnerIds != null) {
|
|
3278
|
-
_queryParams["runner_ids"] = runnerIds;
|
|
3279
|
-
}
|
|
3280
|
-
if (runnerId != null) {
|
|
3281
|
-
if (Array.isArray(runnerId)) {
|
|
3282
|
-
_queryParams["runner_id"] = runnerId.map(
|
|
3283
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3284
|
-
);
|
|
3285
|
-
} else {
|
|
3286
|
-
_queryParams["runner_id"] = runnerId;
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
if (includeStopped != null) {
|
|
3290
|
-
_queryParams["include_stopped"] = includeStopped.toString();
|
|
3291
|
-
}
|
|
3292
|
-
if (limit != null) {
|
|
3293
|
-
_queryParams["limit"] = limit.toString();
|
|
3294
|
-
}
|
|
3295
|
-
if (cursor != null) {
|
|
3296
|
-
_queryParams["cursor"] = cursor;
|
|
3297
|
-
}
|
|
3069
|
+
async archive(name, requestOptions) {
|
|
3298
3070
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3299
|
-
url: (0,
|
|
3071
|
+
url: (0, import_url_join4.default)(
|
|
3300
3072
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3301
|
-
|
|
3073
|
+
`namespaces/${encodeURIComponent(name)}/archive`
|
|
3302
3074
|
),
|
|
3303
|
-
method: "
|
|
3075
|
+
method: "POST",
|
|
3304
3076
|
headers: {
|
|
3305
3077
|
Authorization: await this._getAuthorizationHeader(),
|
|
3306
3078
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3309,14 +3081,13 @@ var Runners = class {
|
|
|
3309
3081
|
...requestOptions?.headers
|
|
3310
3082
|
},
|
|
3311
3083
|
contentType: "application/json",
|
|
3312
|
-
queryParameters: _queryParams,
|
|
3313
3084
|
requestType: "json",
|
|
3314
3085
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3315
3086
|
maxRetries: requestOptions?.maxRetries,
|
|
3316
3087
|
abortSignal: requestOptions?.abortSignal
|
|
3317
3088
|
});
|
|
3318
3089
|
if (_response.ok) {
|
|
3319
|
-
return
|
|
3090
|
+
return NamespacesArchiveResponse.parseOrThrow(_response.body, {
|
|
3320
3091
|
unrecognizedObjectKeys: "passthrough",
|
|
3321
3092
|
allowUnrecognizedUnionMembers: true,
|
|
3322
3093
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3337,31 +3108,40 @@ var Runners = class {
|
|
|
3337
3108
|
body: _response.error.rawBody
|
|
3338
3109
|
});
|
|
3339
3110
|
case "timeout":
|
|
3340
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3111
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
|
|
3341
3112
|
case "unknown":
|
|
3342
3113
|
throw new RivetError({
|
|
3343
3114
|
message: _response.error.errorMessage
|
|
3344
3115
|
});
|
|
3345
3116
|
}
|
|
3346
3117
|
}
|
|
3118
|
+
async _getAuthorizationHeader() {
|
|
3119
|
+
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3120
|
+
}
|
|
3121
|
+
};
|
|
3122
|
+
|
|
3123
|
+
// src/api/resources/pools/client/Client.ts
|
|
3124
|
+
var import_url_join5 = __toESM(require("url-join"));
|
|
3125
|
+
var Pools = class {
|
|
3126
|
+
constructor(_options) {
|
|
3127
|
+
this._options = _options;
|
|
3128
|
+
}
|
|
3347
3129
|
/**
|
|
3348
|
-
*
|
|
3130
|
+
* Lists the namespace's pools by name. Changes apply on each node's next connection.
|
|
3349
3131
|
*
|
|
3350
|
-
*
|
|
3351
|
-
* -
|
|
3352
|
-
*
|
|
3353
|
-
* @param {Rivet.RunnersListNamesRequest} request
|
|
3354
|
-
* @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
|
|
3132
|
+
* @param {Rivet.PoolsListRequest} request
|
|
3133
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3355
3134
|
*
|
|
3356
3135
|
* @example
|
|
3357
|
-
* await client.
|
|
3136
|
+
* await client.pools.list({
|
|
3358
3137
|
* namespace: "namespace"
|
|
3359
3138
|
* })
|
|
3360
3139
|
*/
|
|
3361
|
-
async
|
|
3140
|
+
async list(request, requestOptions) {
|
|
3362
3141
|
const { namespace, limit, cursor } = request;
|
|
3363
3142
|
const _queryParams = {};
|
|
3364
|
-
|
|
3143
|
+
if (namespace != null)
|
|
3144
|
+
_queryParams["namespace"] = namespace;
|
|
3365
3145
|
if (limit != null) {
|
|
3366
3146
|
_queryParams["limit"] = limit.toString();
|
|
3367
3147
|
}
|
|
@@ -3369,9 +3149,9 @@ var Runners = class {
|
|
|
3369
3149
|
_queryParams["cursor"] = cursor;
|
|
3370
3150
|
}
|
|
3371
3151
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3372
|
-
url: (0,
|
|
3152
|
+
url: (0, import_url_join5.default)(
|
|
3373
3153
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3374
|
-
"
|
|
3154
|
+
"pools"
|
|
3375
3155
|
),
|
|
3376
3156
|
method: "GET",
|
|
3377
3157
|
headers: {
|
|
@@ -3389,7 +3169,7 @@ var Runners = class {
|
|
|
3389
3169
|
abortSignal: requestOptions?.abortSignal
|
|
3390
3170
|
});
|
|
3391
3171
|
if (_response.ok) {
|
|
3392
|
-
return
|
|
3172
|
+
return PoolsListResponse.parseOrThrow(_response.body, {
|
|
3393
3173
|
unrecognizedObjectKeys: "passthrough",
|
|
3394
3174
|
allowUnrecognizedUnionMembers: true,
|
|
3395
3175
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3410,104 +3190,30 @@ var Runners = class {
|
|
|
3410
3190
|
body: _response.error.rawBody
|
|
3411
3191
|
});
|
|
3412
3192
|
case "timeout":
|
|
3413
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3193
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
|
|
3414
3194
|
case "unknown":
|
|
3415
3195
|
throw new RivetError({
|
|
3416
3196
|
message: _response.error.errorMessage
|
|
3417
3197
|
});
|
|
3418
3198
|
}
|
|
3419
3199
|
}
|
|
3420
|
-
async _getAuthorizationHeader() {
|
|
3421
|
-
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3422
|
-
}
|
|
3423
|
-
};
|
|
3424
|
-
|
|
3425
|
-
// src/Client.ts
|
|
3426
|
-
var RivetClient = class {
|
|
3427
|
-
constructor(_options) {
|
|
3428
|
-
this._options = _options;
|
|
3429
|
-
}
|
|
3430
|
-
_datacenters;
|
|
3431
|
-
_envoys;
|
|
3432
|
-
_health;
|
|
3433
|
-
_metadata;
|
|
3434
|
-
_namespaces;
|
|
3435
|
-
_runners;
|
|
3436
|
-
get datacenters() {
|
|
3437
|
-
return this._datacenters ??= new Datacenters(this._options);
|
|
3438
|
-
}
|
|
3439
|
-
get envoys() {
|
|
3440
|
-
return this._envoys ??= new Envoys(this._options);
|
|
3441
|
-
}
|
|
3442
|
-
get health() {
|
|
3443
|
-
return this._health ??= new Health(this._options);
|
|
3444
|
-
}
|
|
3445
|
-
get metadata() {
|
|
3446
|
-
return this._metadata ??= new Metadata(this._options);
|
|
3447
|
-
}
|
|
3448
|
-
get namespaces() {
|
|
3449
|
-
return this._namespaces ??= new Namespaces(this._options);
|
|
3450
|
-
}
|
|
3451
|
-
get runners() {
|
|
3452
|
-
return this._runners ??= new Runners(this._options);
|
|
3453
|
-
}
|
|
3454
3200
|
/**
|
|
3455
|
-
*
|
|
3456
|
-
*
|
|
3457
|
-
* 2 round trips:
|
|
3458
|
-
*
|
|
3459
|
-
* - namespace::ops::resolve_for_name_global
|
|
3460
|
-
* - GET /actors (multiple DCs based on actor IDs)
|
|
3461
|
-
*
|
|
3462
|
-
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3463
|
-
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3464
|
-
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3465
|
-
*
|
|
3466
|
-
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3467
|
-
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3468
|
-
*
|
|
3469
|
-
* **Otherwise**
|
|
3470
|
-
*
|
|
3471
|
-
* 2 round trips:
|
|
3472
|
-
*
|
|
3473
|
-
* - namespace::ops::resolve_for_name_global
|
|
3474
|
-
* - GET /actors (fanout)
|
|
3201
|
+
* Lists the live nodes of a pool in node key order.
|
|
3475
3202
|
*
|
|
3476
|
-
*
|
|
3477
|
-
*
|
|
3478
|
-
* @param {
|
|
3479
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3203
|
+
* @param {string} pool
|
|
3204
|
+
* @param {Rivet.PoolsListNodesRequest} request
|
|
3205
|
+
* @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
|
|
3480
3206
|
*
|
|
3481
3207
|
* @example
|
|
3482
|
-
* await client.
|
|
3208
|
+
* await client.pools.listNodes("pool", {
|
|
3483
3209
|
* namespace: "namespace"
|
|
3484
3210
|
* })
|
|
3485
3211
|
*/
|
|
3486
|
-
async
|
|
3487
|
-
const { namespace,
|
|
3212
|
+
async listNodes(pool, request, requestOptions) {
|
|
3213
|
+
const { namespace, limit, cursor } = request;
|
|
3488
3214
|
const _queryParams = {};
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
_queryParams["name"] = name;
|
|
3492
|
-
}
|
|
3493
|
-
if (key != null) {
|
|
3494
|
-
_queryParams["key"] = key;
|
|
3495
|
-
}
|
|
3496
|
-
if (actorIds != null) {
|
|
3497
|
-
_queryParams["actor_ids"] = actorIds;
|
|
3498
|
-
}
|
|
3499
|
-
if (actorId != null) {
|
|
3500
|
-
if (Array.isArray(actorId)) {
|
|
3501
|
-
_queryParams["actor_id"] = actorId.map(
|
|
3502
|
-
(item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
|
|
3503
|
-
);
|
|
3504
|
-
} else {
|
|
3505
|
-
_queryParams["actor_id"] = actorId;
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
if (includeDestroyed != null) {
|
|
3509
|
-
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3510
|
-
}
|
|
3215
|
+
if (namespace != null)
|
|
3216
|
+
_queryParams["namespace"] = namespace;
|
|
3511
3217
|
if (limit != null) {
|
|
3512
3218
|
_queryParams["limit"] = limit.toString();
|
|
3513
3219
|
}
|
|
@@ -3515,9 +3221,9 @@ var RivetClient = class {
|
|
|
3515
3221
|
_queryParams["cursor"] = cursor;
|
|
3516
3222
|
}
|
|
3517
3223
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3518
|
-
url: (0,
|
|
3224
|
+
url: (0, import_url_join5.default)(
|
|
3519
3225
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3520
|
-
|
|
3226
|
+
`pools/${encodeURIComponent(pool)}/nodes`
|
|
3521
3227
|
),
|
|
3522
3228
|
method: "GET",
|
|
3523
3229
|
headers: {
|
|
@@ -3535,7 +3241,7 @@ var RivetClient = class {
|
|
|
3535
3241
|
abortSignal: requestOptions?.abortSignal
|
|
3536
3242
|
});
|
|
3537
3243
|
if (_response.ok) {
|
|
3538
|
-
return
|
|
3244
|
+
return PoolsListNodesResponse.parseOrThrow(_response.body, {
|
|
3539
3245
|
unrecognizedObjectKeys: "passthrough",
|
|
3540
3246
|
allowUnrecognizedUnionMembers: true,
|
|
3541
3247
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3556,52 +3262,23 @@ var RivetClient = class {
|
|
|
3556
3262
|
body: _response.error.rawBody
|
|
3557
3263
|
});
|
|
3558
3264
|
case "timeout":
|
|
3559
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3265
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
|
|
3560
3266
|
case "unknown":
|
|
3561
3267
|
throw new RivetError({
|
|
3562
3268
|
message: _response.error.errorMessage
|
|
3563
3269
|
});
|
|
3564
3270
|
}
|
|
3565
3271
|
}
|
|
3566
|
-
|
|
3567
|
-
* **If actor is created in the current datacenter:**
|
|
3568
|
-
*
|
|
3569
|
-
* 2 round trips:
|
|
3570
|
-
*
|
|
3571
|
-
* - namespace::ops::resolve_for_name_global
|
|
3572
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3573
|
-
*
|
|
3574
|
-
* **If actor is created in a different datacenter:**
|
|
3575
|
-
*
|
|
3576
|
-
* 3 round trips:
|
|
3577
|
-
*
|
|
3578
|
-
* - namespace::ops::resolve_for_name_global
|
|
3579
|
-
* - POST /actors to remote datacenter
|
|
3580
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3581
|
-
*
|
|
3582
|
-
* actor::get will always be in the same datacenter.
|
|
3583
|
-
*
|
|
3584
|
-
* @param {Rivet.ActorsCreateRequest} request
|
|
3585
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3586
|
-
*
|
|
3587
|
-
* @example
|
|
3588
|
-
* await client.actorsCreate({
|
|
3589
|
-
* namespace: "namespace",
|
|
3590
|
-
* crashPolicy: "restart",
|
|
3591
|
-
* name: "name",
|
|
3592
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3593
|
-
* })
|
|
3594
|
-
*/
|
|
3595
|
-
async actorsCreate(request, requestOptions) {
|
|
3596
|
-
const { namespace, ..._body } = request;
|
|
3272
|
+
async get(name, request = {}, requestOptions) {
|
|
3597
3273
|
const _queryParams = {};
|
|
3598
|
-
|
|
3274
|
+
if (request.namespace != null)
|
|
3275
|
+
_queryParams["namespace"] = request.namespace;
|
|
3599
3276
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3600
|
-
url: (0,
|
|
3277
|
+
url: (0, import_url_join5.default)(
|
|
3601
3278
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3602
|
-
|
|
3279
|
+
`pools/${encodeURIComponent(name)}`
|
|
3603
3280
|
),
|
|
3604
|
-
method: "
|
|
3281
|
+
method: "GET",
|
|
3605
3282
|
headers: {
|
|
3606
3283
|
Authorization: await this._getAuthorizationHeader(),
|
|
3607
3284
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3612,13 +3289,12 @@ var RivetClient = class {
|
|
|
3612
3289
|
contentType: "application/json",
|
|
3613
3290
|
queryParameters: _queryParams,
|
|
3614
3291
|
requestType: "json",
|
|
3615
|
-
body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3616
3292
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3617
3293
|
maxRetries: requestOptions?.maxRetries,
|
|
3618
3294
|
abortSignal: requestOptions?.abortSignal
|
|
3619
3295
|
});
|
|
3620
3296
|
if (_response.ok) {
|
|
3621
|
-
return
|
|
3297
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3622
3298
|
unrecognizedObjectKeys: "passthrough",
|
|
3623
3299
|
allowUnrecognizedUnionMembers: true,
|
|
3624
3300
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3639,60 +3315,21 @@ var RivetClient = class {
|
|
|
3639
3315
|
body: _response.error.rawBody
|
|
3640
3316
|
});
|
|
3641
3317
|
case "timeout":
|
|
3642
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3318
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
|
|
3643
3319
|
case "unknown":
|
|
3644
3320
|
throw new RivetError({
|
|
3645
3321
|
message: _response.error.errorMessage
|
|
3646
3322
|
});
|
|
3647
3323
|
}
|
|
3648
3324
|
}
|
|
3649
|
-
|
|
3650
|
-
* **If actor exists**
|
|
3651
|
-
*
|
|
3652
|
-
* 2 round trips:
|
|
3653
|
-
*
|
|
3654
|
-
* - namespace::ops::resolve_for_name_global
|
|
3655
|
-
* - GET /actors/{}
|
|
3656
|
-
*
|
|
3657
|
-
* **If actor does not exist and is created in the current datacenter:**
|
|
3658
|
-
*
|
|
3659
|
-
* 2 round trips:
|
|
3660
|
-
*
|
|
3661
|
-
* - namespace::ops::resolve_for_name_global
|
|
3662
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3663
|
-
*
|
|
3664
|
-
* **If actor does not exist and is created in a different datacenter:**
|
|
3665
|
-
*
|
|
3666
|
-
* 3 round trips:
|
|
3667
|
-
*
|
|
3668
|
-
* - namespace::ops::resolve_for_name_global
|
|
3669
|
-
* - POST /actors to remote datacenter
|
|
3670
|
-
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3671
|
-
*
|
|
3672
|
-
* actor::get will always be in the same datacenter.
|
|
3673
|
-
*
|
|
3674
|
-
* ## Optimized Alternative Routes
|
|
3675
|
-
*
|
|
3676
|
-
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
3677
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3678
|
-
*
|
|
3679
|
-
* @example
|
|
3680
|
-
* await client.actorsGetOrCreate({
|
|
3681
|
-
* namespace: "namespace",
|
|
3682
|
-
* crashPolicy: "restart",
|
|
3683
|
-
* key: "key",
|
|
3684
|
-
* name: "name",
|
|
3685
|
-
* runnerNameSelector: "runner_name_selector"
|
|
3686
|
-
* })
|
|
3687
|
-
*/
|
|
3688
|
-
async actorsGetOrCreate(request, requestOptions) {
|
|
3689
|
-
const { namespace, ..._body } = request;
|
|
3325
|
+
async upsert(name, request, requestOptions) {
|
|
3690
3326
|
const _queryParams = {};
|
|
3691
|
-
|
|
3327
|
+
if (request.namespace != null)
|
|
3328
|
+
_queryParams["namespace"] = request.namespace;
|
|
3692
3329
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3693
|
-
url: (0,
|
|
3330
|
+
url: (0, import_url_join5.default)(
|
|
3694
3331
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3695
|
-
|
|
3332
|
+
`pools/${encodeURIComponent(name)}`
|
|
3696
3333
|
),
|
|
3697
3334
|
method: "PUT",
|
|
3698
3335
|
headers: {
|
|
@@ -3705,13 +3342,19 @@ var RivetClient = class {
|
|
|
3705
3342
|
contentType: "application/json",
|
|
3706
3343
|
queryParameters: _queryParams,
|
|
3707
3344
|
requestType: "json",
|
|
3708
|
-
body:
|
|
3345
|
+
body: {
|
|
3346
|
+
drain_on_version_upgrade: request.drainOnVersionUpgrade,
|
|
3347
|
+
actor_eviction_delay: request.actorEvictionDelay,
|
|
3348
|
+
actor_eviction_period: request.actorEvictionPeriod,
|
|
3349
|
+
actor_eviction_rate: request.actorEvictionRate,
|
|
3350
|
+
metadata: request.metadata
|
|
3351
|
+
},
|
|
3709
3352
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3710
3353
|
maxRetries: requestOptions?.maxRetries,
|
|
3711
3354
|
abortSignal: requestOptions?.abortSignal
|
|
3712
3355
|
});
|
|
3713
3356
|
if (_response.ok) {
|
|
3714
|
-
return
|
|
3357
|
+
return PoolResponse.parseOrThrow(_response.body, {
|
|
3715
3358
|
unrecognizedObjectKeys: "passthrough",
|
|
3716
3359
|
allowUnrecognizedUnionMembers: true,
|
|
3717
3360
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3732,43 +3375,23 @@ var RivetClient = class {
|
|
|
3732
3375
|
body: _response.error.rawBody
|
|
3733
3376
|
});
|
|
3734
3377
|
case "timeout":
|
|
3735
|
-
throw new RivetTimeoutError("Timeout exceeded when calling PUT /
|
|
3378
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
|
|
3736
3379
|
case "unknown":
|
|
3737
3380
|
throw new RivetError({
|
|
3738
3381
|
message: _response.error.errorMessage
|
|
3739
3382
|
});
|
|
3740
3383
|
}
|
|
3741
3384
|
}
|
|
3742
|
-
|
|
3743
|
-
* 2 round trips:
|
|
3744
|
-
*
|
|
3745
|
-
* - GET /actors/names (fanout)
|
|
3746
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3747
|
-
*
|
|
3748
|
-
* @param {Rivet.ActorsListNamesRequest} request
|
|
3749
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3750
|
-
*
|
|
3751
|
-
* @example
|
|
3752
|
-
* await client.actorsListNames({
|
|
3753
|
-
* namespace: "namespace"
|
|
3754
|
-
* })
|
|
3755
|
-
*/
|
|
3756
|
-
async actorsListNames(request, requestOptions) {
|
|
3757
|
-
const { namespace, limit, cursor } = request;
|
|
3385
|
+
async delete(name, request = {}, requestOptions) {
|
|
3758
3386
|
const _queryParams = {};
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
_queryParams["limit"] = limit.toString();
|
|
3762
|
-
}
|
|
3763
|
-
if (cursor != null) {
|
|
3764
|
-
_queryParams["cursor"] = cursor;
|
|
3765
|
-
}
|
|
3387
|
+
if (request.namespace != null)
|
|
3388
|
+
_queryParams["namespace"] = request.namespace;
|
|
3766
3389
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3767
|
-
url: (0,
|
|
3390
|
+
url: (0, import_url_join5.default)(
|
|
3768
3391
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3769
|
-
|
|
3392
|
+
`pools/${encodeURIComponent(name)}`
|
|
3770
3393
|
),
|
|
3771
|
-
method: "
|
|
3394
|
+
method: "DELETE",
|
|
3772
3395
|
headers: {
|
|
3773
3396
|
Authorization: await this._getAuthorizationHeader(),
|
|
3774
3397
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3784,13 +3407,7 @@ var RivetClient = class {
|
|
|
3784
3407
|
abortSignal: requestOptions?.abortSignal
|
|
3785
3408
|
});
|
|
3786
3409
|
if (_response.ok) {
|
|
3787
|
-
return
|
|
3788
|
-
unrecognizedObjectKeys: "passthrough",
|
|
3789
|
-
allowUnrecognizedUnionMembers: true,
|
|
3790
|
-
allowUnrecognizedEnumValues: true,
|
|
3791
|
-
skipValidation: true,
|
|
3792
|
-
breadcrumbsPrefix: ["response"]
|
|
3793
|
-
});
|
|
3410
|
+
return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
|
|
3794
3411
|
}
|
|
3795
3412
|
if (_response.error.reason === "status-code") {
|
|
3796
3413
|
throw new RivetError({
|
|
@@ -3805,38 +3422,106 @@ var RivetClient = class {
|
|
|
3805
3422
|
body: _response.error.rawBody
|
|
3806
3423
|
});
|
|
3807
3424
|
case "timeout":
|
|
3808
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3425
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
|
|
3809
3426
|
case "unknown":
|
|
3810
3427
|
throw new RivetError({
|
|
3811
3428
|
message: _response.error.errorMessage
|
|
3812
3429
|
});
|
|
3813
3430
|
}
|
|
3814
3431
|
}
|
|
3432
|
+
async _getAuthorizationHeader() {
|
|
3433
|
+
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3434
|
+
}
|
|
3435
|
+
};
|
|
3436
|
+
|
|
3437
|
+
// src/Client.ts
|
|
3438
|
+
var RivetClient = class {
|
|
3439
|
+
constructor(_options) {
|
|
3440
|
+
this._options = _options;
|
|
3441
|
+
}
|
|
3442
|
+
_authTokens;
|
|
3443
|
+
_datacenters;
|
|
3444
|
+
_metadata;
|
|
3445
|
+
_namespaces;
|
|
3446
|
+
_pools;
|
|
3447
|
+
get authTokens() {
|
|
3448
|
+
return this._authTokens ??= new AuthTokens(this._options);
|
|
3449
|
+
}
|
|
3450
|
+
get datacenters() {
|
|
3451
|
+
return this._datacenters ??= new Datacenters(this._options);
|
|
3452
|
+
}
|
|
3453
|
+
get metadata() {
|
|
3454
|
+
return this._metadata ??= new Metadata(this._options);
|
|
3455
|
+
}
|
|
3456
|
+
get namespaces() {
|
|
3457
|
+
return this._namespaces ??= new Namespaces(this._options);
|
|
3458
|
+
}
|
|
3459
|
+
get pools() {
|
|
3460
|
+
return this._pools ??= new Pools(this._options);
|
|
3461
|
+
}
|
|
3815
3462
|
/**
|
|
3816
|
-
*
|
|
3463
|
+
* **If key is some & `include_destroyed` is false**
|
|
3817
3464
|
*
|
|
3818
|
-
*
|
|
3819
|
-
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3465
|
+
* 2 round trips:
|
|
3820
3466
|
*
|
|
3821
|
-
*
|
|
3822
|
-
*
|
|
3467
|
+
* - namespace::ops::resolve_for_name_global
|
|
3468
|
+
* - GET /actors (multiple DCs based on actor IDs)
|
|
3469
|
+
*
|
|
3470
|
+
* This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
|
|
3471
|
+
* stale consistency to determine which datacenter the actor lives in. Under most circumstances,
|
|
3472
|
+
* this means we don't need to fan out to all datacenters (like normal list does).
|
|
3473
|
+
*
|
|
3474
|
+
* The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
|
|
3475
|
+
* `include_destroyed` is true, we show all previous iterations of actors with the same key.
|
|
3476
|
+
*
|
|
3477
|
+
* **Otherwise**
|
|
3478
|
+
*
|
|
3479
|
+
* 2 round trips:
|
|
3480
|
+
*
|
|
3481
|
+
* - namespace::ops::resolve_for_name_global
|
|
3482
|
+
* - GET /actors (fanout)
|
|
3483
|
+
*
|
|
3484
|
+
* ## Optimized Alternative Routes
|
|
3485
|
+
*
|
|
3486
|
+
* @param {Rivet.ActorsListRequest} request
|
|
3823
3487
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3824
3488
|
*
|
|
3825
3489
|
* @example
|
|
3826
|
-
* await client.
|
|
3490
|
+
* await client.actorsList({
|
|
3827
3491
|
* namespace: "namespace"
|
|
3828
3492
|
* })
|
|
3829
3493
|
*/
|
|
3830
|
-
async
|
|
3831
|
-
const { namespace } = request;
|
|
3494
|
+
async actorsList(request, requestOptions) {
|
|
3495
|
+
const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
|
|
3832
3496
|
const _queryParams = {};
|
|
3833
|
-
|
|
3497
|
+
if (namespace != null)
|
|
3498
|
+
_queryParams["namespace"] = namespace;
|
|
3499
|
+
if (name != null) {
|
|
3500
|
+
_queryParams["name"] = name;
|
|
3501
|
+
}
|
|
3502
|
+
if (key != null) {
|
|
3503
|
+
_queryParams["key"] = key;
|
|
3504
|
+
}
|
|
3505
|
+
if (actorIds != null) {
|
|
3506
|
+
_queryParams["actor_ids"] = actorIds;
|
|
3507
|
+
}
|
|
3508
|
+
if (actorId != null)
|
|
3509
|
+
_queryParams["actor_id"] = actorId;
|
|
3510
|
+
if (includeDestroyed != null) {
|
|
3511
|
+
_queryParams["include_destroyed"] = includeDestroyed.toString();
|
|
3512
|
+
}
|
|
3513
|
+
if (limit != null) {
|
|
3514
|
+
_queryParams["limit"] = limit.toString();
|
|
3515
|
+
}
|
|
3516
|
+
if (cursor != null) {
|
|
3517
|
+
_queryParams["cursor"] = cursor;
|
|
3518
|
+
}
|
|
3834
3519
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3835
|
-
url: (0,
|
|
3520
|
+
url: (0, import_url_join6.default)(
|
|
3836
3521
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3837
|
-
|
|
3522
|
+
"actors"
|
|
3838
3523
|
),
|
|
3839
|
-
method: "
|
|
3524
|
+
method: "GET",
|
|
3840
3525
|
headers: {
|
|
3841
3526
|
Authorization: await this._getAuthorizationHeader(),
|
|
3842
3527
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3852,7 +3537,7 @@ var RivetClient = class {
|
|
|
3852
3537
|
abortSignal: requestOptions?.abortSignal
|
|
3853
3538
|
});
|
|
3854
3539
|
if (_response.ok) {
|
|
3855
|
-
return
|
|
3540
|
+
return ActorsListResponse.parseOrThrow(_response.body, {
|
|
3856
3541
|
unrecognizedObjectKeys: "passthrough",
|
|
3857
3542
|
allowUnrecognizedUnionMembers: true,
|
|
3858
3543
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3873,7 +3558,7 @@ var RivetClient = class {
|
|
|
3873
3558
|
body: _response.error.rawBody
|
|
3874
3559
|
});
|
|
3875
3560
|
case "timeout":
|
|
3876
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3561
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors.");
|
|
3877
3562
|
case "unknown":
|
|
3878
3563
|
throw new RivetError({
|
|
3879
3564
|
message: _response.error.errorMessage
|
|
@@ -3881,26 +3566,44 @@ var RivetClient = class {
|
|
|
3881
3566
|
}
|
|
3882
3567
|
}
|
|
3883
3568
|
/**
|
|
3884
|
-
*
|
|
3885
|
-
*
|
|
3886
|
-
*
|
|
3569
|
+
* **If actor is created in the current datacenter:**
|
|
3570
|
+
*
|
|
3571
|
+
* 2 round trips:
|
|
3572
|
+
*
|
|
3573
|
+
* - namespace::ops::resolve_for_name_global
|
|
3574
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3575
|
+
*
|
|
3576
|
+
* **If actor is created in a different datacenter:**
|
|
3577
|
+
*
|
|
3578
|
+
* 3 round trips:
|
|
3579
|
+
*
|
|
3580
|
+
* - namespace::ops::resolve_for_name_global
|
|
3581
|
+
* - POST /actors to remote datacenter
|
|
3582
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3583
|
+
*
|
|
3584
|
+
* actor::get will always be in the same datacenter.
|
|
3585
|
+
*
|
|
3586
|
+
* @param {Rivet.ActorsCreateRequest} request
|
|
3887
3587
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3888
3588
|
*
|
|
3889
3589
|
* @example
|
|
3890
|
-
* await client.
|
|
3891
|
-
* namespace: "namespace"
|
|
3590
|
+
* await client.actorsCreate({
|
|
3591
|
+
* namespace: "namespace",
|
|
3592
|
+
* name: "name",
|
|
3593
|
+
* pool: "pool"
|
|
3892
3594
|
* })
|
|
3893
3595
|
*/
|
|
3894
|
-
async
|
|
3895
|
-
const { namespace } = request;
|
|
3596
|
+
async actorsCreate(request, requestOptions) {
|
|
3597
|
+
const { namespace, ..._body } = request;
|
|
3896
3598
|
const _queryParams = {};
|
|
3897
|
-
|
|
3599
|
+
if (namespace != null)
|
|
3600
|
+
_queryParams["namespace"] = namespace;
|
|
3898
3601
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3899
|
-
url: (0,
|
|
3602
|
+
url: (0, import_url_join6.default)(
|
|
3900
3603
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3901
|
-
|
|
3604
|
+
"actors"
|
|
3902
3605
|
),
|
|
3903
|
-
method: "
|
|
3606
|
+
method: "POST",
|
|
3904
3607
|
headers: {
|
|
3905
3608
|
Authorization: await this._getAuthorizationHeader(),
|
|
3906
3609
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3911,12 +3614,13 @@ var RivetClient = class {
|
|
|
3911
3614
|
contentType: "application/json",
|
|
3912
3615
|
queryParameters: _queryParams,
|
|
3913
3616
|
requestType: "json",
|
|
3617
|
+
body: ActorsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3914
3618
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3915
3619
|
maxRetries: requestOptions?.maxRetries,
|
|
3916
3620
|
abortSignal: requestOptions?.abortSignal
|
|
3917
3621
|
});
|
|
3918
3622
|
if (_response.ok) {
|
|
3919
|
-
return
|
|
3623
|
+
return ActorsCreateResponse.parseOrThrow(_response.body, {
|
|
3920
3624
|
unrecognizedObjectKeys: "passthrough",
|
|
3921
3625
|
allowUnrecognizedUnionMembers: true,
|
|
3922
3626
|
allowUnrecognizedEnumValues: true,
|
|
@@ -3937,9 +3641,7 @@ var RivetClient = class {
|
|
|
3937
3641
|
body: _response.error.rawBody
|
|
3938
3642
|
});
|
|
3939
3643
|
case "timeout":
|
|
3940
|
-
throw new RivetTimeoutError(
|
|
3941
|
-
"Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
|
|
3942
|
-
);
|
|
3644
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors.");
|
|
3943
3645
|
case "unknown":
|
|
3944
3646
|
throw new RivetError({
|
|
3945
3647
|
message: _response.error.errorMessage
|
|
@@ -3947,28 +3649,54 @@ var RivetClient = class {
|
|
|
3947
3649
|
}
|
|
3948
3650
|
}
|
|
3949
3651
|
/**
|
|
3950
|
-
*
|
|
3951
|
-
*
|
|
3652
|
+
* **If actor exists**
|
|
3653
|
+
*
|
|
3654
|
+
* 2 round trips:
|
|
3655
|
+
*
|
|
3656
|
+
* - namespace::ops::resolve_for_name_global
|
|
3657
|
+
* - GET /actors/{}
|
|
3658
|
+
*
|
|
3659
|
+
* **If actor does not exist and is created in the current datacenter:**
|
|
3660
|
+
*
|
|
3661
|
+
* 2 round trips:
|
|
3662
|
+
*
|
|
3663
|
+
* - namespace::ops::resolve_for_name_global
|
|
3664
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3665
|
+
*
|
|
3666
|
+
* **If actor does not exist and is created in a different datacenter:**
|
|
3667
|
+
*
|
|
3668
|
+
* 3 round trips:
|
|
3669
|
+
*
|
|
3670
|
+
* - namespace::ops::resolve_for_name_global
|
|
3671
|
+
* - POST /actors to remote datacenter
|
|
3672
|
+
* - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
|
|
3673
|
+
*
|
|
3674
|
+
* actor::get will always be in the same datacenter.
|
|
3675
|
+
*
|
|
3676
|
+
* ## Optimized Alternative Routes
|
|
3677
|
+
*
|
|
3678
|
+
* @param {Rivet.ActorsGetOrCreateRequest} request
|
|
3952
3679
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3953
3680
|
*
|
|
3954
3681
|
* @example
|
|
3955
|
-
* await client.
|
|
3682
|
+
* await client.actorsGetOrCreate({
|
|
3956
3683
|
* namespace: "namespace",
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3684
|
+
* key: "key",
|
|
3685
|
+
* name: "name",
|
|
3686
|
+
* pool: "pool"
|
|
3960
3687
|
* })
|
|
3961
3688
|
*/
|
|
3962
|
-
async
|
|
3963
|
-
const { namespace,
|
|
3689
|
+
async actorsGetOrCreate(request, requestOptions) {
|
|
3690
|
+
const { namespace, ..._body } = request;
|
|
3964
3691
|
const _queryParams = {};
|
|
3965
|
-
|
|
3692
|
+
if (namespace != null)
|
|
3693
|
+
_queryParams["namespace"] = namespace;
|
|
3966
3694
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3967
|
-
url: (0,
|
|
3695
|
+
url: (0, import_url_join6.default)(
|
|
3968
3696
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3969
|
-
|
|
3697
|
+
"actors"
|
|
3970
3698
|
),
|
|
3971
|
-
method: "
|
|
3699
|
+
method: "PUT",
|
|
3972
3700
|
headers: {
|
|
3973
3701
|
Authorization: await this._getAuthorizationHeader(),
|
|
3974
3702
|
"X-Fern-Language": "JavaScript",
|
|
@@ -3979,13 +3707,13 @@ var RivetClient = class {
|
|
|
3979
3707
|
contentType: "application/json",
|
|
3980
3708
|
queryParameters: _queryParams,
|
|
3981
3709
|
requestType: "json",
|
|
3982
|
-
body:
|
|
3710
|
+
body: ActorsGetOrCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
3983
3711
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3984
3712
|
maxRetries: requestOptions?.maxRetries,
|
|
3985
3713
|
abortSignal: requestOptions?.abortSignal
|
|
3986
3714
|
});
|
|
3987
3715
|
if (_response.ok) {
|
|
3988
|
-
return
|
|
3716
|
+
return ActorsGetOrCreateResponse.parseOrThrow(_response.body, {
|
|
3989
3717
|
unrecognizedObjectKeys: "passthrough",
|
|
3990
3718
|
allowUnrecognizedUnionMembers: true,
|
|
3991
3719
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4006,7 +3734,7 @@ var RivetClient = class {
|
|
|
4006
3734
|
body: _response.error.rawBody
|
|
4007
3735
|
});
|
|
4008
3736
|
case "timeout":
|
|
4009
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3737
|
+
throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors.");
|
|
4010
3738
|
case "unknown":
|
|
4011
3739
|
throw new RivetError({
|
|
4012
3740
|
message: _response.error.errorMessage
|
|
@@ -4014,28 +3742,36 @@ var RivetClient = class {
|
|
|
4014
3742
|
}
|
|
4015
3743
|
}
|
|
4016
3744
|
/**
|
|
4017
|
-
*
|
|
4018
|
-
*
|
|
3745
|
+
* 2 round trips:
|
|
3746
|
+
*
|
|
3747
|
+
* - GET /actors/names (fanout)
|
|
3748
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3749
|
+
*
|
|
3750
|
+
* @param {Rivet.ActorsListNamesRequest} request
|
|
4019
3751
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4020
3752
|
*
|
|
4021
3753
|
* @example
|
|
4022
|
-
* await client.
|
|
4023
|
-
* namespace: "namespace"
|
|
4024
|
-
* body: {
|
|
4025
|
-
* "key": "value"
|
|
4026
|
-
* }
|
|
3754
|
+
* await client.actorsListNames({
|
|
3755
|
+
* namespace: "namespace"
|
|
4027
3756
|
* })
|
|
4028
3757
|
*/
|
|
4029
|
-
async
|
|
4030
|
-
const { namespace,
|
|
3758
|
+
async actorsListNames(request, requestOptions) {
|
|
3759
|
+
const { namespace, limit, cursor } = request;
|
|
4031
3760
|
const _queryParams = {};
|
|
4032
|
-
|
|
3761
|
+
if (namespace != null)
|
|
3762
|
+
_queryParams["namespace"] = namespace;
|
|
3763
|
+
if (limit != null) {
|
|
3764
|
+
_queryParams["limit"] = limit.toString();
|
|
3765
|
+
}
|
|
3766
|
+
if (cursor != null) {
|
|
3767
|
+
_queryParams["cursor"] = cursor;
|
|
3768
|
+
}
|
|
4033
3769
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4034
|
-
url: (0,
|
|
3770
|
+
url: (0, import_url_join6.default)(
|
|
4035
3771
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4036
|
-
|
|
3772
|
+
"actors/names"
|
|
4037
3773
|
),
|
|
4038
|
-
method: "
|
|
3774
|
+
method: "GET",
|
|
4039
3775
|
headers: {
|
|
4040
3776
|
Authorization: await this._getAuthorizationHeader(),
|
|
4041
3777
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4046,13 +3782,12 @@ var RivetClient = class {
|
|
|
4046
3782
|
contentType: "application/json",
|
|
4047
3783
|
queryParameters: _queryParams,
|
|
4048
3784
|
requestType: "json",
|
|
4049
|
-
body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4050
3785
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4051
3786
|
maxRetries: requestOptions?.maxRetries,
|
|
4052
3787
|
abortSignal: requestOptions?.abortSignal
|
|
4053
3788
|
});
|
|
4054
3789
|
if (_response.ok) {
|
|
4055
|
-
return
|
|
3790
|
+
return ActorsListNamesResponse.parseOrThrow(_response.body, {
|
|
4056
3791
|
unrecognizedObjectKeys: "passthrough",
|
|
4057
3792
|
allowUnrecognizedUnionMembers: true,
|
|
4058
3793
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4073,7 +3808,7 @@ var RivetClient = class {
|
|
|
4073
3808
|
body: _response.error.rawBody
|
|
4074
3809
|
});
|
|
4075
3810
|
case "timeout":
|
|
4076
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3811
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/names.");
|
|
4077
3812
|
case "unknown":
|
|
4078
3813
|
throw new RivetError({
|
|
4079
3814
|
message: _response.error.errorMessage
|
|
@@ -4081,43 +3816,30 @@ var RivetClient = class {
|
|
|
4081
3816
|
}
|
|
4082
3817
|
}
|
|
4083
3818
|
/**
|
|
4084
|
-
*
|
|
3819
|
+
* 2 round trip:
|
|
3820
|
+
*
|
|
3821
|
+
* - DELETE /actors/{}
|
|
3822
|
+
* - [api-peer] namespace::ops::resolve_for_name_global
|
|
3823
|
+
*
|
|
3824
|
+
* @param {Rivet.RivetId} actorId
|
|
3825
|
+
* @param {Rivet.ActorsDeleteRequest} request
|
|
4085
3826
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4086
3827
|
*
|
|
4087
3828
|
* @example
|
|
4088
|
-
* await client.
|
|
3829
|
+
* await client.actorsDelete("actor_id", {
|
|
4089
3830
|
* namespace: "namespace"
|
|
4090
3831
|
* })
|
|
4091
3832
|
*/
|
|
4092
|
-
|
|
4093
|
-
|
|
3833
|
+
/** Returns one actor by ID. */
|
|
3834
|
+
async actorsGet(actorId, request, requestOptions) {
|
|
3835
|
+
const { namespace } = request;
|
|
4094
3836
|
const _queryParams = {};
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
_queryParams["limit"] = limit.toString();
|
|
4098
|
-
}
|
|
4099
|
-
if (cursor != null) {
|
|
4100
|
-
_queryParams["cursor"] = cursor;
|
|
4101
|
-
}
|
|
4102
|
-
if (variant != null) {
|
|
4103
|
-
_queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
|
|
4104
|
-
unrecognizedObjectKeys: "strip"
|
|
4105
|
-
});
|
|
4106
|
-
}
|
|
4107
|
-
if (runnerNames != null) {
|
|
4108
|
-
_queryParams["runner_names"] = runnerNames;
|
|
4109
|
-
}
|
|
4110
|
-
if (runnerName != null) {
|
|
4111
|
-
if (Array.isArray(runnerName)) {
|
|
4112
|
-
_queryParams["runner_name"] = runnerName.map((item) => item);
|
|
4113
|
-
} else {
|
|
4114
|
-
_queryParams["runner_name"] = runnerName;
|
|
4115
|
-
}
|
|
4116
|
-
}
|
|
3837
|
+
if (namespace != null)
|
|
3838
|
+
_queryParams["namespace"] = namespace;
|
|
4117
3839
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4118
|
-
url: (0,
|
|
3840
|
+
url: (0, import_url_join6.default)(
|
|
4119
3841
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4120
|
-
|
|
3842
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4121
3843
|
),
|
|
4122
3844
|
method: "GET",
|
|
4123
3845
|
headers: {
|
|
@@ -4135,7 +3857,7 @@ var RivetClient = class {
|
|
|
4135
3857
|
abortSignal: requestOptions?.abortSignal
|
|
4136
3858
|
});
|
|
4137
3859
|
if (_response.ok) {
|
|
4138
|
-
return
|
|
3860
|
+
return ActorsGetResponse.parseOrThrow(_response.body, {
|
|
4139
3861
|
unrecognizedObjectKeys: "passthrough",
|
|
4140
3862
|
allowUnrecognizedUnionMembers: true,
|
|
4141
3863
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4156,33 +3878,24 @@ var RivetClient = class {
|
|
|
4156
3878
|
body: _response.error.rawBody
|
|
4157
3879
|
});
|
|
4158
3880
|
case "timeout":
|
|
4159
|
-
throw new RivetTimeoutError("Timeout exceeded when calling GET /
|
|
3881
|
+
throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
|
|
4160
3882
|
case "unknown":
|
|
4161
3883
|
throw new RivetError({
|
|
4162
3884
|
message: _response.error.errorMessage
|
|
4163
3885
|
});
|
|
4164
3886
|
}
|
|
4165
3887
|
}
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4169
|
-
*
|
|
4170
|
-
* @example
|
|
4171
|
-
* await client.runnerConfigsServerlessHealthCheck({
|
|
4172
|
-
* namespace: "namespace",
|
|
4173
|
-
* url: "url"
|
|
4174
|
-
* })
|
|
4175
|
-
*/
|
|
4176
|
-
async runnerConfigsServerlessHealthCheck(request, requestOptions) {
|
|
4177
|
-
const { namespace, ..._body } = request;
|
|
3888
|
+
async actorsDelete(actorId, request, requestOptions) {
|
|
3889
|
+
const { namespace } = request;
|
|
4178
3890
|
const _queryParams = {};
|
|
4179
|
-
|
|
3891
|
+
if (namespace != null)
|
|
3892
|
+
_queryParams["namespace"] = namespace;
|
|
4180
3893
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4181
|
-
url: (0,
|
|
3894
|
+
url: (0, import_url_join6.default)(
|
|
4182
3895
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4183
|
-
|
|
3896
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
|
|
4184
3897
|
),
|
|
4185
|
-
method: "
|
|
3898
|
+
method: "DELETE",
|
|
4186
3899
|
headers: {
|
|
4187
3900
|
Authorization: await this._getAuthorizationHeader(),
|
|
4188
3901
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4193,15 +3906,12 @@ var RivetClient = class {
|
|
|
4193
3906
|
contentType: "application/json",
|
|
4194
3907
|
queryParameters: _queryParams,
|
|
4195
3908
|
requestType: "json",
|
|
4196
|
-
body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
|
|
4197
|
-
unrecognizedObjectKeys: "strip"
|
|
4198
|
-
}),
|
|
4199
3909
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4200
3910
|
maxRetries: requestOptions?.maxRetries,
|
|
4201
3911
|
abortSignal: requestOptions?.abortSignal
|
|
4202
3912
|
});
|
|
4203
3913
|
if (_response.ok) {
|
|
4204
|
-
return
|
|
3914
|
+
return ActorsDeleteResponse.parseOrThrow(_response.body, {
|
|
4205
3915
|
unrecognizedObjectKeys: "passthrough",
|
|
4206
3916
|
allowUnrecognizedUnionMembers: true,
|
|
4207
3917
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4222,9 +3932,7 @@ var RivetClient = class {
|
|
|
4222
3932
|
body: _response.error.rawBody
|
|
4223
3933
|
});
|
|
4224
3934
|
case "timeout":
|
|
4225
|
-
throw new RivetTimeoutError(
|
|
4226
|
-
"Timeout exceeded when calling POST /runner-configs/serverless-health-check."
|
|
4227
|
-
);
|
|
3935
|
+
throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
|
|
4228
3936
|
case "unknown":
|
|
4229
3937
|
throw new RivetError({
|
|
4230
3938
|
message: _response.error.errorMessage
|
|
@@ -4232,28 +3940,26 @@ var RivetClient = class {
|
|
|
4232
3940
|
}
|
|
4233
3941
|
}
|
|
4234
3942
|
/**
|
|
4235
|
-
* @param {
|
|
4236
|
-
* @param {Rivet.
|
|
3943
|
+
* @param {Rivet.RivetId} actorId
|
|
3944
|
+
* @param {Rivet.ActorsRescheduleRequest} request
|
|
4237
3945
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4238
3946
|
*
|
|
4239
3947
|
* @example
|
|
4240
|
-
* await client.
|
|
3948
|
+
* await client.actorsReschedule("actor_id", {
|
|
4241
3949
|
* namespace: "namespace",
|
|
4242
|
-
* datacenters: {
|
|
4243
|
-
* "key": {}
|
|
4244
|
-
* }
|
|
4245
3950
|
* })
|
|
4246
3951
|
*/
|
|
4247
|
-
async
|
|
4248
|
-
const { namespace
|
|
3952
|
+
async actorsReschedule(actorId, request, requestOptions) {
|
|
3953
|
+
const { namespace } = request;
|
|
4249
3954
|
const _queryParams = {};
|
|
4250
|
-
|
|
3955
|
+
if (namespace != null)
|
|
3956
|
+
_queryParams["namespace"] = namespace;
|
|
4251
3957
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4252
|
-
url: (0,
|
|
3958
|
+
url: (0, import_url_join6.default)(
|
|
4253
3959
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4254
|
-
`
|
|
3960
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
|
|
4255
3961
|
),
|
|
4256
|
-
method: "
|
|
3962
|
+
method: "POST",
|
|
4257
3963
|
headers: {
|
|
4258
3964
|
Authorization: await this._getAuthorizationHeader(),
|
|
4259
3965
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4264,13 +3970,12 @@ var RivetClient = class {
|
|
|
4264
3970
|
contentType: "application/json",
|
|
4265
3971
|
queryParameters: _queryParams,
|
|
4266
3972
|
requestType: "json",
|
|
4267
|
-
body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4268
3973
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4269
3974
|
maxRetries: requestOptions?.maxRetries,
|
|
4270
3975
|
abortSignal: requestOptions?.abortSignal
|
|
4271
3976
|
});
|
|
4272
3977
|
if (_response.ok) {
|
|
4273
|
-
return
|
|
3978
|
+
return ActorsRescheduleResponse.parseOrThrow(_response.body, {
|
|
4274
3979
|
unrecognizedObjectKeys: "passthrough",
|
|
4275
3980
|
allowUnrecognizedUnionMembers: true,
|
|
4276
3981
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4291,7 +3996,7 @@ var RivetClient = class {
|
|
|
4291
3996
|
body: _response.error.rawBody
|
|
4292
3997
|
});
|
|
4293
3998
|
case "timeout":
|
|
4294
|
-
throw new RivetTimeoutError("Timeout exceeded when calling
|
|
3999
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/reschedule.");
|
|
4295
4000
|
case "unknown":
|
|
4296
4001
|
throw new RivetError({
|
|
4297
4002
|
message: _response.error.errorMessage
|
|
@@ -4299,25 +4004,26 @@ var RivetClient = class {
|
|
|
4299
4004
|
}
|
|
4300
4005
|
}
|
|
4301
4006
|
/**
|
|
4302
|
-
* @param {
|
|
4303
|
-
* @param {Rivet.
|
|
4007
|
+
* @param {Rivet.RivetId} actorId
|
|
4008
|
+
* @param {Rivet.ActorsSleepRequest} request
|
|
4304
4009
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4305
4010
|
*
|
|
4306
4011
|
* @example
|
|
4307
|
-
* await client.
|
|
4308
|
-
* namespace: "namespace"
|
|
4012
|
+
* await client.actorsSleep("actor_id", {
|
|
4013
|
+
* namespace: "namespace",
|
|
4309
4014
|
* })
|
|
4310
4015
|
*/
|
|
4311
|
-
async
|
|
4016
|
+
async actorsSleep(actorId, request, requestOptions) {
|
|
4312
4017
|
const { namespace } = request;
|
|
4313
4018
|
const _queryParams = {};
|
|
4314
|
-
|
|
4019
|
+
if (namespace != null)
|
|
4020
|
+
_queryParams["namespace"] = namespace;
|
|
4315
4021
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4316
|
-
url: (0,
|
|
4022
|
+
url: (0, import_url_join6.default)(
|
|
4317
4023
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4318
|
-
`
|
|
4024
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
|
|
4319
4025
|
),
|
|
4320
|
-
method: "
|
|
4026
|
+
method: "POST",
|
|
4321
4027
|
headers: {
|
|
4322
4028
|
Authorization: await this._getAuthorizationHeader(),
|
|
4323
4029
|
"X-Fern-Language": "JavaScript",
|
|
@@ -4333,7 +4039,7 @@ var RivetClient = class {
|
|
|
4333
4039
|
abortSignal: requestOptions?.abortSignal
|
|
4334
4040
|
});
|
|
4335
4041
|
if (_response.ok) {
|
|
4336
|
-
return
|
|
4042
|
+
return ActorsSleepResponse.parseOrThrow(_response.body, {
|
|
4337
4043
|
unrecognizedObjectKeys: "passthrough",
|
|
4338
4044
|
allowUnrecognizedUnionMembers: true,
|
|
4339
4045
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4354,9 +4060,7 @@ var RivetClient = class {
|
|
|
4354
4060
|
body: _response.error.rawBody
|
|
4355
4061
|
});
|
|
4356
4062
|
case "timeout":
|
|
4357
|
-
throw new RivetTimeoutError(
|
|
4358
|
-
"Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
|
|
4359
|
-
);
|
|
4063
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/sleep.");
|
|
4360
4064
|
case "unknown":
|
|
4361
4065
|
throw new RivetError({
|
|
4362
4066
|
message: _response.error.errorMessage
|
|
@@ -4364,26 +4068,27 @@ var RivetClient = class {
|
|
|
4364
4068
|
}
|
|
4365
4069
|
}
|
|
4366
4070
|
/**
|
|
4367
|
-
*
|
|
4368
|
-
*
|
|
4071
|
+
* Forks an actor: creates a new actor in the same namespace, with the source's name and pool,
|
|
4072
|
+
* whose database is a copy of the source's, and starts it.
|
|
4073
|
+
*
|
|
4074
|
+
* @param {Rivet.RivetId} actorId
|
|
4075
|
+
* @param {Rivet.ActorsForkRequest} request
|
|
4369
4076
|
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4370
4077
|
*
|
|
4371
4078
|
* @example
|
|
4372
|
-
* await client.
|
|
4079
|
+
* await client.actorsFork("actor_id", {
|
|
4373
4080
|
* namespace: "namespace",
|
|
4374
|
-
* body: {
|
|
4375
|
-
* "key": "value"
|
|
4376
|
-
* }
|
|
4377
4081
|
* })
|
|
4378
4082
|
*/
|
|
4379
|
-
async
|
|
4380
|
-
const { namespace,
|
|
4083
|
+
async actorsFork(actorId, request, requestOptions) {
|
|
4084
|
+
const { namespace, ..._body } = request;
|
|
4381
4085
|
const _queryParams = {};
|
|
4382
|
-
|
|
4086
|
+
if (namespace != null)
|
|
4087
|
+
_queryParams["namespace"] = namespace;
|
|
4383
4088
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4384
|
-
url: (0,
|
|
4089
|
+
url: (0, import_url_join6.default)(
|
|
4385
4090
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4386
|
-
`
|
|
4091
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/fork`
|
|
4387
4092
|
),
|
|
4388
4093
|
method: "POST",
|
|
4389
4094
|
headers: {
|
|
@@ -4396,15 +4101,13 @@ var RivetClient = class {
|
|
|
4396
4101
|
contentType: "application/json",
|
|
4397
4102
|
queryParameters: _queryParams,
|
|
4398
4103
|
requestType: "json",
|
|
4399
|
-
body:
|
|
4400
|
-
unrecognizedObjectKeys: "strip"
|
|
4401
|
-
}),
|
|
4104
|
+
body: ActorsForkRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4402
4105
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4403
4106
|
maxRetries: requestOptions?.maxRetries,
|
|
4404
4107
|
abortSignal: requestOptions?.abortSignal
|
|
4405
4108
|
});
|
|
4406
4109
|
if (_response.ok) {
|
|
4407
|
-
return
|
|
4110
|
+
return ActorsForkResponse.parseOrThrow(_response.body, {
|
|
4408
4111
|
unrecognizedObjectKeys: "passthrough",
|
|
4409
4112
|
allowUnrecognizedUnionMembers: true,
|
|
4410
4113
|
allowUnrecognizedEnumValues: true,
|
|
@@ -4425,9 +4128,7 @@ var RivetClient = class {
|
|
|
4425
4128
|
body: _response.error.rawBody
|
|
4426
4129
|
});
|
|
4427
4130
|
case "timeout":
|
|
4428
|
-
throw new RivetTimeoutError(
|
|
4429
|
-
"Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
|
|
4430
|
-
);
|
|
4131
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/fork.");
|
|
4431
4132
|
case "unknown":
|
|
4432
4133
|
throw new RivetError({
|
|
4433
4134
|
message: _response.error.errorMessage
|