@sylphx/contract 0.2.1 → 0.3.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/CHANGELOG.md +6 -0
- package/dist/endpoint.d.ts +6 -0
- package/dist/endpoint.d.ts.map +1 -1
- package/dist/endpoints/admin-projects.d.ts +29 -0
- package/dist/endpoints/admin-projects.d.ts.map +1 -1
- package/dist/endpoints/admin-projects.js +30 -1
- package/dist/endpoints/auth.d.ts +6 -0
- package/dist/endpoints/auth.d.ts.map +1 -1
- package/dist/endpoints/auth.js +12 -1
- package/dist/endpoints/branch-databases.d.ts +27 -28
- package/dist/endpoints/branch-databases.d.ts.map +1 -1
- package/dist/endpoints/branch-databases.js +7 -7
- package/dist/endpoints/databases.d.ts +253 -3
- package/dist/endpoints/databases.d.ts.map +1 -1
- package/dist/endpoints/databases.js +19 -12
- package/dist/endpoints/organizations.d.ts +11 -0
- package/dist/endpoints/organizations.d.ts.map +1 -1
- package/dist/endpoints/organizations.js +8 -1
- package/dist/endpoints/project-manifest.d.ts +26 -18
- package/dist/endpoints/project-manifest.d.ts.map +1 -1
- package/dist/endpoints/secrets.d.ts +6 -6
- package/dist/endpoints/secrets.d.ts.map +1 -1
- package/dist/endpoints/secrets.js +6 -5
- package/dist/index.d.ts +104 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas/admin-projects.d.ts +20 -0
- package/dist/schemas/admin-projects.d.ts.map +1 -1
- package/dist/schemas/admin-projects.js +17 -0
- package/dist/schemas/auth.d.ts +11 -0
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/auth.js +10 -0
- package/dist/schemas/branch-database.d.ts +20 -19
- package/dist/schemas/branch-database.d.ts.map +1 -1
- package/dist/schemas/branch-database.js +9 -7
- package/dist/schemas/ids.d.ts +2 -0
- package/dist/schemas/ids.d.ts.map +1 -1
- package/dist/schemas/ids.js +1 -0
- package/dist/schemas/organization.d.ts +24 -2
- package/dist/schemas/organization.d.ts.map +1 -1
- package/dist/schemas/organization.js +13 -1
- package/dist/schemas/project-manifest.d.ts +43 -21
- package/dist/schemas/project-manifest.d.ts.map +1 -1
- package/dist/schemas/project-manifest.js +11 -3
- package/dist/schemas/secret.d.ts +1 -1
- package/dist/schemas/secret.js +2 -2
- package/dist/schemas/storage.d.ts +0 -5
- package/dist/schemas/storage.d.ts.map +1 -1
- package/dist/schemas/storage.js +0 -4
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sylphx/contract
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`03dbd29`](https://github.com/SylphxAI/platform/commit/03dbd2986024fa650378e10958890d6ac063f516) Thanks [@shtse8](https://github.com/shtse8)! - Add a privacy-preserving public auth resend-verification contract and SDK helper.
|
|
8
|
+
|
|
3
9
|
## 0.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/endpoint.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ export interface Endpoint<Method extends HttpMethod = HttpMethod, Path extends s
|
|
|
46
46
|
* that customers never consume (super-admin platform administration).
|
|
47
47
|
*/
|
|
48
48
|
readonly plane?: 'management' | 'baas' | 'admin';
|
|
49
|
+
/**
|
|
50
|
+
* OpenAPI security requirements. Omit for the default bearerAuth contract;
|
|
51
|
+
* use an empty array for deliberately public endpoints such as sign-in and
|
|
52
|
+
* email verification resend.
|
|
53
|
+
*/
|
|
54
|
+
readonly security?: readonly string[];
|
|
49
55
|
/** LLM-targeted description emitted as `x-agent-hint` (OpenAPI 4 forward-compat). */
|
|
50
56
|
readonly agentHint?: string;
|
|
51
57
|
}
|
package/dist/endpoint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../src/endpoint.ts"],"names":[],"mappings":"AAAA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,EAAE,CAAA;IACrC,qFAAqF;IACrF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAC1B,MAAM,SAAS,UAAU,EACzB,IAAI,SAAS,MAAM,EACnB,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,SAAS,EACrD,KAAK,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,SAAS,EACpD,IAAI,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,SAAS,EACnD,QAAQ,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EAE3C,UAAU,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,KAC7D,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAa,CAAA;AAEpE;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,aAAa,CAAA;CAChD"}
|
|
@@ -112,6 +112,35 @@ export declare const adminProjectsEndpoints: {
|
|
|
112
112
|
secretKey: typeof import("effect/Schema").String;
|
|
113
113
|
publicKey: typeof import("effect/Schema").String;
|
|
114
114
|
}>>;
|
|
115
|
+
readonly rotateEnvironmentCredentials: import("../endpoint.js").Endpoint<"POST", "/operator/projects/environments/:environmentId/credentials/rotate", import("effect/Schema").Struct<{
|
|
116
|
+
environmentId: typeof import("effect/Schema").String;
|
|
117
|
+
}>, import("effect/Schema").Schema.AnyNoContext | undefined, import("effect/Schema").Struct<{
|
|
118
|
+
reason: import("effect/Schema").filter<import("effect/Schema").filter<typeof import("effect/Schema").String>>;
|
|
119
|
+
syncDeploymentSecret: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
120
|
+
}>, import("effect/Schema").Struct<{
|
|
121
|
+
environmentId: typeof import("effect/Schema").String;
|
|
122
|
+
envType: import("effect/Schema").Literal<["development", "staging", "production"]>;
|
|
123
|
+
secretKey: typeof import("effect/Schema").String;
|
|
124
|
+
publicKey: typeof import("effect/Schema").String;
|
|
125
|
+
syncedDeploymentSecret: typeof import("effect/Schema").Boolean;
|
|
126
|
+
queued: typeof import("effect/Schema").Boolean;
|
|
127
|
+
generation: typeof import("effect/Schema").Number;
|
|
128
|
+
}>>;
|
|
129
|
+
readonly rotateEnvironmentCredentialsBySlug: import("../endpoint.js").Endpoint<"POST", "/operator/projects/by-slug/:projectSlug/environments/:environmentName/credentials/rotate", import("effect/Schema").Struct<{
|
|
130
|
+
projectSlug: typeof import("effect/Schema").String;
|
|
131
|
+
environmentName: typeof import("effect/Schema").String;
|
|
132
|
+
}>, import("effect/Schema").Schema.AnyNoContext | undefined, import("effect/Schema").Struct<{
|
|
133
|
+
reason: import("effect/Schema").filter<import("effect/Schema").filter<typeof import("effect/Schema").String>>;
|
|
134
|
+
syncDeploymentSecret: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
135
|
+
}>, import("effect/Schema").Struct<{
|
|
136
|
+
environmentId: typeof import("effect/Schema").String;
|
|
137
|
+
envType: import("effect/Schema").Literal<["development", "staging", "production"]>;
|
|
138
|
+
secretKey: typeof import("effect/Schema").String;
|
|
139
|
+
publicKey: typeof import("effect/Schema").String;
|
|
140
|
+
syncedDeploymentSecret: typeof import("effect/Schema").Boolean;
|
|
141
|
+
queued: typeof import("effect/Schema").Boolean;
|
|
142
|
+
generation: typeof import("effect/Schema").Number;
|
|
143
|
+
}>>;
|
|
115
144
|
readonly platformResources: import("../endpoint.js").Endpoint<"GET", "/operator/projects/:id/platform-resources", import("effect/Schema").Struct<{
|
|
116
145
|
id: typeof import("effect/Schema").String;
|
|
117
146
|
}>, import("effect/Schema").Schema.AnyNoContext | undefined, import("effect/Schema").Schema.AnyNoContext | undefined, import("effect/Schema").Array$<import("effect/Schema").Struct<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-projects.d.ts","sourceRoot":"","sources":["../../src/endpoints/admin-projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"admin-projects.d.ts","sourceRoot":"","sources":["../../src/endpoints/admin-projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGzB,CAAA"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Production mount: `/admin/projects/*`.
|
|
6
6
|
*/
|
|
7
7
|
import { defineEndpoint } from '../endpoint.js';
|
|
8
|
-
import { AdminCreateProjectInput, AdminCreateProjectResult, AdminDeleteProjectResult, AdminEnvironmentIdParams, AdminGetProjectResult, AdminListProjectsQuery, AdminListProjectsResult, AdminPlatformResourcesResult, AdminProjectIdParams, AdminRegenerateSecretKeyResult, AdminUpdateProjectInput, AdminUpdateProjectResult, } from '../schemas/admin-projects.js';
|
|
8
|
+
import { AdminCreateProjectInput, AdminCreateProjectResult, AdminDeleteProjectResult, AdminEnvironmentIdParams, AdminEnvironmentSlugParams, AdminGetProjectResult, AdminListProjectsQuery, AdminListProjectsResult, AdminPlatformResourcesResult, AdminProjectIdParams, AdminRegenerateSecretKeyResult, AdminRotateEnvironmentCredentialsInput, AdminRotateEnvironmentCredentialsResult, AdminUpdateProjectInput, AdminUpdateProjectResult, } from '../schemas/admin-projects.js';
|
|
9
9
|
export const adminProjectsEndpoints = {
|
|
10
10
|
list: defineEndpoint({
|
|
11
11
|
method: 'GET',
|
|
@@ -62,6 +62,35 @@ export const adminProjectsEndpoints = {
|
|
|
62
62
|
summary: 'Regenerate environment secret key (super_admin only)',
|
|
63
63
|
tags: ['admin-projects'],
|
|
64
64
|
}),
|
|
65
|
+
rotateEnvironmentCredentials: defineEndpoint({
|
|
66
|
+
method: 'POST',
|
|
67
|
+
path: '/operator/projects/environments/:environmentId/credentials/rotate',
|
|
68
|
+
params: AdminEnvironmentIdParams,
|
|
69
|
+
body: AdminRotateEnvironmentCredentialsInput,
|
|
70
|
+
response: AdminRotateEnvironmentCredentialsResult,
|
|
71
|
+
plane: 'management',
|
|
72
|
+
summary: 'Rotate environment BaaS credentials and optionally sync deployed app secret',
|
|
73
|
+
description: 'Operator-only credential rotation for an environment. Generates a new ' +
|
|
74
|
+
'`sk_*`/`pk_*` pair, stores only the secret hash on the environment, ' +
|
|
75
|
+
'optionally writes the raw secret once into the environment shared ' +
|
|
76
|
+
'`SYLPHX_SECRET_KEY` app secret, emits audit, and queues reconciliation. ' +
|
|
77
|
+
'Requires a service token carrying `platform:admin` and `platform:secrets:rotate`.',
|
|
78
|
+
tags: ['admin-projects'],
|
|
79
|
+
}),
|
|
80
|
+
rotateEnvironmentCredentialsBySlug: defineEndpoint({
|
|
81
|
+
method: 'POST',
|
|
82
|
+
path: '/operator/projects/by-slug/:projectSlug/environments/:environmentName/credentials/rotate',
|
|
83
|
+
params: AdminEnvironmentSlugParams,
|
|
84
|
+
body: AdminRotateEnvironmentCredentialsInput,
|
|
85
|
+
response: AdminRotateEnvironmentCredentialsResult,
|
|
86
|
+
plane: 'management',
|
|
87
|
+
summary: 'Rotate environment BaaS credentials by project slug and environment name',
|
|
88
|
+
description: 'Operator-only credential rotation for a named environment on a project slug. ' +
|
|
89
|
+
'This is the human/operator selector variant of the TypeID route; it does not ' +
|
|
90
|
+
'accept raw UUIDs. Requires a service token carrying `platform:admin` and ' +
|
|
91
|
+
'`platform:secrets:rotate`.',
|
|
92
|
+
tags: ['admin-projects'],
|
|
93
|
+
}),
|
|
65
94
|
platformResources: defineEndpoint({
|
|
66
95
|
method: 'GET',
|
|
67
96
|
path: '/operator/projects/:id/platform-resources',
|
package/dist/endpoints/auth.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export declare const authEndpoints: {
|
|
|
29
29
|
email: typeof Schema.String;
|
|
30
30
|
emailVerified: typeof Schema.Boolean;
|
|
31
31
|
}>>;
|
|
32
|
+
readonly resendEmailVerification: import("../endpoint.js").Endpoint<"POST", "/auth/resend-verification", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
33
|
+
email: Schema.filter<typeof Schema.String>;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
success: Schema.Literal<[true]>;
|
|
36
|
+
message: typeof Schema.String;
|
|
37
|
+
}>>;
|
|
32
38
|
readonly signOut: import("../endpoint.js").Endpoint<"POST", "/auth/logout", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
33
39
|
success: typeof Schema.Boolean;
|
|
34
40
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/endpoints/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/endpoints/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAsC/B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoNhB,CAAA"}
|
package/dist/endpoints/auth.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Schema } from 'effect';
|
|
11
11
|
import { defineEndpoint } from '../endpoint.js';
|
|
12
|
-
import { AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitRequest, DeviceInitResponse, DevicePollResponse, OAuthIntrospectRequest, OAuthIntrospectResponse, OAuthRevokeRequest, OAuthRevokeResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeResponse, PlatformSessionsListResponse, SessionResult, SignInInput, SignInResult, SignUpInput, SignUpResult, } from '../schemas/auth.js';
|
|
12
|
+
import { AuthUserDeleteRequest, AuthUserDeleteResponse, AuthUserExportResponse, DeviceApproveRequest, DeviceApproveResponse, DeviceDenyRequest, DeviceDenyResponse, DeviceInitRequest, DeviceInitResponse, DevicePollResponse, OAuthIntrospectRequest, OAuthIntrospectResponse, OAuthRevokeRequest, OAuthRevokeResponse, PlatformPasswordChangeRequest, PlatformPasswordChangeResponse, PlatformPasswordSetRequest, PlatformPasswordSetResponse, PlatformPasswordStatusResponse, PlatformSessionRenameRequest, PlatformSessionRenameResponse, PlatformSessionRevokeAllResponse, PlatformSessionRevokeOtherResponse, PlatformSessionRevokeRequest, PlatformSessionRevokeResponse, PlatformSessionsListResponse, ResendEmailVerificationRequest, ResendEmailVerificationResponse, SessionResult, SignInInput, SignInResult, SignUpInput, SignUpResult, } from '../schemas/auth.js';
|
|
13
13
|
export const authEndpoints = {
|
|
14
14
|
signIn: defineEndpoint({
|
|
15
15
|
method: 'POST',
|
|
@@ -18,6 +18,7 @@ export const authEndpoints = {
|
|
|
18
18
|
response: SignInResult,
|
|
19
19
|
summary: 'Sign in with email + password (may return 2FA challenge)',
|
|
20
20
|
tags: ['auth'],
|
|
21
|
+
security: [],
|
|
21
22
|
}),
|
|
22
23
|
signUp: defineEndpoint({
|
|
23
24
|
method: 'POST',
|
|
@@ -26,6 +27,16 @@ export const authEndpoints = {
|
|
|
26
27
|
response: SignUpResult,
|
|
27
28
|
summary: 'Register a new user with email + password',
|
|
28
29
|
tags: ['auth'],
|
|
30
|
+
security: [],
|
|
31
|
+
}),
|
|
32
|
+
resendEmailVerification: defineEndpoint({
|
|
33
|
+
method: 'POST',
|
|
34
|
+
path: '/auth/resend-verification',
|
|
35
|
+
body: ResendEmailVerificationRequest,
|
|
36
|
+
response: ResendEmailVerificationResponse,
|
|
37
|
+
summary: 'Resend a privacy-preserving email verification link',
|
|
38
|
+
tags: ['auth'],
|
|
39
|
+
security: [],
|
|
29
40
|
}),
|
|
30
41
|
signOut: defineEndpoint({
|
|
31
42
|
method: 'POST',
|
|
@@ -8,68 +8,67 @@
|
|
|
8
8
|
* environment. The `:id` params correspond to `projects.id` and
|
|
9
9
|
* `project_environments.id` (the preview env's environment row).
|
|
10
10
|
*
|
|
11
|
-
* See `docs/design/branch-db-per-preview.md` for the full design
|
|
12
|
-
*
|
|
13
|
-
* controller (ops follow-up).
|
|
11
|
+
* See `docs/design/branch-db-per-preview.md` for the full design. The
|
|
12
|
+
* controller owns CNPG provisioning and teardown.
|
|
14
13
|
*/
|
|
15
14
|
import { Schema } from 'effect';
|
|
16
15
|
export declare const branchDatabasesEndpoints: {
|
|
17
16
|
readonly list: import("../endpoint.js").Endpoint<"GET", "/projects/:id/preview-envs/branch-dbs", Schema.Struct<{
|
|
18
|
-
id: typeof Schema.String
|
|
17
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
19
18
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
20
19
|
branches: Schema.Array$<Schema.Struct<{
|
|
21
|
-
id: typeof Schema.String
|
|
22
|
-
projectId: typeof Schema.String
|
|
23
|
-
envId: typeof Schema.String
|
|
24
|
-
sourceDbId: typeof Schema.String
|
|
20
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "BranchDatabaseId">;
|
|
21
|
+
projectId: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
22
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
23
|
+
sourceDbId: Schema.brand<Schema.filter<typeof Schema.String>, "ResourceId">;
|
|
25
24
|
cnpgClusterName: Schema.NullOr<typeof Schema.String>;
|
|
26
25
|
connectionString: Schema.NullOr<typeof Schema.String>;
|
|
27
26
|
dataMode: Schema.Literal<["none", "last-1d", "last-7d", "all"]>;
|
|
28
|
-
status: Schema.Literal<["provisioning", "ready", "destroyed", "degraded"]>;
|
|
27
|
+
status: Schema.Literal<["provisioning", "ready", "destroying", "destroyed", "degraded"]>;
|
|
29
28
|
createdAt: typeof Schema.String;
|
|
30
29
|
destroyedAt: Schema.NullOr<typeof Schema.String>;
|
|
31
30
|
}>>;
|
|
32
31
|
}>>;
|
|
33
32
|
readonly create: import("../endpoint.js").Endpoint<"POST", "/projects/:id/preview-envs/:envId/branch-db", Schema.Struct<{
|
|
34
|
-
id: typeof Schema.String
|
|
35
|
-
envId: typeof Schema.String
|
|
33
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
34
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
36
35
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
37
|
-
previewEnvId: typeof Schema.String
|
|
36
|
+
previewEnvId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
38
37
|
withData: Schema.optional<Schema.Literal<["none", "last-1d", "last-7d", "all"]>>;
|
|
39
38
|
}>, Schema.Struct<{
|
|
40
|
-
id: typeof Schema.String
|
|
41
|
-
projectId: typeof Schema.String
|
|
42
|
-
envId: typeof Schema.String
|
|
43
|
-
sourceDbId: typeof Schema.String
|
|
39
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "BranchDatabaseId">;
|
|
40
|
+
projectId: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
41
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
42
|
+
sourceDbId: Schema.brand<Schema.filter<typeof Schema.String>, "ResourceId">;
|
|
44
43
|
cnpgClusterName: Schema.NullOr<typeof Schema.String>;
|
|
45
44
|
connectionString: Schema.NullOr<typeof Schema.String>;
|
|
46
45
|
dataMode: Schema.Literal<["none", "last-1d", "last-7d", "all"]>;
|
|
47
|
-
status: Schema.Literal<["provisioning", "ready", "destroyed", "degraded"]>;
|
|
46
|
+
status: Schema.Literal<["provisioning", "ready", "destroying", "destroyed", "degraded"]>;
|
|
48
47
|
createdAt: typeof Schema.String;
|
|
49
48
|
destroyedAt: Schema.NullOr<typeof Schema.String>;
|
|
50
49
|
}>>;
|
|
51
50
|
readonly get: import("../endpoint.js").Endpoint<"GET", "/projects/:id/preview-envs/:envId/branch-db", Schema.Struct<{
|
|
52
|
-
id: typeof Schema.String
|
|
53
|
-
envId: typeof Schema.String
|
|
51
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
52
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
54
53
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
55
|
-
id: typeof Schema.String
|
|
56
|
-
projectId: typeof Schema.String
|
|
57
|
-
envId: typeof Schema.String
|
|
58
|
-
sourceDbId: typeof Schema.String
|
|
54
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "BranchDatabaseId">;
|
|
55
|
+
projectId: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
56
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
57
|
+
sourceDbId: Schema.brand<Schema.filter<typeof Schema.String>, "ResourceId">;
|
|
59
58
|
cnpgClusterName: Schema.NullOr<typeof Schema.String>;
|
|
60
59
|
connectionString: Schema.NullOr<typeof Schema.String>;
|
|
61
60
|
dataMode: Schema.Literal<["none", "last-1d", "last-7d", "all"]>;
|
|
62
|
-
status: Schema.Literal<["provisioning", "ready", "destroyed", "degraded"]>;
|
|
61
|
+
status: Schema.Literal<["provisioning", "ready", "destroying", "destroyed", "degraded"]>;
|
|
63
62
|
createdAt: typeof Schema.String;
|
|
64
63
|
destroyedAt: Schema.NullOr<typeof Schema.String>;
|
|
65
64
|
}>>;
|
|
66
65
|
readonly destroy: import("../endpoint.js").Endpoint<"DELETE", "/projects/:id/preview-envs/:envId/branch-db", Schema.Struct<{
|
|
67
|
-
id: typeof Schema.String
|
|
68
|
-
envId: typeof Schema.String
|
|
66
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "ProjectId">;
|
|
67
|
+
envId: Schema.brand<Schema.filter<typeof Schema.String>, "EnvironmentId">;
|
|
69
68
|
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
70
69
|
success: typeof Schema.Boolean;
|
|
71
|
-
branchId: typeof Schema.String
|
|
72
|
-
status: Schema.Literal<["provisioning", "ready", "destroyed", "degraded"]>;
|
|
70
|
+
branchId: Schema.brand<Schema.filter<typeof Schema.String>, "BranchDatabaseId">;
|
|
71
|
+
status: Schema.Literal<["provisioning", "ready", "destroying", "destroyed", "degraded"]>;
|
|
73
72
|
}>>;
|
|
74
73
|
};
|
|
75
74
|
//# sourceMappingURL=branch-databases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-databases.d.ts","sourceRoot":"","sources":["../../src/endpoints/branch-databases.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"branch-databases.d.ts","sourceRoot":"","sources":["../../src/endpoints/branch-databases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAkB/B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC3B,CAAA"}
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
* environment. The `:id` params correspond to `projects.id` and
|
|
9
9
|
* `project_environments.id` (the preview env's environment row).
|
|
10
10
|
*
|
|
11
|
-
* See `docs/design/branch-db-per-preview.md` for the full design
|
|
12
|
-
*
|
|
13
|
-
* controller (ops follow-up).
|
|
11
|
+
* See `docs/design/branch-db-per-preview.md` for the full design. The
|
|
12
|
+
* controller owns CNPG provisioning and teardown.
|
|
14
13
|
*/
|
|
15
14
|
import { Schema } from 'effect';
|
|
16
15
|
import { defineEndpoint } from '../endpoint.js';
|
|
17
16
|
import { BranchDatabase, CreateBranchDatabaseInput, DestroyBranchDatabaseResult, GetBranchDatabaseResult, ListBranchDatabasesResult, } from '../schemas/branch-database.js';
|
|
17
|
+
import { EnvironmentId, ProjectId } from '../schemas/ids.js';
|
|
18
18
|
const ProjectEnvPath = Schema.Struct({
|
|
19
|
-
id:
|
|
20
|
-
envId:
|
|
19
|
+
id: ProjectId,
|
|
20
|
+
envId: EnvironmentId,
|
|
21
21
|
});
|
|
22
|
-
const ProjectIdPath = Schema.Struct({ id:
|
|
22
|
+
const ProjectIdPath = Schema.Struct({ id: ProjectId });
|
|
23
23
|
export const branchDatabasesEndpoints = {
|
|
24
24
|
list: defineEndpoint({
|
|
25
25
|
method: 'GET',
|
|
@@ -55,7 +55,7 @@ export const branchDatabasesEndpoints = {
|
|
|
55
55
|
params: ProjectEnvPath,
|
|
56
56
|
response: DestroyBranchDatabaseResult,
|
|
57
57
|
plane: 'management',
|
|
58
|
-
summary: '
|
|
58
|
+
summary: 'Schedule branch database teardown (controller reclaims PVCs asynchronously)',
|
|
59
59
|
tags: ['branch-databases'],
|
|
60
60
|
}),
|
|
61
61
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Managed resource endpoints — surfaced through the unified `/resources`
|
|
3
|
+
* router. Backups/restore/branch are database-only; bindings apply to every
|
|
4
|
+
* resource kind.
|
|
5
5
|
*/
|
|
6
6
|
import { Schema } from 'effect';
|
|
7
7
|
export declare const databasesEndpoints: {
|
|
@@ -248,4 +248,254 @@ export declare const databasesEndpoints: {
|
|
|
248
248
|
success: typeof Schema.Boolean;
|
|
249
249
|
}>>;
|
|
250
250
|
};
|
|
251
|
+
/**
|
|
252
|
+
* Canonical name for the unified `/resources` contract group.
|
|
253
|
+
*
|
|
254
|
+
* `databasesEndpoints` remains for database-specific callers; new generic
|
|
255
|
+
* resource surfaces should import `resourcesEndpoints`.
|
|
256
|
+
*/
|
|
257
|
+
export declare const resourcesEndpoints: {
|
|
258
|
+
readonly list: import("../endpoint.js").Endpoint<"GET", "/resources", Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
259
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
260
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
261
|
+
data: Schema.Array$<Schema.Struct<{
|
|
262
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "DatabaseId">;
|
|
263
|
+
name: typeof Schema.String;
|
|
264
|
+
slug: Schema.optional<typeof Schema.String>;
|
|
265
|
+
status: typeof Schema.String;
|
|
266
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
267
|
+
tier: typeof Schema.String;
|
|
268
|
+
host: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
269
|
+
directHost: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
270
|
+
port: Schema.optional<typeof Schema.Number>;
|
|
271
|
+
publicPort: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
272
|
+
dbUser: Schema.optional<typeof Schema.String>;
|
|
273
|
+
dbName: Schema.optional<typeof Schema.String>;
|
|
274
|
+
connectionString: Schema.optional<typeof Schema.String>;
|
|
275
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
276
|
+
env: Schema.optional<typeof Schema.String>;
|
|
277
|
+
engine: Schema.optional<typeof Schema.String>;
|
|
278
|
+
instances: Schema.optional<typeof Schema.Number>;
|
|
279
|
+
clusterName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
280
|
+
branchName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
281
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
282
|
+
backupRetentionDays: Schema.optional<typeof Schema.Number>;
|
|
283
|
+
reconcileStatus: Schema.optional<typeof Schema.String>;
|
|
284
|
+
config: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
285
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
286
|
+
updatedAt: Schema.optional<typeof Schema.String>;
|
|
287
|
+
}>>;
|
|
288
|
+
}>>;
|
|
289
|
+
readonly create: import("../endpoint.js").Endpoint<"POST", "/resources", Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
290
|
+
name: typeof Schema.String;
|
|
291
|
+
kind: Schema.Literal<["database", "kv", "blob", "search", "volume"]>;
|
|
292
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
293
|
+
tier: Schema.optional<typeof Schema.String>;
|
|
294
|
+
env: Schema.optional<typeof Schema.String>;
|
|
295
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
296
|
+
maxMemoryMb: Schema.optional<typeof Schema.Number>;
|
|
297
|
+
nodes: Schema.optional<typeof Schema.Number>;
|
|
298
|
+
bucket: Schema.optional<typeof Schema.String>;
|
|
299
|
+
endpoint: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
300
|
+
region: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
301
|
+
accessKeyEncrypted: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
302
|
+
secretKeyEncrypted: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
303
|
+
accessMode: Schema.optional<Schema.Literal<["ReadWriteOnce", "ReadWriteMany"]>>;
|
|
304
|
+
sizeGb: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
305
|
+
mountPath: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
306
|
+
config: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
307
|
+
}>, Schema.Struct<{
|
|
308
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "DatabaseId">;
|
|
309
|
+
name: typeof Schema.String;
|
|
310
|
+
slug: Schema.optional<typeof Schema.String>;
|
|
311
|
+
status: typeof Schema.String;
|
|
312
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
313
|
+
tier: typeof Schema.String;
|
|
314
|
+
host: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
315
|
+
directHost: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
316
|
+
port: Schema.optional<typeof Schema.Number>;
|
|
317
|
+
publicPort: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
318
|
+
dbUser: Schema.optional<typeof Schema.String>;
|
|
319
|
+
dbName: Schema.optional<typeof Schema.String>;
|
|
320
|
+
connectionString: Schema.optional<typeof Schema.String>;
|
|
321
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
322
|
+
env: Schema.optional<typeof Schema.String>;
|
|
323
|
+
engine: Schema.optional<typeof Schema.String>;
|
|
324
|
+
instances: Schema.optional<typeof Schema.Number>;
|
|
325
|
+
clusterName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
326
|
+
branchName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
327
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
328
|
+
backupRetentionDays: Schema.optional<typeof Schema.Number>;
|
|
329
|
+
reconcileStatus: Schema.optional<typeof Schema.String>;
|
|
330
|
+
config: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
331
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
332
|
+
updatedAt: Schema.optional<typeof Schema.String>;
|
|
333
|
+
}>>;
|
|
334
|
+
readonly get: import("../endpoint.js").Endpoint<"GET", "/resources/:id", Schema.Struct<{
|
|
335
|
+
id: typeof Schema.String;
|
|
336
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
337
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "DatabaseId">;
|
|
338
|
+
name: typeof Schema.String;
|
|
339
|
+
slug: Schema.optional<typeof Schema.String>;
|
|
340
|
+
status: typeof Schema.String;
|
|
341
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
342
|
+
tier: typeof Schema.String;
|
|
343
|
+
host: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
344
|
+
directHost: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
345
|
+
port: Schema.optional<typeof Schema.Number>;
|
|
346
|
+
publicPort: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
347
|
+
dbUser: Schema.optional<typeof Schema.String>;
|
|
348
|
+
dbName: Schema.optional<typeof Schema.String>;
|
|
349
|
+
connectionString: Schema.optional<typeof Schema.String>;
|
|
350
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
351
|
+
env: Schema.optional<typeof Schema.String>;
|
|
352
|
+
engine: Schema.optional<typeof Schema.String>;
|
|
353
|
+
instances: Schema.optional<typeof Schema.Number>;
|
|
354
|
+
clusterName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
355
|
+
branchName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
356
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
357
|
+
backupRetentionDays: Schema.optional<typeof Schema.Number>;
|
|
358
|
+
reconcileStatus: Schema.optional<typeof Schema.String>;
|
|
359
|
+
config: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
360
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
361
|
+
updatedAt: Schema.optional<typeof Schema.String>;
|
|
362
|
+
}>>;
|
|
363
|
+
readonly update: import("../endpoint.js").Endpoint<"PATCH", "/resources/:id", Schema.Struct<{
|
|
364
|
+
id: typeof Schema.String;
|
|
365
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, Schema.Struct<{
|
|
366
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "DatabaseId">;
|
|
367
|
+
name: typeof Schema.String;
|
|
368
|
+
slug: Schema.optional<typeof Schema.String>;
|
|
369
|
+
status: typeof Schema.String;
|
|
370
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
371
|
+
tier: typeof Schema.String;
|
|
372
|
+
host: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
373
|
+
directHost: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
374
|
+
port: Schema.optional<typeof Schema.Number>;
|
|
375
|
+
publicPort: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
376
|
+
dbUser: Schema.optional<typeof Schema.String>;
|
|
377
|
+
dbName: Schema.optional<typeof Schema.String>;
|
|
378
|
+
connectionString: Schema.optional<typeof Schema.String>;
|
|
379
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
380
|
+
env: Schema.optional<typeof Schema.String>;
|
|
381
|
+
engine: Schema.optional<typeof Schema.String>;
|
|
382
|
+
instances: Schema.optional<typeof Schema.Number>;
|
|
383
|
+
clusterName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
384
|
+
branchName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
385
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
386
|
+
backupRetentionDays: Schema.optional<typeof Schema.Number>;
|
|
387
|
+
reconcileStatus: Schema.optional<typeof Schema.String>;
|
|
388
|
+
config: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
389
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
390
|
+
updatedAt: Schema.optional<typeof Schema.String>;
|
|
391
|
+
}>>;
|
|
392
|
+
readonly delete: import("../endpoint.js").Endpoint<"DELETE", "/resources/:id", Schema.Struct<{
|
|
393
|
+
id: typeof Schema.String;
|
|
394
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
395
|
+
success: Schema.optional<typeof Schema.Boolean>;
|
|
396
|
+
}>>;
|
|
397
|
+
readonly metrics: import("../endpoint.js").Endpoint<"GET", "/resources/:id/metrics", Schema.Struct<{
|
|
398
|
+
id: typeof Schema.String;
|
|
399
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
400
|
+
readonly backups: import("../endpoint.js").Endpoint<"GET", "/resources/:id/backups", Schema.Struct<{
|
|
401
|
+
id: typeof Schema.String;
|
|
402
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
403
|
+
backups: Schema.Array$<Schema.Struct<{
|
|
404
|
+
name: typeof Schema.String;
|
|
405
|
+
startedAt: Schema.NullOr<typeof Schema.String>;
|
|
406
|
+
completedAt: Schema.NullOr<typeof Schema.String>;
|
|
407
|
+
status: typeof Schema.String;
|
|
408
|
+
method: typeof Schema.String;
|
|
409
|
+
}>>;
|
|
410
|
+
available: typeof Schema.Boolean;
|
|
411
|
+
reason: Schema.optional<typeof Schema.String>;
|
|
412
|
+
}>>;
|
|
413
|
+
readonly restore: import("../endpoint.js").Endpoint<"POST", "/resources/:id/restore", Schema.Struct<{
|
|
414
|
+
id: typeof Schema.String;
|
|
415
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
416
|
+
targetTime: typeof Schema.String;
|
|
417
|
+
}>, Schema.Struct<{
|
|
418
|
+
restored: typeof Schema.Boolean;
|
|
419
|
+
resourceId: Schema.optional<typeof Schema.String>;
|
|
420
|
+
clusterName: Schema.optional<typeof Schema.String>;
|
|
421
|
+
targetTime: Schema.optional<typeof Schema.String>;
|
|
422
|
+
message: Schema.optional<typeof Schema.String>;
|
|
423
|
+
}>>;
|
|
424
|
+
readonly restoreInPlace: import("../endpoint.js").Endpoint<"POST", "/resources/:id/restore-in-place", Schema.Struct<{
|
|
425
|
+
id: typeof Schema.String;
|
|
426
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
427
|
+
targetTime: typeof Schema.String;
|
|
428
|
+
}>, Schema.Struct<{
|
|
429
|
+
restored: typeof Schema.Boolean;
|
|
430
|
+
resourceId: Schema.optional<typeof Schema.String>;
|
|
431
|
+
clusterName: Schema.optional<typeof Schema.String>;
|
|
432
|
+
targetTime: Schema.optional<typeof Schema.String>;
|
|
433
|
+
message: Schema.optional<typeof Schema.String>;
|
|
434
|
+
}>>;
|
|
435
|
+
readonly branch: import("../endpoint.js").Endpoint<"POST", "/resources/:id/branch", Schema.Struct<{
|
|
436
|
+
id: typeof Schema.String;
|
|
437
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
438
|
+
name: Schema.optional<typeof Schema.String>;
|
|
439
|
+
env: Schema.optional<typeof Schema.String>;
|
|
440
|
+
fast: Schema.optional<typeof Schema.Boolean>;
|
|
441
|
+
sourceEnvironmentId: Schema.optional<typeof Schema.String>;
|
|
442
|
+
targetEnvironmentId: Schema.optional<typeof Schema.String>;
|
|
443
|
+
}>, Schema.Struct<{
|
|
444
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "DatabaseId">;
|
|
445
|
+
name: typeof Schema.String;
|
|
446
|
+
slug: Schema.optional<typeof Schema.String>;
|
|
447
|
+
status: typeof Schema.String;
|
|
448
|
+
kind: Schema.optional<typeof Schema.String>;
|
|
449
|
+
tier: typeof Schema.String;
|
|
450
|
+
host: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
451
|
+
directHost: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
452
|
+
port: Schema.optional<typeof Schema.Number>;
|
|
453
|
+
publicPort: Schema.optional<Schema.NullOr<typeof Schema.Number>>;
|
|
454
|
+
dbUser: Schema.optional<typeof Schema.String>;
|
|
455
|
+
dbName: Schema.optional<typeof Schema.String>;
|
|
456
|
+
connectionString: Schema.optional<typeof Schema.String>;
|
|
457
|
+
storageGb: Schema.optional<typeof Schema.Number>;
|
|
458
|
+
env: Schema.optional<typeof Schema.String>;
|
|
459
|
+
engine: Schema.optional<typeof Schema.String>;
|
|
460
|
+
instances: Schema.optional<typeof Schema.Number>;
|
|
461
|
+
clusterName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
462
|
+
branchName: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
463
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
464
|
+
backupRetentionDays: Schema.optional<typeof Schema.Number>;
|
|
465
|
+
reconcileStatus: Schema.optional<typeof Schema.String>;
|
|
466
|
+
config: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
467
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
468
|
+
updatedAt: Schema.optional<typeof Schema.String>;
|
|
469
|
+
}>>;
|
|
470
|
+
readonly listBindings: import("../endpoint.js").Endpoint<"GET", "/resources/:id/bindings", Schema.Struct<{
|
|
471
|
+
id: typeof Schema.String;
|
|
472
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
473
|
+
bindings: Schema.Array$<Schema.Struct<{
|
|
474
|
+
id: typeof Schema.String;
|
|
475
|
+
resourceId: typeof Schema.String;
|
|
476
|
+
projectEnvironmentId: typeof Schema.String;
|
|
477
|
+
role: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
478
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
479
|
+
}>>;
|
|
480
|
+
}>>;
|
|
481
|
+
readonly createBinding: import("../endpoint.js").Endpoint<"POST", "/resources/:id/bindings", Schema.Struct<{
|
|
482
|
+
id: typeof Schema.String;
|
|
483
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
484
|
+
projectEnvironmentId: Schema.optional<typeof Schema.String>;
|
|
485
|
+
environmentId: Schema.optional<typeof Schema.String>;
|
|
486
|
+
role: Schema.optional<typeof Schema.String>;
|
|
487
|
+
}>, Schema.Struct<{
|
|
488
|
+
id: typeof Schema.String;
|
|
489
|
+
resourceId: typeof Schema.String;
|
|
490
|
+
projectEnvironmentId: typeof Schema.String;
|
|
491
|
+
role: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
492
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
493
|
+
}>>;
|
|
494
|
+
readonly deleteBinding: import("../endpoint.js").Endpoint<"DELETE", "/resources/:id/bindings/:bindingId", Schema.Struct<{
|
|
495
|
+
id: typeof Schema.String;
|
|
496
|
+
bindingId: typeof Schema.String;
|
|
497
|
+
}>, Schema.Schema.AnyNoContext | undefined, Schema.Schema.AnyNoContext | undefined, Schema.Struct<{
|
|
498
|
+
success: typeof Schema.Boolean;
|
|
499
|
+
}>>;
|
|
500
|
+
};
|
|
251
501
|
//# sourceMappingURL=databases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"databases.d.ts","sourceRoot":"","sources":["../../src/endpoints/databases.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA8C/B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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