@rivetkit/engine-api-full 2.3.19 → 2.3.21
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 +256 -28
- package/dist/browser/cjs/serialization.js +68 -0
- package/dist/browser/esm/index.js +256 -28
- package/dist/browser/esm/serialization.js +68 -0
- package/dist/node/cjs/index.js +256 -28
- package/dist/node/cjs/serialization.js +77 -0
- package/dist/node/esm/index.js +256 -28
- package/dist/node/esm/serialization.js +68 -0
- package/package.json +2 -2
- package/types/Client.d.ts +3 -0
- package/types/api/resources/authTokens/client/Client.d.ts +51 -0
- package/types/api/resources/authTokens/client/index.d.ts +1 -0
- package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +21 -0
- package/types/api/resources/authTokens/client/requests/index.d.ts +1 -0
- package/types/api/resources/authTokens/index.d.ts +1 -0
- package/types/api/resources/index.d.ts +2 -0
- package/types/api/types/AuthOperationKind.d.ts +11 -0
- package/types/api/types/AuthTokenCreateResponse.d.ts +8 -0
- package/types/api/types/AuthTokenGrant.d.ts +9 -0
- package/types/api/types/AuthTokenInspectResponse.d.ts +11 -0
- package/types/api/types/AuthTokenResource.d.ts +13 -0
- package/types/api/types/AuthTokenTargetScope.d.ts +5 -0
- package/types/api/types/AuthTokenTargetScopeId.d.ts +7 -0
- package/types/api/types/index.d.ts +7 -0
- package/types/serialization/resources/authTokens/client/index.d.ts +1 -0
- package/types/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +16 -0
- package/types/serialization/resources/authTokens/client/requests/index.d.ts +1 -0
- package/types/serialization/resources/authTokens/index.d.ts +1 -0
- package/types/serialization/resources/index.d.ts +2 -0
- package/types/serialization/types/AuthOperationKind.d.ts +10 -0
- package/types/serialization/types/AuthTokenCreateResponse.d.ts +14 -0
- package/types/serialization/types/AuthTokenGrant.d.ts +17 -0
- package/types/serialization/types/AuthTokenInspectResponse.d.ts +18 -0
- package/types/serialization/types/AuthTokenResource.d.ts +10 -0
- package/types/serialization/types/AuthTokenTargetScope.d.ts +11 -0
- package/types/serialization/types/AuthTokenTargetScopeId.d.ts +13 -0
- package/types/serialization/types/index.d.ts +7 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../core";
|
|
5
|
+
import * as Rivet from "../../../index";
|
|
6
|
+
export declare namespace AuthTokens {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
11
|
+
token: core.Supplier<core.BearerToken>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
13
|
+
}
|
|
14
|
+
interface RequestOptions {
|
|
15
|
+
/** The maximum time to wait for a response in seconds. */
|
|
16
|
+
timeoutInSeconds?: number;
|
|
17
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** A hook to abort the request. */
|
|
20
|
+
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare class AuthTokens {
|
|
26
|
+
protected readonly _options: AuthTokens.Options;
|
|
27
|
+
constructor(_options: AuthTokens.Options);
|
|
28
|
+
/**
|
|
29
|
+
* @param {Rivet.AuthTokenCreateRequest} request
|
|
30
|
+
* @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.authTokens.create({
|
|
34
|
+
* grants: [{
|
|
35
|
+
* operations: ["read"],
|
|
36
|
+
* resource: "namespace",
|
|
37
|
+
* target: "any"
|
|
38
|
+
* }],
|
|
39
|
+
* namespace: "namespace"
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
create(request: Rivet.AuthTokenCreateRequest, requestOptions?: AuthTokens.RequestOptions): Promise<Rivet.AuthTokenCreateResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.authTokens.inspect()
|
|
48
|
+
*/
|
|
49
|
+
inspect(requestOptions?: AuthTokens.RequestOptions): Promise<Rivet.AuthTokenInspectResponse>;
|
|
50
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Rivet from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* grants: [{
|
|
9
|
+
* operations: ["read"],
|
|
10
|
+
* resource: "namespace",
|
|
11
|
+
* target: "any"
|
|
12
|
+
* }],
|
|
13
|
+
* namespace: "namespace"
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export interface AuthTokenCreateRequest {
|
|
17
|
+
duration?: number;
|
|
18
|
+
grants: Rivet.AuthTokenGrant[];
|
|
19
|
+
namespace: string;
|
|
20
|
+
subject?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AuthTokenCreateRequest } from "./AuthTokenCreateRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
export * as authTokens from "./authTokens";
|
|
1
2
|
export * as datacenters from "./datacenters";
|
|
2
3
|
export * as envoys from "./envoys";
|
|
3
4
|
export * as health from "./health";
|
|
4
5
|
export * as metadata from "./metadata";
|
|
5
6
|
export * as namespaces from "./namespaces";
|
|
6
7
|
export * as runners from "./runners";
|
|
8
|
+
export * from "./authTokens/client/requests";
|
|
7
9
|
export * from "./envoys/client/requests";
|
|
8
10
|
export * from "./namespaces/client/requests";
|
|
9
11
|
export * from "./runners/client/requests";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type AuthOperationKind = "read" | "update" | "list" | "create" | "delete";
|
|
5
|
+
export declare const AuthOperationKind: {
|
|
6
|
+
readonly Read: "read";
|
|
7
|
+
readonly Update: "update";
|
|
8
|
+
readonly List: "list";
|
|
9
|
+
readonly Create: "create";
|
|
10
|
+
readonly Delete: "delete";
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Rivet from "../index";
|
|
5
|
+
export interface AuthTokenGrant {
|
|
6
|
+
operations: Rivet.AuthOperationKind[];
|
|
7
|
+
resource: Rivet.AuthTokenResource;
|
|
8
|
+
target: Rivet.AuthTokenTargetScope;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Rivet from "../index";
|
|
5
|
+
export interface AuthTokenInspectResponse {
|
|
6
|
+
expiresTs: number;
|
|
7
|
+
grants: Rivet.AuthTokenGrant[];
|
|
8
|
+
issuedTs: number;
|
|
9
|
+
namespaceId: Rivet.RivetId;
|
|
10
|
+
subject?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type AuthTokenResource = "namespace" | "actor" | "runner" | "runner_config" | "datacenter" | "actor_gateway" | "actor_kv";
|
|
5
|
+
export declare const AuthTokenResource: {
|
|
6
|
+
readonly Namespace: "namespace";
|
|
7
|
+
readonly Actor: "actor";
|
|
8
|
+
readonly Runner: "runner";
|
|
9
|
+
readonly RunnerConfig: "runner_config";
|
|
10
|
+
readonly Datacenter: "datacenter";
|
|
11
|
+
readonly ActorGateway: "actor_gateway";
|
|
12
|
+
readonly ActorKv: "actor_kv";
|
|
13
|
+
};
|
|
@@ -10,6 +10,13 @@ export * from "./ActorsRescheduleRequestBody";
|
|
|
10
10
|
export * from "./ActorsRescheduleResponse";
|
|
11
11
|
export * from "./ActorsSleepRequestBody";
|
|
12
12
|
export * from "./ActorsSleepResponse";
|
|
13
|
+
export * from "./AuthOperationKind";
|
|
14
|
+
export * from "./AuthTokenCreateResponse";
|
|
15
|
+
export * from "./AuthTokenGrant";
|
|
16
|
+
export * from "./AuthTokenInspectResponse";
|
|
17
|
+
export * from "./AuthTokenResource";
|
|
18
|
+
export * from "./AuthTokenTargetScopeId";
|
|
19
|
+
export * from "./AuthTokenTargetScope";
|
|
13
20
|
export * from "./CrashPolicy";
|
|
14
21
|
export * from "./Datacenter";
|
|
15
22
|
export * from "./DatacenterHealth";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../../index";
|
|
5
|
+
import * as Rivet from "../../../../../api/index";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
import { AuthTokenGrant } from "../../../../types/AuthTokenGrant";
|
|
8
|
+
export declare const AuthTokenCreateRequest: core.serialization.Schema<serializers.AuthTokenCreateRequest.Raw, Rivet.AuthTokenCreateRequest>;
|
|
9
|
+
export declare namespace AuthTokenCreateRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
duration?: number | null;
|
|
12
|
+
grants: AuthTokenGrant.Raw[];
|
|
13
|
+
namespace: string;
|
|
14
|
+
subject?: string | null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AuthTokenCreateRequest } from "./AuthTokenCreateRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const AuthOperationKind: core.serialization.Schema<serializers.AuthOperationKind.Raw, Rivet.AuthOperationKind>;
|
|
8
|
+
export declare namespace AuthOperationKind {
|
|
9
|
+
type Raw = "read" | "update" | "list" | "create" | "delete";
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const AuthTokenCreateResponse: core.serialization.ObjectSchema<serializers.AuthTokenCreateResponse.Raw, Rivet.AuthTokenCreateResponse>;
|
|
8
|
+
export declare namespace AuthTokenCreateResponse {
|
|
9
|
+
interface Raw {
|
|
10
|
+
expires_ts: number;
|
|
11
|
+
issued_ts: number;
|
|
12
|
+
token: string;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { AuthOperationKind } from "./AuthOperationKind";
|
|
8
|
+
import { AuthTokenResource } from "./AuthTokenResource";
|
|
9
|
+
import { AuthTokenTargetScope } from "./AuthTokenTargetScope";
|
|
10
|
+
export declare const AuthTokenGrant: core.serialization.ObjectSchema<serializers.AuthTokenGrant.Raw, Rivet.AuthTokenGrant>;
|
|
11
|
+
export declare namespace AuthTokenGrant {
|
|
12
|
+
interface Raw {
|
|
13
|
+
operations: AuthOperationKind.Raw[];
|
|
14
|
+
resource: AuthTokenResource.Raw;
|
|
15
|
+
target: AuthTokenTargetScope.Raw;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { AuthTokenGrant } from "./AuthTokenGrant";
|
|
8
|
+
import { RivetId } from "./RivetId";
|
|
9
|
+
export declare const AuthTokenInspectResponse: core.serialization.ObjectSchema<serializers.AuthTokenInspectResponse.Raw, Rivet.AuthTokenInspectResponse>;
|
|
10
|
+
export declare namespace AuthTokenInspectResponse {
|
|
11
|
+
interface Raw {
|
|
12
|
+
expires_ts: number;
|
|
13
|
+
grants: AuthTokenGrant.Raw[];
|
|
14
|
+
issued_ts: number;
|
|
15
|
+
namespace_id: RivetId.Raw;
|
|
16
|
+
subject?: string | null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const AuthTokenResource: core.serialization.Schema<serializers.AuthTokenResource.Raw, Rivet.AuthTokenResource>;
|
|
8
|
+
export declare namespace AuthTokenResource {
|
|
9
|
+
type Raw = "namespace" | "actor" | "runner" | "runner_config" | "datacenter" | "actor_gateway" | "actor_kv";
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { AuthTokenTargetScopeId } from "./AuthTokenTargetScopeId";
|
|
8
|
+
export declare const AuthTokenTargetScope: core.serialization.Schema<serializers.AuthTokenTargetScope.Raw, Rivet.AuthTokenTargetScope>;
|
|
9
|
+
export declare namespace AuthTokenTargetScope {
|
|
10
|
+
type Raw = "any" | AuthTokenTargetScopeId.Raw;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Rivet from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { RivetId } from "./RivetId";
|
|
8
|
+
export declare const AuthTokenTargetScopeId: core.serialization.ObjectSchema<serializers.AuthTokenTargetScopeId.Raw, Rivet.AuthTokenTargetScopeId>;
|
|
9
|
+
export declare namespace AuthTokenTargetScopeId {
|
|
10
|
+
interface Raw {
|
|
11
|
+
id: RivetId.Raw;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -10,6 +10,13 @@ export * from "./ActorsRescheduleRequestBody";
|
|
|
10
10
|
export * from "./ActorsRescheduleResponse";
|
|
11
11
|
export * from "./ActorsSleepRequestBody";
|
|
12
12
|
export * from "./ActorsSleepResponse";
|
|
13
|
+
export * from "./AuthOperationKind";
|
|
14
|
+
export * from "./AuthTokenCreateResponse";
|
|
15
|
+
export * from "./AuthTokenGrant";
|
|
16
|
+
export * from "./AuthTokenInspectResponse";
|
|
17
|
+
export * from "./AuthTokenResource";
|
|
18
|
+
export * from "./AuthTokenTargetScopeId";
|
|
19
|
+
export * from "./AuthTokenTargetScope";
|
|
13
20
|
export * from "./CrashPolicy";
|
|
14
21
|
export * from "./Datacenter";
|
|
15
22
|
export * from "./DatacenterHealth";
|