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