@rivetkit/engine-api-full 2.0.4-rc.1
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/LICENSE +203 -0
- package/dist/browser/cjs/core.js +2338 -0
- package/dist/browser/cjs/index.js +4241 -0
- package/dist/browser/cjs/serialization.js +1953 -0
- package/dist/browser/esm/core.js +2312 -0
- package/dist/browser/esm/index.js +4215 -0
- package/dist/browser/esm/serialization.js +1926 -0
- package/dist/node/cjs/core.js +2353 -0
- package/dist/node/cjs/index.js +4254 -0
- package/dist/node/cjs/serialization.js +2016 -0
- package/dist/node/esm/core.js +2317 -0
- package/dist/node/esm/index.js +4220 -0
- package/dist/node/esm/serialization.js +1927 -0
- package/package.json +67 -0
- package/types/Client.d.ts +250 -0
- package/types/api/client/index.d.ts +1 -0
- package/types/api/client/requests/ActorsCreateRequest.d.ts +22 -0
- package/types/api/client/requests/ActorsDeleteRequest.d.ts +12 -0
- package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +23 -0
- package/types/api/client/requests/ActorsKvGetRequest.d.ts +12 -0
- package/types/api/client/requests/ActorsListNamesRequest.d.ts +14 -0
- package/types/api/client/requests/ActorsListRequest.d.ts +23 -0
- package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +12 -0
- package/types/api/client/requests/RunnerConfigsListRequest.d.ts +21 -0
- package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +17 -0
- package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +15 -0
- package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +17 -0
- package/types/api/client/requests/index.d.ts +11 -0
- package/types/api/index.d.ts +3 -0
- package/types/api/resources/datacenters/client/Client.d.ts +36 -0
- package/types/api/resources/datacenters/client/index.d.ts +1 -0
- package/types/api/resources/datacenters/index.d.ts +1 -0
- package/types/api/resources/health/client/Client.d.ts +36 -0
- package/types/api/resources/health/client/index.d.ts +1 -0
- package/types/api/resources/health/index.d.ts +1 -0
- package/types/api/resources/index.d.ts +7 -0
- package/types/api/resources/metadata/client/Client.d.ts +36 -0
- package/types/api/resources/metadata/client/index.d.ts +1 -0
- package/types/api/resources/metadata/index.d.ts +1 -0
- package/types/api/resources/namespaces/client/Client.d.ts +48 -0
- package/types/api/resources/namespaces/client/index.d.ts +1 -0
- package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +14 -0
- package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +18 -0
- package/types/api/resources/namespaces/client/requests/index.d.ts +2 -0
- package/types/api/resources/namespaces/index.d.ts +1 -0
- package/types/api/resources/runners/client/Client.d.ts +54 -0
- package/types/api/resources/runners/client/index.d.ts +1 -0
- package/types/api/resources/runners/client/requests/RunnersListNamesRequest.d.ts +14 -0
- package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +22 -0
- package/types/api/resources/runners/client/requests/index.d.ts +2 -0
- package/types/api/resources/runners/index.d.ts +1 -0
- package/types/api/types/Actor.d.ts +32 -0
- package/types/api/types/ActorName.d.ts +6 -0
- package/types/api/types/ActorsCreateResponse.d.ts +7 -0
- package/types/api/types/ActorsDeleteResponse.d.ts +4 -0
- package/types/api/types/ActorsGetOrCreateResponse.d.ts +8 -0
- package/types/api/types/ActorsKvGetResponse.d.ts +7 -0
- package/types/api/types/ActorsListNamesResponse.d.ts +8 -0
- package/types/api/types/ActorsListResponse.d.ts +8 -0
- package/types/api/types/CrashPolicy.d.ts +9 -0
- package/types/api/types/Datacenter.d.ts +8 -0
- package/types/api/types/DatacenterHealth.d.ts +12 -0
- package/types/api/types/DatacentersListResponse.d.ts +8 -0
- package/types/api/types/HealthFanoutResponse.d.ts +7 -0
- package/types/api/types/HealthResponse.d.ts +8 -0
- package/types/api/types/HealthStatus.d.ts +8 -0
- package/types/api/types/MetadataGetResponse.d.ts +13 -0
- package/types/api/types/Namespace.d.ts +10 -0
- package/types/api/types/NamespaceListResponse.d.ts +8 -0
- package/types/api/types/NamespacesCreateResponse.d.ts +7 -0
- package/types/api/types/Pagination.d.ts +6 -0
- package/types/api/types/RivetId.d.ts +4 -0
- package/types/api/types/Runner.d.ts +21 -0
- package/types/api/types/RunnerConfig.d.ts +10 -0
- package/types/api/types/RunnerConfigKind.d.ts +5 -0
- package/types/api/types/RunnerConfigKindNormal.d.ts +6 -0
- package/types/api/types/RunnerConfigKindServerless.d.ts +7 -0
- package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +15 -0
- package/types/api/types/RunnerConfigResponse.d.ts +7 -0
- package/types/api/types/RunnerConfigServerless.d.ts +15 -0
- package/types/api/types/RunnerConfigVariant.d.ts +8 -0
- package/types/api/types/RunnerConfigsDeleteResponse.d.ts +4 -0
- package/types/api/types/RunnerConfigsListResponse.d.ts +8 -0
- package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +7 -0
- package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +4 -0
- package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +4 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +5 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +6 -0
- package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +5 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorInvalidRequest.d.ts +6 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorInvalidResponseJson.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorInvalidResponseJsonInvalidResponseJson.d.ts +6 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorInvalidResponseSchema.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorInvalidResponseSchemaInvalidResponseSchema.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorNonSuccessStatus.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorNonSuccessStatusNonSuccessStatus.d.ts +7 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorRequestFailed.d.ts +6 -0
- package/types/api/types/RunnerConfigsServerlessMetadataErrorRequestTimedOut.d.ts +6 -0
- package/types/api/types/RunnerConfigsUpsertResponse.d.ts +6 -0
- package/types/api/types/RunnersListNamesResponse.d.ts +8 -0
- package/types/api/types/RunnersListResponse.d.ts +8 -0
- package/types/api/types/index.d.ts +53 -0
- package/types/core/auth/BasicAuth.d.ts +8 -0
- package/types/core/auth/BearerToken.d.ts +5 -0
- package/types/core/auth/index.d.ts +2 -0
- package/types/core/fetcher/APIResponse.d.ts +10 -0
- package/types/core/fetcher/Fetcher.d.ts +39 -0
- package/types/core/fetcher/Supplier.d.ts +4 -0
- package/types/core/fetcher/createRequestUrl.d.ts +1 -0
- package/types/core/fetcher/getFetchFn.d.ts +4 -0
- package/types/core/fetcher/getHeader.d.ts +1 -0
- package/types/core/fetcher/getRequestBody.d.ts +7 -0
- package/types/core/fetcher/getResponseBody.d.ts +1 -0
- package/types/core/fetcher/index.d.ts +5 -0
- package/types/core/fetcher/makeRequest.d.ts +1 -0
- package/types/core/fetcher/requestWithRetries.d.ts +1 -0
- package/types/core/fetcher/signals.d.ts +11 -0
- package/types/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/types/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/types/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/types/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/types/core/index.d.ts +4 -0
- package/types/core/json.d.ts +15 -0
- package/types/core/runtime/index.d.ts +1 -0
- package/types/core/runtime/runtime.d.ts +9 -0
- package/types/core/schemas/Schema.d.ts +87 -0
- package/types/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/types/core/schemas/builders/bigint/index.d.ts +1 -0
- package/types/core/schemas/builders/date/date.d.ts +2 -0
- package/types/core/schemas/builders/date/index.d.ts +1 -0
- package/types/core/schemas/builders/enum/enum.d.ts +2 -0
- package/types/core/schemas/builders/enum/index.d.ts +1 -0
- package/types/core/schemas/builders/index.d.ts +14 -0
- package/types/core/schemas/builders/lazy/index.d.ts +3 -0
- package/types/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/types/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/types/core/schemas/builders/list/index.d.ts +1 -0
- package/types/core/schemas/builders/list/list.d.ts +2 -0
- package/types/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/types/core/schemas/builders/literals/index.d.ts +2 -0
- package/types/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/types/core/schemas/builders/object/index.d.ts +6 -0
- package/types/core/schemas/builders/object/object.d.ts +3 -0
- package/types/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/types/core/schemas/builders/object/property.d.ts +8 -0
- package/types/core/schemas/builders/object/types.d.ts +31 -0
- package/types/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/types/core/schemas/builders/object-like/index.d.ts +2 -0
- package/types/core/schemas/builders/object-like/types.d.ts +7 -0
- package/types/core/schemas/builders/primitives/any.d.ts +1 -0
- package/types/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/types/core/schemas/builders/primitives/index.d.ts +5 -0
- package/types/core/schemas/builders/primitives/number.d.ts +1 -0
- package/types/core/schemas/builders/primitives/string.d.ts +1 -0
- package/types/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/types/core/schemas/builders/record/index.d.ts +2 -0
- package/types/core/schemas/builders/record/record.d.ts +3 -0
- package/types/core/schemas/builders/record/types.d.ts +4 -0
- package/types/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/types/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +21 -0
- package/types/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/types/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/types/core/schemas/builders/set/index.d.ts +1 -0
- package/types/core/schemas/builders/set/set.d.ts +2 -0
- package/types/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/types/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/types/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/types/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/types/core/schemas/builders/union/index.d.ts +4 -0
- package/types/core/schemas/builders/union/types.d.ts +13 -0
- package/types/core/schemas/builders/union/union.d.ts +4 -0
- package/types/core/schemas/index.d.ts +2 -0
- package/types/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/types/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/types/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/types/core/schemas/utils/entries.d.ts +1 -0
- package/types/core/schemas/utils/filterObject.d.ts +1 -0
- package/types/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/types/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/types/core/schemas/utils/keys.d.ts +1 -0
- package/types/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/types/core/schemas/utils/partition.d.ts +1 -0
- package/types/errors/RivetError.d.ts +12 -0
- package/types/errors/RivetTimeoutError.d.ts +6 -0
- package/types/errors/index.d.ts +2 -0
- package/types/index.d.ts +4 -0
- package/types/serialization/client/index.d.ts +1 -0
- package/types/serialization/client/requests/ActorsCreateRequest.d.ts +18 -0
- package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +18 -0
- package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +13 -0
- package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +13 -0
- package/types/serialization/client/requests/index.d.ts +4 -0
- package/types/serialization/index.d.ts +3 -0
- package/types/serialization/resources/index.d.ts +2 -0
- package/types/serialization/resources/namespaces/client/index.d.ts +1 -0
- package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +13 -0
- package/types/serialization/resources/namespaces/client/requests/index.d.ts +1 -0
- package/types/serialization/resources/namespaces/index.d.ts +1 -0
- package/types/serialization/types/Actor.d.ts +28 -0
- package/types/serialization/types/ActorName.d.ts +12 -0
- package/types/serialization/types/ActorsCreateResponse.d.ts +13 -0
- package/types/serialization/types/ActorsDeleteResponse.d.ts +10 -0
- package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +14 -0
- package/types/serialization/types/ActorsKvGetResponse.d.ts +13 -0
- package/types/serialization/types/ActorsListNamesResponse.d.ts +15 -0
- package/types/serialization/types/ActorsListResponse.d.ts +15 -0
- package/types/serialization/types/CrashPolicy.d.ts +10 -0
- package/types/serialization/types/Datacenter.d.ts +14 -0
- package/types/serialization/types/DatacenterHealth.d.ts +19 -0
- package/types/serialization/types/DatacentersListResponse.d.ts +15 -0
- package/types/serialization/types/HealthFanoutResponse.d.ts +13 -0
- package/types/serialization/types/HealthResponse.d.ts +14 -0
- package/types/serialization/types/HealthStatus.d.ts +10 -0
- package/types/serialization/types/MetadataGetResponse.d.ts +19 -0
- package/types/serialization/types/Namespace.d.ts +16 -0
- package/types/serialization/types/NamespaceListResponse.d.ts +15 -0
- package/types/serialization/types/NamespacesCreateResponse.d.ts +13 -0
- package/types/serialization/types/Pagination.d.ts +12 -0
- package/types/serialization/types/RivetId.d.ts +10 -0
- package/types/serialization/types/Runner.d.ts +27 -0
- package/types/serialization/types/RunnerConfig.d.ts +16 -0
- package/types/serialization/types/RunnerConfigKind.d.ts +12 -0
- package/types/serialization/types/RunnerConfigKindNormal.d.ts +12 -0
- package/types/serialization/types/RunnerConfigKindServerless.d.ts +13 -0
- package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +19 -0
- package/types/serialization/types/RunnerConfigResponse.d.ts +13 -0
- package/types/serialization/types/RunnerConfigServerless.d.ts +19 -0
- package/types/serialization/types/RunnerConfigVariant.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsListResponse.d.ts +15 -0
- package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +10 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +16 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorInvalidRequest.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorInvalidResponseJson.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorInvalidResponseJsonInvalidResponseJson.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorInvalidResponseSchema.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorInvalidResponseSchemaInvalidResponseSchema.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorNonSuccessStatus.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorNonSuccessStatusNonSuccessStatus.d.ts +13 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorRequestFailed.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsServerlessMetadataErrorRequestTimedOut.d.ts +12 -0
- package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +12 -0
- package/types/serialization/types/RunnersListNamesResponse.d.ts +14 -0
- package/types/serialization/types/RunnersListResponse.d.ts +15 -0
- package/types/serialization/types/index.d.ts +53 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseSchema, Schema, inferParsed, inferRaw } from "../../Schema";
|
|
2
|
+
import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties";
|
|
3
|
+
import { ObjectLikeUtils } from "../object-like";
|
|
4
|
+
import { SchemaUtils } from "../schema-utils";
|
|
5
|
+
import { Property } from "./property";
|
|
6
|
+
export type ObjectSchema<Raw, Parsed> = BaseObjectSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed> & ObjectUtils<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
|
|
7
|
+
export interface BaseObjectSchema<Raw, Parsed> extends BaseSchema<Raw, Parsed> {
|
|
8
|
+
_getRawProperties: () => (keyof Raw)[];
|
|
9
|
+
_getParsedProperties: () => (keyof Parsed)[];
|
|
10
|
+
}
|
|
11
|
+
export interface ObjectUtils<Raw, Parsed> {
|
|
12
|
+
extend: <RawExtension, ParsedExtension>(schemas: ObjectSchema<RawExtension, ParsedExtension>) => ObjectSchema<Raw & RawExtension, Parsed & ParsedExtension>;
|
|
13
|
+
passthrough: () => ObjectSchema<Raw & {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}, Parsed & {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export type inferRawObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<infer Raw, any> ? Raw : never;
|
|
20
|
+
export type inferParsedObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<any, infer Parsed> ? Parsed : never;
|
|
21
|
+
export type inferObjectSchemaFromPropertySchemas<T extends PropertySchemas<keyof T>> = ObjectSchema<inferRawObjectFromPropertySchemas<T>, inferParsedObjectFromPropertySchemas<T>>;
|
|
22
|
+
export type inferRawObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
|
|
23
|
+
[ParsedKey in keyof T as inferRawKey<ParsedKey, T[ParsedKey]>]: inferRawPropertySchema<T[ParsedKey]>;
|
|
24
|
+
}>;
|
|
25
|
+
export type inferParsedObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
|
|
26
|
+
[K in keyof T]: inferParsedPropertySchema<T[K]>;
|
|
27
|
+
}>;
|
|
28
|
+
export type PropertySchemas<ParsedKeys extends string | number | symbol> = Record<ParsedKeys, Property<any, any, any> | Schema<any, any>>;
|
|
29
|
+
export type inferRawPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, infer Raw, any> ? Raw : P extends Schema<any, any> ? inferRaw<P> : never;
|
|
30
|
+
export type inferParsedPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, any, infer Parsed> ? Parsed : P extends Schema<any, any> ? inferParsed<P> : never;
|
|
31
|
+
export type inferRawKey<ParsedKey extends string | number | symbol, P extends Property<any, any, any> | Schema<any, any>> = P extends Property<infer Raw, any, any> ? Raw : ParsedKey;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseSchema } from "../../Schema";
|
|
2
|
+
import { ObjectLikeSchema, ObjectLikeUtils } from "./types";
|
|
3
|
+
export declare function getObjectLikeUtils<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): ObjectLikeUtils<Raw, Parsed>;
|
|
4
|
+
/**
|
|
5
|
+
* object-like utils are defined in one file to resolve issues with circular imports
|
|
6
|
+
*/
|
|
7
|
+
export declare function withParsedProperties<RawObjectShape, ParsedObjectShape, Properties>(objectLike: BaseSchema<RawObjectShape, ParsedObjectShape>, properties: {
|
|
8
|
+
[K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]);
|
|
9
|
+
}): ObjectLikeSchema<RawObjectShape, ParsedObjectShape & Properties>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseSchema, Schema } from "../../Schema";
|
|
2
|
+
export type ObjectLikeSchema<Raw, Parsed> = Schema<Raw, Parsed> & BaseSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed>;
|
|
3
|
+
export interface ObjectLikeUtils<Raw, Parsed> {
|
|
4
|
+
withParsedProperties: <T extends Record<string, any>>(properties: {
|
|
5
|
+
[K in keyof T]: T[K] | ((parsed: Parsed) => T[K]);
|
|
6
|
+
}) => ObjectLikeSchema<Raw, Parsed & T>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const any: () => import("../../Schema").Schema<any, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const boolean: () => import("../../Schema").Schema<boolean, boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const number: () => import("../../Schema").Schema<number, number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const string: () => import("../../Schema").Schema<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const unknown: () => import("../../Schema").Schema<unknown, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Schema } from "../../Schema";
|
|
2
|
+
import { RecordSchema } from "./types";
|
|
3
|
+
export declare function record<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): RecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BaseSchema } from "../../Schema";
|
|
2
|
+
import { SchemaUtils } from "../schema-utils";
|
|
3
|
+
export type RecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
4
|
+
export type BaseRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseSchema, Schema, SchemaOptions } from "../../Schema";
|
|
2
|
+
export interface SchemaUtils<Raw, Parsed> {
|
|
3
|
+
nullable: () => Schema<Raw | null, Parsed | null>;
|
|
4
|
+
optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
|
|
5
|
+
optionalNullable: () => Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
6
|
+
transform: <Transformed>(transformer: SchemaTransformer<Parsed, Transformed>) => Schema<Raw, Transformed>;
|
|
7
|
+
parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed;
|
|
8
|
+
jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw;
|
|
9
|
+
}
|
|
10
|
+
export interface SchemaTransformer<Parsed, Transformed> {
|
|
11
|
+
transform: (parsed: Parsed) => Transformed;
|
|
12
|
+
untransform: (transformed: any) => Parsed;
|
|
13
|
+
}
|
|
14
|
+
export declare function getSchemaUtils<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): SchemaUtils<Raw, Parsed>;
|
|
15
|
+
/**
|
|
16
|
+
* schema utils are defined in one file to resolve issues with circular imports
|
|
17
|
+
*/
|
|
18
|
+
export declare function nullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null, Parsed | null>;
|
|
19
|
+
export declare function optional<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | undefined>;
|
|
20
|
+
export declare function optionalNullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
21
|
+
export declare function transform<Raw, Parsed, Transformed>(schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>): Schema<Raw, Transformed>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { set } from "./set";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Schema, inferParsed, inferRaw } from "../../Schema";
|
|
2
|
+
export type UndiscriminatedUnionSchema<Schemas extends [...Schema[]]> = Schema<inferRawUnidiscriminatedUnionSchema<Schemas>, inferParsedUnidiscriminatedUnionSchema<Schemas>>;
|
|
3
|
+
export type inferRawUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferRaw<Schemas[number]>;
|
|
4
|
+
export type inferParsedUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferParsed<Schemas[number]>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Schema } from "../../Schema";
|
|
2
|
+
import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types";
|
|
3
|
+
export declare function undiscriminatedUnion<Schemas extends [Schema<any, any>, ...Schema<any, any>[]]>(schemas: Schemas): Schema<inferRawUnidiscriminatedUnionSchema<Schemas>, inferParsedUnidiscriminatedUnionSchema<Schemas>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function discriminant<RawDiscriminant extends string, ParsedDiscriminant extends string>(parsedDiscriminant: ParsedDiscriminant, rawDiscriminant: RawDiscriminant): Discriminant<RawDiscriminant, ParsedDiscriminant>;
|
|
2
|
+
export interface Discriminant<RawDiscriminant extends string, ParsedDiscriminant extends string> {
|
|
3
|
+
parsedDiscriminant: ParsedDiscriminant;
|
|
4
|
+
rawDiscriminant: RawDiscriminant;
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ObjectSchema, inferParsedObject, inferRawObject } from "../object";
|
|
2
|
+
import { Discriminant } from "./discriminant";
|
|
3
|
+
export type UnionSubtypes<DiscriminantValues extends string | number | symbol> = {
|
|
4
|
+
[K in DiscriminantValues]: ObjectSchema<any, any>;
|
|
5
|
+
};
|
|
6
|
+
export type inferRawUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
|
|
7
|
+
[K in keyof U]: Record<inferRawDiscriminant<D>, K> & inferRawObject<U[K]>;
|
|
8
|
+
}[keyof U];
|
|
9
|
+
export type inferParsedUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
|
|
10
|
+
[K in keyof U]: Record<inferParsedDiscriminant<D>, K> & inferParsedObject<U[K]>;
|
|
11
|
+
}[keyof U];
|
|
12
|
+
export type inferRawDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<infer Raw, any> ? Raw : never;
|
|
13
|
+
export type inferParsedDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<any, infer Parsed> ? Parsed : never;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ObjectLikeSchema } from "../object-like";
|
|
2
|
+
import { Discriminant } from "./discriminant";
|
|
3
|
+
import { UnionSubtypes, inferParsedUnion, inferRawUnion } from "./types";
|
|
4
|
+
export declare function union<D extends string | Discriminant<any, any>, U extends UnionSubtypes<any>>(discriminant: D, union: U): ObjectLikeSchema<inferRawUnion<D, U>, inferParsedUnion<D, U>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type addQuestionMarksToNullableProperties<T> = {
|
|
2
|
+
[K in OptionalKeys<T>]?: T[K];
|
|
3
|
+
} & Pick<T, RequiredKeys<T>>;
|
|
4
|
+
export type OptionalKeys<T> = {
|
|
5
|
+
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
6
|
+
}[keyof T];
|
|
7
|
+
export type RequiredKeys<T> = Exclude<keyof T, OptionalKeys<T>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function entries<T extends object>(object: T): [keyof T, T[keyof T]][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function filterObject<T extends object, K extends keyof T>(obj: T, keysToInclude: K[]): Pick<T, K>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorMessageForIncorrectType(value: unknown, expectedType: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function keys<T extends object>(object: T): (keyof T)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function partition<T>(items: readonly T[], predicate: (item: T) => boolean): [T[], T[]];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare class RivetError extends Error {
|
|
5
|
+
readonly statusCode?: number;
|
|
6
|
+
readonly body?: unknown;
|
|
7
|
+
constructor({ message, statusCode, body }: {
|
|
8
|
+
message?: string;
|
|
9
|
+
statusCode?: number;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -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 { CrashPolicy } from "../../types/CrashPolicy";
|
|
8
|
+
export declare const ActorsCreateRequest: core.serialization.Schema<serializers.ActorsCreateRequest.Raw, Omit<Rivet.ActorsCreateRequest, "namespace">>;
|
|
9
|
+
export declare namespace ActorsCreateRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
crash_policy: CrashPolicy.Raw;
|
|
12
|
+
datacenter?: string | null;
|
|
13
|
+
input?: string | null;
|
|
14
|
+
key?: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
runner_name_selector: string;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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 { CrashPolicy } from "../../types/CrashPolicy";
|
|
8
|
+
export declare const ActorsGetOrCreateRequest: core.serialization.Schema<serializers.ActorsGetOrCreateRequest.Raw, Omit<Rivet.ActorsGetOrCreateRequest, "namespace">>;
|
|
9
|
+
export declare namespace ActorsGetOrCreateRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
crash_policy: CrashPolicy.Raw;
|
|
12
|
+
datacenter?: string | null;
|
|
13
|
+
input?: string | null;
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
runner_name_selector: string;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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
|
+
export declare const RunnerConfigsServerlessHealthCheckRequest: core.serialization.Schema<serializers.RunnerConfigsServerlessHealthCheckRequest.Raw, Omit<Rivet.RunnerConfigsServerlessHealthCheckRequest, "namespace">>;
|
|
8
|
+
export declare namespace RunnerConfigsServerlessHealthCheckRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
headers?: Record<string, string> | null;
|
|
11
|
+
url: string;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -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 { RunnerConfig } from "../../types/RunnerConfig";
|
|
8
|
+
export declare const RunnerConfigsUpsertRequestBody: core.serialization.Schema<serializers.RunnerConfigsUpsertRequestBody.Raw, Omit<Rivet.RunnerConfigsUpsertRequestBody, "namespace">>;
|
|
9
|
+
export declare namespace RunnerConfigsUpsertRequestBody {
|
|
10
|
+
interface Raw {
|
|
11
|
+
datacenters: Record<string, RunnerConfig.Raw>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ActorsCreateRequest } from "./ActorsCreateRequest";
|
|
2
|
+
export { ActorsGetOrCreateRequest } from "./ActorsGetOrCreateRequest";
|
|
3
|
+
export { RunnerConfigsServerlessHealthCheckRequest } from "./RunnerConfigsServerlessHealthCheckRequest";
|
|
4
|
+
export { RunnerConfigsUpsertRequestBody } from "./RunnerConfigsUpsertRequestBody";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -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
|
+
export declare const NamespacesCreateRequest: core.serialization.Schema<serializers.NamespacesCreateRequest.Raw, Rivet.NamespacesCreateRequest>;
|
|
8
|
+
export declare namespace NamespacesCreateRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
display_name: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NamespacesCreateRequest } from "./NamespacesCreateRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { CrashPolicy } from "./CrashPolicy";
|
|
9
|
+
export declare const Actor: core.serialization.ObjectSchema<serializers.Actor.Raw, Rivet.Actor>;
|
|
10
|
+
export declare namespace Actor {
|
|
11
|
+
interface Raw {
|
|
12
|
+
actor_id: RivetId.Raw;
|
|
13
|
+
connectable_ts?: number | null;
|
|
14
|
+
crash_policy: CrashPolicy.Raw;
|
|
15
|
+
create_ts: number;
|
|
16
|
+
datacenter: string;
|
|
17
|
+
destroy_ts?: number | null;
|
|
18
|
+
error?: Record<string, unknown> | null;
|
|
19
|
+
key?: string | null;
|
|
20
|
+
name: string;
|
|
21
|
+
namespace_id: RivetId.Raw;
|
|
22
|
+
pending_allocation_ts?: number | null;
|
|
23
|
+
reschedule_ts?: number | null;
|
|
24
|
+
runner_name_selector: string;
|
|
25
|
+
sleep_ts?: number | null;
|
|
26
|
+
start_ts?: number | null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 ActorName: core.serialization.ObjectSchema<serializers.ActorName.Raw, Rivet.ActorName>;
|
|
8
|
+
export declare namespace ActorName {
|
|
9
|
+
interface Raw {
|
|
10
|
+
metadata: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -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 { Actor } from "./Actor";
|
|
8
|
+
export declare const ActorsCreateResponse: core.serialization.ObjectSchema<serializers.ActorsCreateResponse.Raw, Rivet.ActorsCreateResponse>;
|
|
9
|
+
export declare namespace ActorsCreateResponse {
|
|
10
|
+
interface Raw {
|
|
11
|
+
actor: Actor.Raw;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -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 ActorsDeleteResponse: core.serialization.Schema<serializers.ActorsDeleteResponse.Raw, Rivet.ActorsDeleteResponse>;
|
|
8
|
+
export declare namespace ActorsDeleteResponse {
|
|
9
|
+
type Raw = Record<string, unknown>;
|
|
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
|
+
import { Actor } from "./Actor";
|
|
8
|
+
export declare const ActorsGetOrCreateResponse: core.serialization.ObjectSchema<serializers.ActorsGetOrCreateResponse.Raw, Rivet.ActorsGetOrCreateResponse>;
|
|
9
|
+
export declare namespace ActorsGetOrCreateResponse {
|
|
10
|
+
interface Raw {
|
|
11
|
+
actor: Actor.Raw;
|
|
12
|
+
created: boolean;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -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
|
+
export declare const ActorsKvGetResponse: core.serialization.ObjectSchema<serializers.ActorsKvGetResponse.Raw, Rivet.ActorsKvGetResponse>;
|
|
8
|
+
export declare namespace ActorsKvGetResponse {
|
|
9
|
+
interface Raw {
|
|
10
|
+
update_ts: number;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { ActorName } from "./ActorName";
|
|
8
|
+
import { Pagination } from "./Pagination";
|
|
9
|
+
export declare const ActorsListNamesResponse: core.serialization.ObjectSchema<serializers.ActorsListNamesResponse.Raw, Rivet.ActorsListNamesResponse>;
|
|
10
|
+
export declare namespace ActorsListNamesResponse {
|
|
11
|
+
interface Raw {
|
|
12
|
+
names: Record<string, ActorName.Raw>;
|
|
13
|
+
pagination: Pagination.Raw;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { Actor } from "./Actor";
|
|
8
|
+
import { Pagination } from "./Pagination";
|
|
9
|
+
export declare const ActorsListResponse: core.serialization.ObjectSchema<serializers.ActorsListResponse.Raw, Rivet.ActorsListResponse>;
|
|
10
|
+
export declare namespace ActorsListResponse {
|
|
11
|
+
interface Raw {
|
|
12
|
+
actors: Actor.Raw[];
|
|
13
|
+
pagination: Pagination.Raw;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -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 CrashPolicy: core.serialization.Schema<serializers.CrashPolicy.Raw, Rivet.CrashPolicy>;
|
|
8
|
+
export declare namespace CrashPolicy {
|
|
9
|
+
type Raw = "restart" | "sleep" | "destroy";
|
|
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 Datacenter: core.serialization.ObjectSchema<serializers.Datacenter.Raw, Rivet.Datacenter>;
|
|
8
|
+
export declare namespace Datacenter {
|
|
9
|
+
interface Raw {
|
|
10
|
+
label: number;
|
|
11
|
+
name: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { HealthResponse } from "./HealthResponse";
|
|
8
|
+
import { HealthStatus } from "./HealthStatus";
|
|
9
|
+
export declare const DatacenterHealth: core.serialization.ObjectSchema<serializers.DatacenterHealth.Raw, Rivet.DatacenterHealth>;
|
|
10
|
+
export declare namespace DatacenterHealth {
|
|
11
|
+
interface Raw {
|
|
12
|
+
datacenter_label: number;
|
|
13
|
+
datacenter_name: string;
|
|
14
|
+
error?: string | null;
|
|
15
|
+
response?: HealthResponse.Raw | null;
|
|
16
|
+
rtt_ms?: number | null;
|
|
17
|
+
status: HealthStatus.Raw;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { Datacenter } from "./Datacenter";
|
|
8
|
+
import { Pagination } from "./Pagination";
|
|
9
|
+
export declare const DatacentersListResponse: core.serialization.ObjectSchema<serializers.DatacentersListResponse.Raw, Rivet.DatacentersListResponse>;
|
|
10
|
+
export declare namespace DatacentersListResponse {
|
|
11
|
+
interface Raw {
|
|
12
|
+
datacenters: Datacenter.Raw[];
|
|
13
|
+
pagination: Pagination.Raw;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -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 { DatacenterHealth } from "./DatacenterHealth";
|
|
8
|
+
export declare const HealthFanoutResponse: core.serialization.ObjectSchema<serializers.HealthFanoutResponse.Raw, Rivet.HealthFanoutResponse>;
|
|
9
|
+
export declare namespace HealthFanoutResponse {
|
|
10
|
+
interface Raw {
|
|
11
|
+
datacenters: DatacenterHealth.Raw[];
|
|
12
|
+
}
|
|
13
|
+
}
|