@rivetkit/engine-api-full 3.0.7 → 3.1.0
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 +191 -4
- package/dist/browser/cjs/serialization.js +48 -3
- package/dist/browser/esm/index.js +191 -4
- package/dist/browser/esm/serialization.js +48 -3
- package/dist/node/cjs/index.js +191 -4
- package/dist/node/cjs/serialization.js +54 -3
- package/dist/node/esm/index.js +191 -4
- package/dist/node/esm/serialization.js +48 -3
- package/package.json +1 -1
- package/types/Client.d.ts +14 -0
- package/types/api/client/requests/ActorsForkRequest.d.ts +14 -0
- package/types/api/client/requests/index.d.ts +1 -0
- package/types/api/resources/namespaces/client/Client.d.ts +12 -0
- package/types/api/types/Actor.d.ts +2 -0
- package/types/api/types/ActorsForkResponse.d.ts +4 -0
- package/types/api/types/AuthOperationKind.d.ts +1 -1
- package/types/api/types/Namespace.d.ts +11 -0
- package/types/api/types/NamespaceForkedFrom.d.ts +14 -0
- package/types/api/types/NamespaceSkippedActor.d.ts +14 -0
- package/types/api/types/NamespaceStatus.d.ts +18 -0
- package/types/api/types/NamespacesArchiveResponse.d.ts +7 -0
- package/types/api/types/index.d.ts +5 -0
- package/types/serialization/client/requests/ActorsForkRequest.d.ts +10 -0
- package/types/serialization/client/requests/index.d.ts +1 -0
- package/types/serialization/types/Actor.d.ts +1 -0
- package/types/serialization/types/ActorsForkResponse.d.ts +10 -0
- package/types/serialization/types/AuthOperationKind.d.ts +1 -1
- package/types/serialization/types/Namespace.d.ts +8 -0
- package/types/serialization/types/NamespaceForkedFrom.d.ts +14 -0
- 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/index.d.ts +5 -0
|
@@ -580,6 +580,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
580
580
|
// src/api/index.ts
|
|
581
581
|
var api_exports = {};
|
|
582
582
|
__export(api_exports, {
|
|
583
|
+
NamespaceStatus: () => NamespaceStatus,
|
|
583
584
|
authTokens: () => authTokens_exports,
|
|
584
585
|
datacenters: () => datacenters_exports,
|
|
585
586
|
metadata: () => metadata_exports,
|
|
@@ -587,6 +588,16 @@ __export(api_exports, {
|
|
|
587
588
|
pools: () => pools_exports
|
|
588
589
|
});
|
|
589
590
|
|
|
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
|
+
};
|
|
600
|
+
|
|
590
601
|
// src/api/resources/authTokens/index.ts
|
|
591
602
|
var authTokens_exports = {};
|
|
592
603
|
__export(authTokens_exports, {
|
|
@@ -2316,6 +2327,8 @@ __export(serialization_exports, {
|
|
|
2316
2327
|
ActorsCreateRequest: () => ActorsCreateRequest,
|
|
2317
2328
|
ActorsCreateResponse: () => ActorsCreateResponse,
|
|
2318
2329
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
2330
|
+
ActorsForkRequest: () => ActorsForkRequest,
|
|
2331
|
+
ActorsForkResponse: () => ActorsForkResponse,
|
|
2319
2332
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
2320
2333
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
2321
2334
|
ActorsGetResponse: () => ActorsGetResponse,
|
|
@@ -2334,7 +2347,11 @@ __export(serialization_exports, {
|
|
|
2334
2347
|
ErrorResponse: () => ErrorResponse,
|
|
2335
2348
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
2336
2349
|
Namespace: () => Namespace,
|
|
2350
|
+
NamespaceForkedFrom: () => NamespaceForkedFrom,
|
|
2337
2351
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
2352
|
+
NamespaceSkippedActor: () => NamespaceSkippedActor,
|
|
2353
|
+
NamespaceStatus: () => NamespaceStatus2,
|
|
2354
|
+
NamespacesArchiveResponse: () => NamespacesArchiveResponse,
|
|
2338
2355
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
2339
2356
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
2340
2357
|
Node: () => Node,
|
|
@@ -2364,7 +2381,8 @@ var Actor = schemas_exports.object({
|
|
|
2364
2381
|
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
|
|
2365
2382
|
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
|
|
2366
2383
|
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
|
|
2367
|
-
destroyTs: schemas_exports.property("destroy_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())
|
|
2368
2386
|
});
|
|
2369
2387
|
|
|
2370
2388
|
// src/serialization/types/ActorName.ts
|
|
@@ -2381,6 +2399,11 @@ var ActorsCreateResponse = schemas_exports.object({
|
|
|
2381
2399
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
2382
2400
|
var ActorsDeleteResponse = schemas_exports.object({});
|
|
2383
2401
|
|
|
2402
|
+
// src/serialization/types/ActorsForkResponse.ts
|
|
2403
|
+
var ActorsForkResponse = schemas_exports.object({
|
|
2404
|
+
actor: Actor
|
|
2405
|
+
});
|
|
2406
|
+
|
|
2384
2407
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
2385
2408
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
2386
2409
|
actor: Actor,
|
|
@@ -2415,7 +2438,7 @@ var ActorsRescheduleResponse = schemas_exports.object({});
|
|
|
2415
2438
|
var ActorsSleepResponse = schemas_exports.object({});
|
|
2416
2439
|
|
|
2417
2440
|
// src/serialization/types/AuthOperationKind.ts
|
|
2418
|
-
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
|
|
2441
|
+
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete", "fork"]);
|
|
2419
2442
|
|
|
2420
2443
|
// src/serialization/types/AuthResourceKind.ts
|
|
2421
2444
|
var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
|
|
@@ -2474,10 +2497,32 @@ var MetadataGetResponse = schemas_exports.object({
|
|
|
2474
2497
|
actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
|
|
2475
2498
|
});
|
|
2476
2499
|
|
|
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())
|
|
2508
|
+
});
|
|
2509
|
+
|
|
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()
|
|
2515
|
+
});
|
|
2516
|
+
|
|
2477
2517
|
// src/serialization/types/Namespace.ts
|
|
2478
2518
|
var Namespace = schemas_exports.object({
|
|
2479
2519
|
name: schemas_exports.string(),
|
|
2480
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number())
|
|
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())
|
|
2481
2526
|
});
|
|
2482
2527
|
|
|
2483
2528
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -2491,6 +2536,11 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
2491
2536
|
namespace: Namespace
|
|
2492
2537
|
});
|
|
2493
2538
|
|
|
2539
|
+
// src/serialization/types/NamespacesArchiveResponse.ts
|
|
2540
|
+
var NamespacesArchiveResponse = schemas_exports.object({
|
|
2541
|
+
namespace: Namespace
|
|
2542
|
+
});
|
|
2543
|
+
|
|
2494
2544
|
// src/serialization/types/Node.ts
|
|
2495
2545
|
var Node = schemas_exports.object({
|
|
2496
2546
|
key: schemas_exports.string(),
|
|
@@ -2550,6 +2600,12 @@ var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
|
2550
2600
|
pool: schemas_exports.string().optional()
|
|
2551
2601
|
});
|
|
2552
2602
|
|
|
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()
|
|
2607
|
+
});
|
|
2608
|
+
|
|
2553
2609
|
// src/serialization/resources/namespaces/index.ts
|
|
2554
2610
|
var namespaces_exports = {};
|
|
2555
2611
|
__export(namespaces_exports, {
|
|
@@ -2947,6 +3003,8 @@ var Namespaces = class {
|
|
|
2947
3003
|
* })
|
|
2948
3004
|
*/
|
|
2949
3005
|
async create(request, requestOptions) {
|
|
3006
|
+
const _body = request;
|
|
3007
|
+
const _queryParams = {};
|
|
2950
3008
|
const _response = await (this._options.fetcher ?? fetcher)({
|
|
2951
3009
|
url: (0, import_url_join4.default)(
|
|
2952
3010
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
@@ -2961,8 +3019,9 @@ var Namespaces = class {
|
|
|
2961
3019
|
...requestOptions?.headers
|
|
2962
3020
|
},
|
|
2963
3021
|
contentType: "application/json",
|
|
3022
|
+
queryParameters: _queryParams,
|
|
2964
3023
|
requestType: "json",
|
|
2965
|
-
body: NamespacesCreateRequest.jsonOrThrow(
|
|
3024
|
+
body: NamespacesCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
2966
3025
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
2967
3026
|
maxRetries: requestOptions?.maxRetries,
|
|
2968
3027
|
abortSignal: requestOptions?.abortSignal
|
|
@@ -2996,6 +3055,66 @@ var Namespaces = class {
|
|
|
2996
3055
|
});
|
|
2997
3056
|
}
|
|
2998
3057
|
}
|
|
3058
|
+
/**
|
|
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.
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* await client.namespaces.archive("staging")
|
|
3068
|
+
*/
|
|
3069
|
+
async archive(name, requestOptions) {
|
|
3070
|
+
const _response = await (this._options.fetcher ?? fetcher)({
|
|
3071
|
+
url: (0, import_url_join4.default)(
|
|
3072
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
3073
|
+
`namespaces/${encodeURIComponent(name)}/archive`
|
|
3074
|
+
),
|
|
3075
|
+
method: "POST",
|
|
3076
|
+
headers: {
|
|
3077
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
3078
|
+
"X-Fern-Language": "JavaScript",
|
|
3079
|
+
"X-Fern-Runtime": RUNTIME.type,
|
|
3080
|
+
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
3081
|
+
...requestOptions?.headers
|
|
3082
|
+
},
|
|
3083
|
+
contentType: "application/json",
|
|
3084
|
+
requestType: "json",
|
|
3085
|
+
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
3086
|
+
maxRetries: requestOptions?.maxRetries,
|
|
3087
|
+
abortSignal: requestOptions?.abortSignal
|
|
3088
|
+
});
|
|
3089
|
+
if (_response.ok) {
|
|
3090
|
+
return NamespacesArchiveResponse.parseOrThrow(_response.body, {
|
|
3091
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3092
|
+
allowUnrecognizedUnionMembers: true,
|
|
3093
|
+
allowUnrecognizedEnumValues: true,
|
|
3094
|
+
skipValidation: true,
|
|
3095
|
+
breadcrumbsPrefix: ["response"]
|
|
3096
|
+
});
|
|
3097
|
+
}
|
|
3098
|
+
if (_response.error.reason === "status-code") {
|
|
3099
|
+
throw new RivetError({
|
|
3100
|
+
statusCode: _response.error.statusCode,
|
|
3101
|
+
body: _response.error.body
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
switch (_response.error.reason) {
|
|
3105
|
+
case "non-json":
|
|
3106
|
+
throw new RivetError({
|
|
3107
|
+
statusCode: _response.error.statusCode,
|
|
3108
|
+
body: _response.error.rawBody
|
|
3109
|
+
});
|
|
3110
|
+
case "timeout":
|
|
3111
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
|
|
3112
|
+
case "unknown":
|
|
3113
|
+
throw new RivetError({
|
|
3114
|
+
message: _response.error.errorMessage
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
2999
3118
|
async _getAuthorizationHeader() {
|
|
3000
3119
|
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3001
3120
|
}
|
|
@@ -3948,6 +4067,74 @@ var RivetClient = class {
|
|
|
3948
4067
|
});
|
|
3949
4068
|
}
|
|
3950
4069
|
}
|
|
4070
|
+
/**
|
|
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
|
|
4076
|
+
* @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4077
|
+
*
|
|
4078
|
+
* @example
|
|
4079
|
+
* await client.actorsFork("actor_id", {
|
|
4080
|
+
* namespace: "namespace",
|
|
4081
|
+
* })
|
|
4082
|
+
*/
|
|
4083
|
+
async actorsFork(actorId, request, requestOptions) {
|
|
4084
|
+
const { namespace, ..._body } = request;
|
|
4085
|
+
const _queryParams = {};
|
|
4086
|
+
if (namespace != null)
|
|
4087
|
+
_queryParams["namespace"] = namespace;
|
|
4088
|
+
const _response = await (this._options.fetcher ?? fetcher)({
|
|
4089
|
+
url: (0, import_url_join6.default)(
|
|
4090
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4091
|
+
`actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/fork`
|
|
4092
|
+
),
|
|
4093
|
+
method: "POST",
|
|
4094
|
+
headers: {
|
|
4095
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
4096
|
+
"X-Fern-Language": "JavaScript",
|
|
4097
|
+
"X-Fern-Runtime": RUNTIME.type,
|
|
4098
|
+
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
4099
|
+
...requestOptions?.headers
|
|
4100
|
+
},
|
|
4101
|
+
contentType: "application/json",
|
|
4102
|
+
queryParameters: _queryParams,
|
|
4103
|
+
requestType: "json",
|
|
4104
|
+
body: ActorsForkRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
4105
|
+
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
|
|
4106
|
+
maxRetries: requestOptions?.maxRetries,
|
|
4107
|
+
abortSignal: requestOptions?.abortSignal
|
|
4108
|
+
});
|
|
4109
|
+
if (_response.ok) {
|
|
4110
|
+
return ActorsForkResponse.parseOrThrow(_response.body, {
|
|
4111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
4112
|
+
allowUnrecognizedUnionMembers: true,
|
|
4113
|
+
allowUnrecognizedEnumValues: true,
|
|
4114
|
+
skipValidation: true,
|
|
4115
|
+
breadcrumbsPrefix: ["response"]
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
if (_response.error.reason === "status-code") {
|
|
4119
|
+
throw new RivetError({
|
|
4120
|
+
statusCode: _response.error.statusCode,
|
|
4121
|
+
body: _response.error.body
|
|
4122
|
+
});
|
|
4123
|
+
}
|
|
4124
|
+
switch (_response.error.reason) {
|
|
4125
|
+
case "non-json":
|
|
4126
|
+
throw new RivetError({
|
|
4127
|
+
statusCode: _response.error.statusCode,
|
|
4128
|
+
body: _response.error.rawBody
|
|
4129
|
+
});
|
|
4130
|
+
case "timeout":
|
|
4131
|
+
throw new RivetTimeoutError("Timeout exceeded when calling POST /actors/{actor_id}/fork.");
|
|
4132
|
+
case "unknown":
|
|
4133
|
+
throw new RivetError({
|
|
4134
|
+
message: _response.error.errorMessage
|
|
4135
|
+
});
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
3951
4138
|
async _getAuthorizationHeader() {
|
|
3952
4139
|
return `Bearer ${await Supplier.get(this._options.token)}`;
|
|
3953
4140
|
}
|
|
@@ -35,6 +35,8 @@ __export(serialization_exports, {
|
|
|
35
35
|
ActorsCreateRequest: () => ActorsCreateRequest,
|
|
36
36
|
ActorsCreateResponse: () => ActorsCreateResponse,
|
|
37
37
|
ActorsDeleteResponse: () => ActorsDeleteResponse,
|
|
38
|
+
ActorsForkRequest: () => ActorsForkRequest,
|
|
39
|
+
ActorsForkResponse: () => ActorsForkResponse,
|
|
38
40
|
ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
|
|
39
41
|
ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
|
|
40
42
|
ActorsGetResponse: () => ActorsGetResponse,
|
|
@@ -53,7 +55,11 @@ __export(serialization_exports, {
|
|
|
53
55
|
ErrorResponse: () => ErrorResponse,
|
|
54
56
|
MetadataGetResponse: () => MetadataGetResponse,
|
|
55
57
|
Namespace: () => Namespace,
|
|
58
|
+
NamespaceForkedFrom: () => NamespaceForkedFrom,
|
|
56
59
|
NamespaceListResponse: () => NamespaceListResponse,
|
|
60
|
+
NamespaceSkippedActor: () => NamespaceSkippedActor,
|
|
61
|
+
NamespaceStatus: () => NamespaceStatus,
|
|
62
|
+
NamespacesArchiveResponse: () => NamespacesArchiveResponse,
|
|
57
63
|
NamespacesCreateRequest: () => NamespacesCreateRequest,
|
|
58
64
|
NamespacesCreateResponse: () => NamespacesCreateResponse,
|
|
59
65
|
Node: () => Node,
|
|
@@ -1546,7 +1552,8 @@ var Actor = schemas_exports.object({
|
|
|
1546
1552
|
connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
|
|
1547
1553
|
sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
|
|
1548
1554
|
rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
|
|
1549
|
-
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
|
|
1555
|
+
destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable()),
|
|
1556
|
+
forkedFrom: schemas_exports.property("forked_from", RivetId.nullable().optional())
|
|
1550
1557
|
});
|
|
1551
1558
|
|
|
1552
1559
|
// src/serialization/types/ActorName.ts
|
|
@@ -1563,6 +1570,11 @@ var ActorsCreateResponse = schemas_exports.object({
|
|
|
1563
1570
|
// src/serialization/types/ActorsDeleteResponse.ts
|
|
1564
1571
|
var ActorsDeleteResponse = schemas_exports.object({});
|
|
1565
1572
|
|
|
1573
|
+
// src/serialization/types/ActorsForkResponse.ts
|
|
1574
|
+
var ActorsForkResponse = schemas_exports.object({
|
|
1575
|
+
actor: Actor
|
|
1576
|
+
});
|
|
1577
|
+
|
|
1566
1578
|
// src/serialization/types/ActorsGetOrCreateResponse.ts
|
|
1567
1579
|
var ActorsGetOrCreateResponse = schemas_exports.object({
|
|
1568
1580
|
actor: Actor,
|
|
@@ -1597,7 +1609,7 @@ var ActorsRescheduleResponse = schemas_exports.object({});
|
|
|
1597
1609
|
var ActorsSleepResponse = schemas_exports.object({});
|
|
1598
1610
|
|
|
1599
1611
|
// src/serialization/types/AuthOperationKind.ts
|
|
1600
|
-
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
|
|
1612
|
+
var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete", "fork"]);
|
|
1601
1613
|
|
|
1602
1614
|
// src/serialization/types/AuthResourceKind.ts
|
|
1603
1615
|
var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
|
|
@@ -1656,10 +1668,32 @@ var MetadataGetResponse = schemas_exports.object({
|
|
|
1656
1668
|
actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
|
|
1657
1669
|
});
|
|
1658
1670
|
|
|
1671
|
+
// src/serialization/types/NamespaceStatus.ts
|
|
1672
|
+
var NamespaceStatus = schemas_exports.enum_(["creating", "forking", "live", "archiving", "archived", "failed"]);
|
|
1673
|
+
|
|
1674
|
+
// src/serialization/types/NamespaceForkedFrom.ts
|
|
1675
|
+
var NamespaceForkedFrom = schemas_exports.object({
|
|
1676
|
+
namespace: schemas_exports.string(),
|
|
1677
|
+
forkNumber: schemas_exports.property("fork_number", schemas_exports.number()),
|
|
1678
|
+
forkedTs: schemas_exports.property("forked_ts", schemas_exports.number())
|
|
1679
|
+
});
|
|
1680
|
+
|
|
1681
|
+
// src/serialization/types/NamespaceSkippedActor.ts
|
|
1682
|
+
var NamespaceSkippedActor = schemas_exports.object({
|
|
1683
|
+
actorId: schemas_exports.property("actor_id", schemas_exports.string()),
|
|
1684
|
+
name: schemas_exports.string(),
|
|
1685
|
+
key: schemas_exports.string().nullable()
|
|
1686
|
+
});
|
|
1687
|
+
|
|
1659
1688
|
// src/serialization/types/Namespace.ts
|
|
1660
1689
|
var Namespace = schemas_exports.object({
|
|
1661
1690
|
name: schemas_exports.string(),
|
|
1662
|
-
createTs: schemas_exports.property("create_ts", schemas_exports.number())
|
|
1691
|
+
createTs: schemas_exports.property("create_ts", schemas_exports.number()),
|
|
1692
|
+
status: NamespaceStatus,
|
|
1693
|
+
forkedFrom: schemas_exports.property("forked_from", NamespaceForkedFrom.nullable()),
|
|
1694
|
+
archivedTs: schemas_exports.property("archived_ts", schemas_exports.number().nullable()),
|
|
1695
|
+
skipped: schemas_exports.list(NamespaceSkippedActor).optional(),
|
|
1696
|
+
skippedCount: schemas_exports.property("skipped_count", schemas_exports.number().optional())
|
|
1663
1697
|
});
|
|
1664
1698
|
|
|
1665
1699
|
// src/serialization/types/NamespaceListResponse.ts
|
|
@@ -1673,6 +1707,11 @@ var NamespacesCreateResponse = schemas_exports.object({
|
|
|
1673
1707
|
namespace: Namespace
|
|
1674
1708
|
});
|
|
1675
1709
|
|
|
1710
|
+
// src/serialization/types/NamespacesArchiveResponse.ts
|
|
1711
|
+
var NamespacesArchiveResponse = schemas_exports.object({
|
|
1712
|
+
namespace: Namespace
|
|
1713
|
+
});
|
|
1714
|
+
|
|
1676
1715
|
// src/serialization/types/Node.ts
|
|
1677
1716
|
var Node = schemas_exports.object({
|
|
1678
1717
|
key: schemas_exports.string(),
|
|
@@ -1732,6 +1771,12 @@ var ActorsGetOrCreateRequest = schemas_exports.object({
|
|
|
1732
1771
|
pool: schemas_exports.string().optional()
|
|
1733
1772
|
});
|
|
1734
1773
|
|
|
1774
|
+
// src/serialization/client/requests/ActorsForkRequest.ts
|
|
1775
|
+
var ActorsForkRequest = schemas_exports.object({
|
|
1776
|
+
key: schemas_exports.string().optional(),
|
|
1777
|
+
input: schemas_exports.string().optional()
|
|
1778
|
+
});
|
|
1779
|
+
|
|
1735
1780
|
// src/serialization/resources/namespaces/index.ts
|
|
1736
1781
|
var namespaces_exports = {};
|
|
1737
1782
|
__export(namespaces_exports, {
|