@ninedeploy/schemas 0.10.6 → 0.16.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 +21 -21
- package/dist/accessGrants.d.ts +156 -0
- package/dist/accessGrants.d.ts.map +1 -0
- package/dist/accessGrants.js +100 -0
- package/dist/accessGrants.js.map +1 -0
- package/dist/agentCommand.d.ts.map +1 -1
- package/dist/agentCommand.js +11 -1
- package/dist/agentCommand.js.map +1 -1
- package/dist/auth.d.ts +53 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +26 -0
- package/dist/auth.js.map +1 -1
- package/dist/backupPolicy.d.ts +37 -0
- package/dist/backupPolicy.d.ts.map +1 -0
- package/dist/backupPolicy.js +50 -0
- package/dist/backupPolicy.js.map +1 -0
- package/dist/common.d.ts +21 -5
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +35 -6
- package/dist/common.js.map +1 -1
- package/dist/databaseImport.d.ts +145 -0
- package/dist/databaseImport.d.ts.map +1 -0
- package/dist/databaseImport.js +115 -0
- package/dist/databaseImport.js.map +1 -0
- package/dist/doctor.d.ts +16 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +25 -0
- package/dist/doctor.js.map +1 -1
- package/dist/githubApp.d.ts +236 -0
- package/dist/githubApp.d.ts.map +1 -0
- package/dist/githubApp.js +223 -0
- package/dist/githubApp.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +5 -2
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +11 -2
- package/dist/kernel.js.map +1 -1
- package/dist/management.d.ts +46 -2
- package/dist/management.d.ts.map +1 -1
- package/dist/management.js +68 -15
- package/dist/management.js.map +1 -1
- package/dist/multiNode.d.ts +326 -0
- package/dist/multiNode.d.ts.map +1 -0
- package/dist/multiNode.js +296 -0
- package/dist/multiNode.js.map +1 -0
- package/dist/ninedeployManifest.d.ts.map +1 -1
- package/dist/ninedeployManifest.js +6 -3
- package/dist/ninedeployManifest.js.map +1 -1
- package/dist/panelBackup.d.ts +73 -0
- package/dist/panelBackup.d.ts.map +1 -0
- package/dist/panelBackup.js +45 -0
- package/dist/panelBackup.js.map +1 -0
- package/dist/proxyConfig.d.ts +132 -0
- package/dist/proxyConfig.d.ts.map +1 -0
- package/dist/proxyConfig.js +105 -0
- package/dist/proxyConfig.js.map +1 -0
- package/dist/publicAccess.d.ts +64 -0
- package/dist/publicAccess.d.ts.map +1 -0
- package/dist/publicAccess.js +63 -0
- package/dist/publicAccess.js.map +1 -0
- package/dist/secretProviders.d.ts +119 -0
- package/dist/secretProviders.d.ts.map +1 -0
- package/dist/secretProviders.js +130 -0
- package/dist/secretProviders.js.map +1 -0
- package/dist/secretScan.js +1 -1
- package/dist/service.d.ts +235 -17
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +331 -26
- package/dist/service.js.map +1 -1
- package/dist/terminals.d.ts +284 -0
- package/dist/terminals.d.ts.map +1 -0
- package/dist/terminals.js +177 -0
- package/dist/terminals.js.map +1 -0
- package/dist/traffic.d.ts +276 -0
- package/dist/traffic.d.ts.map +1 -0
- package/dist/traffic.js +103 -0
- package/dist/traffic.js.map +1 -0
- package/dist/workspaces.d.ts +19 -1
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +26 -0
- package/dist/workspaces.js.map +1 -1
- package/package.json +5 -4
- package/src/accessGrants.ts +117 -0
- package/src/agentCommand.ts +67 -0
- package/src/ai.ts +32 -0
- package/src/auth.ts +323 -0
- package/src/backupPolicy.ts +55 -0
- package/src/common.ts +179 -0
- package/src/databaseImport.ts +138 -0
- package/src/doctor.ts +161 -0
- package/src/environments.ts +23 -0
- package/src/githubApp.ts +268 -0
- package/src/index.ts +30 -0
- package/src/insights.ts +78 -0
- package/src/kernel.ts +180 -0
- package/src/labels.ts +86 -0
- package/src/management.ts +620 -0
- package/src/multiNode.ts +356 -0
- package/src/ninedeployManifest.ts +363 -0
- package/src/panelBackup.ts +90 -0
- package/src/project.ts +42 -0
- package/src/proxyConfig.ts +139 -0
- package/src/publicAccess.ts +80 -0
- package/src/runtimeVersions.ts +232 -0
- package/src/secretProviders.ts +159 -0
- package/src/secretScan.ts +169 -0
- package/src/service.ts +1310 -0
- package/src/terminals.ts +212 -0
- package/src/traffic.ts +130 -0
- package/src/workspaces.ts +215 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Mirrors `secretProviderKind` in `@ninedeploy/db`. */
|
|
3
|
+
export declare const secretProviderKind: z.ZodEnum<{
|
|
4
|
+
aws: "aws";
|
|
5
|
+
vault: "vault";
|
|
6
|
+
}>;
|
|
7
|
+
export type SecretProviderKind = z.infer<typeof secretProviderKind>;
|
|
8
|
+
/**
|
|
9
|
+
* A Vault path relative to the KV v2 mount: segments of `[A-Za-z0-9_.-]+`
|
|
10
|
+
* joined by `/`, no leading or trailing `/`, and no `.` or `..` segment.
|
|
11
|
+
*/
|
|
12
|
+
export declare const VAULT_PATH_RE: RegExp;
|
|
13
|
+
/** A KV v2 field name. */
|
|
14
|
+
export declare const VAULT_FIELD_RE: RegExp;
|
|
15
|
+
/** An AWS secret name or full ARN. */
|
|
16
|
+
export declare const AWS_SECRET_ID_RE: RegExp;
|
|
17
|
+
export declare const AWS_REGION_RE: RegExp;
|
|
18
|
+
export declare const AWS_ACCESS_KEY_ID_RE: RegExp;
|
|
19
|
+
export declare const vaultPath: z.ZodString;
|
|
20
|
+
export declare const awsSecretId: z.ZodString;
|
|
21
|
+
export declare const vaultAuthMethod: z.ZodEnum<{
|
|
22
|
+
approle: "approle";
|
|
23
|
+
token: "token";
|
|
24
|
+
}>;
|
|
25
|
+
export type VaultAuthMethod = z.infer<typeof vaultAuthMethod>;
|
|
26
|
+
export declare const vaultProviderConfig: z.ZodObject<{
|
|
27
|
+
address: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodURL>, z.ZodTransform<string, string>>;
|
|
28
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
29
|
+
mount: z.ZodDefault<z.ZodString>;
|
|
30
|
+
authMethod: z.ZodEnum<{
|
|
31
|
+
approle: "approle";
|
|
32
|
+
token: "token";
|
|
33
|
+
}>;
|
|
34
|
+
approleMount: z.ZodDefault<z.ZodString>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export type VaultProviderConfig = z.input<typeof vaultProviderConfig>;
|
|
37
|
+
export declare const vaultProviderCredentials: z.ZodObject<{
|
|
38
|
+
token: z.ZodOptional<z.ZodString>;
|
|
39
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
secretId: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type VaultProviderCredentials = z.infer<typeof vaultProviderCredentials>;
|
|
43
|
+
/** PUT /v1/settings/secret-providers/vault. */
|
|
44
|
+
export declare const vaultProviderPut: z.ZodObject<{
|
|
45
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
config: z.ZodObject<{
|
|
47
|
+
address: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodURL>, z.ZodTransform<string, string>>;
|
|
48
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
49
|
+
mount: z.ZodDefault<z.ZodString>;
|
|
50
|
+
authMethod: z.ZodEnum<{
|
|
51
|
+
approle: "approle";
|
|
52
|
+
token: "token";
|
|
53
|
+
}>;
|
|
54
|
+
approleMount: z.ZodDefault<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
token: z.ZodOptional<z.ZodString>;
|
|
58
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
59
|
+
secretId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type VaultProviderPut = z.input<typeof vaultProviderPut>;
|
|
63
|
+
export declare const awsProviderConfig: z.ZodObject<{
|
|
64
|
+
region: z.ZodString;
|
|
65
|
+
endpoint: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodURL>, z.ZodTransform<string, string>>>;
|
|
66
|
+
roleArn: z.ZodOptional<z.ZodString>;
|
|
67
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
roleSessionName: z.ZodDefault<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
export type AwsProviderConfig = z.input<typeof awsProviderConfig>;
|
|
71
|
+
export declare const awsProviderCredentials: z.ZodObject<{
|
|
72
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
74
|
+
sessionToken: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export type AwsProviderCredentials = z.infer<typeof awsProviderCredentials>;
|
|
77
|
+
/** PUT /v1/settings/secret-providers/aws. */
|
|
78
|
+
export declare const awsProviderPut: z.ZodObject<{
|
|
79
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
config: z.ZodObject<{
|
|
81
|
+
region: z.ZodString;
|
|
82
|
+
endpoint: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodURL>, z.ZodTransform<string, string>>>;
|
|
83
|
+
roleArn: z.ZodOptional<z.ZodString>;
|
|
84
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
85
|
+
roleSessionName: z.ZodDefault<z.ZodString>;
|
|
86
|
+
}, z.core.$strict>;
|
|
87
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
89
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
90
|
+
sessionToken: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export type AwsProviderPut = z.input<typeof awsProviderPut>;
|
|
94
|
+
/** POST /v1/settings/secret-providers/:kind/test. Both probes are optional. */
|
|
95
|
+
export declare const secretProviderTestRequest: z.ZodObject<{
|
|
96
|
+
probePath: z.ZodOptional<z.ZodString>;
|
|
97
|
+
probeSecretId: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
export type SecretProviderTestRequest = z.infer<typeof secretProviderTestRequest>;
|
|
100
|
+
export declare const secretProviderTestResult: z.ZodObject<{
|
|
101
|
+
ok: z.ZodBoolean;
|
|
102
|
+
detail: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type SecretProviderTestResult = z.infer<typeof secretProviderTestResult>;
|
|
105
|
+
/** One element of GET /v1/settings/secret-providers. Never carries a credential. */
|
|
106
|
+
export declare const secretProviderView: z.ZodObject<{
|
|
107
|
+
kind: z.ZodEnum<{
|
|
108
|
+
aws: "aws";
|
|
109
|
+
vault: "vault";
|
|
110
|
+
}>;
|
|
111
|
+
configured: z.ZodBoolean;
|
|
112
|
+
enabled: z.ZodBoolean;
|
|
113
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
114
|
+
hasCredential: z.ZodBoolean;
|
|
115
|
+
lastTestedAt: z.ZodNullable<z.ZodString>;
|
|
116
|
+
lastTestError: z.ZodNullable<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type SecretProviderView = z.infer<typeof secretProviderView>;
|
|
119
|
+
//# sourceMappingURL=secretProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secretProviders.d.ts","sourceRoot":"","sources":["../src/secretProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,wDAAwD;AACxD,eAAO,MAAM,kBAAkB;;;EAA2B,CAAC;AAC3D,M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;;;;;;;;;kBAMhB,CAAC;AACZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAI5D,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB;;;kBAO3B,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,wBAAwB;;;iBAInC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,oFAAoF;AACpF,eAAO,MAAM,kBAAkB;;;;;;;;;;;iBAS7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { providerBaseUrl } from './common.js';
|
|
3
|
+
// ── Secret managers (0.14) ─────────────────────────────────────────────────
|
|
4
|
+
// Request and response shapes for `/v1/settings/secret-providers`. HashiCorp
|
|
5
|
+
// Vault / OpenBao (KV v2) and AWS Secrets Manager run alongside the existing
|
|
6
|
+
// settings-based Infisical / Doppler provider, which is untouched. Credentials
|
|
7
|
+
// only ever appear in REQUEST shapes; on update an omitted credential field
|
|
8
|
+
// keeps the stored value. The server enforces https (http only with private
|
|
9
|
+
// egress) and proves the settings with a test call. Design: DESIGN.md §4.
|
|
10
|
+
/** Mirrors `secretProviderKind` in `@ninedeploy/db`. */
|
|
11
|
+
export const secretProviderKind = z.enum(['vault', 'aws']);
|
|
12
|
+
// ── Reference grammar pieces (DESIGN §4.1) ─────────────────────────────────
|
|
13
|
+
/**
|
|
14
|
+
* A Vault path relative to the KV v2 mount: segments of `[A-Za-z0-9_.-]+`
|
|
15
|
+
* joined by `/`, no leading or trailing `/`, and no `.` or `..` segment.
|
|
16
|
+
*/
|
|
17
|
+
export const VAULT_PATH_RE = /^(?!\.\.?(?:\/|$))[A-Za-z0-9_.-]+(?:\/(?!\.\.?(?:\/|$))[A-Za-z0-9_.-]+)*$/;
|
|
18
|
+
/** A KV v2 field name. */
|
|
19
|
+
export const VAULT_FIELD_RE = /^[A-Za-z0-9_.-]+$/;
|
|
20
|
+
/** An AWS secret name or full ARN. */
|
|
21
|
+
export const AWS_SECRET_ID_RE = /^[A-Za-z0-9/_+=.@:-]{1,2048}$/;
|
|
22
|
+
export const AWS_REGION_RE = /^[a-z]{2}(-gov)?-[a-z]+-\d$/;
|
|
23
|
+
export const AWS_ACCESS_KEY_ID_RE = /^(AKIA|ASIA)[A-Z0-9]{16}$/;
|
|
24
|
+
export const vaultPath = z.string().max(1024).regex(VAULT_PATH_RE, 'invalid Vault path');
|
|
25
|
+
export const awsSecretId = z.string().regex(AWS_SECRET_ID_RE, 'invalid AWS secret id');
|
|
26
|
+
// ── HashiCorp Vault / OpenBao ──────────────────────────────────────────────
|
|
27
|
+
export const vaultAuthMethod = z.enum(['token', 'approle']);
|
|
28
|
+
export const vaultProviderConfig = z
|
|
29
|
+
.object({
|
|
30
|
+
address: providerBaseUrl,
|
|
31
|
+
/** Vault Enterprise / OpenBao namespace (`X-Vault-Namespace`). */
|
|
32
|
+
namespace: vaultPath.optional(),
|
|
33
|
+
mount: vaultPath.default('secret'),
|
|
34
|
+
authMethod: vaultAuthMethod,
|
|
35
|
+
approleMount: vaultPath.default('approle'),
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
const vaultSecret = z.string().min(1).max(4096);
|
|
39
|
+
export const vaultProviderCredentials = z
|
|
40
|
+
.object({
|
|
41
|
+
token: vaultSecret.optional(),
|
|
42
|
+
roleId: vaultSecret.optional(),
|
|
43
|
+
secretId: vaultSecret.optional(),
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
46
|
+
/** PUT /v1/settings/secret-providers/vault. */
|
|
47
|
+
export const vaultProviderPut = z
|
|
48
|
+
.object({
|
|
49
|
+
enabled: z.boolean().optional(),
|
|
50
|
+
config: vaultProviderConfig,
|
|
51
|
+
credentials: vaultProviderCredentials.optional(),
|
|
52
|
+
})
|
|
53
|
+
.strict()
|
|
54
|
+
.refine((v) => v.config.authMethod !== 'token' || (v.credentials?.roleId === undefined && v.credentials?.secretId === undefined), {
|
|
55
|
+
message: 'roleId and secretId belong to authMethod "approle"',
|
|
56
|
+
path: ['credentials'],
|
|
57
|
+
})
|
|
58
|
+
.refine((v) => v.config.authMethod !== 'approle' || v.credentials?.token === undefined, {
|
|
59
|
+
message: 'token belongs to authMethod "token"',
|
|
60
|
+
path: ['credentials', 'token'],
|
|
61
|
+
});
|
|
62
|
+
// ── AWS Secrets Manager ────────────────────────────────────────────────────
|
|
63
|
+
export const awsProviderConfig = z
|
|
64
|
+
.object({
|
|
65
|
+
region: z.string().regex(AWS_REGION_RE, 'invalid AWS region'),
|
|
66
|
+
/** VPC endpoint or compatible service; https. */
|
|
67
|
+
endpoint: providerBaseUrl.optional(),
|
|
68
|
+
roleArn: z
|
|
69
|
+
.string()
|
|
70
|
+
.max(2048)
|
|
71
|
+
.regex(/^arn:aws[a-z-]*:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$/, 'invalid IAM role ARN')
|
|
72
|
+
.optional(),
|
|
73
|
+
externalId: z
|
|
74
|
+
.string()
|
|
75
|
+
.min(2)
|
|
76
|
+
.max(1224)
|
|
77
|
+
.regex(/^[\w+=,.@:/-]+$/, 'invalid external id')
|
|
78
|
+
.optional(),
|
|
79
|
+
roleSessionName: z
|
|
80
|
+
.string()
|
|
81
|
+
.regex(/^[\w+=,.@-]{2,64}$/, 'invalid role session name')
|
|
82
|
+
.default('ninedeploy'),
|
|
83
|
+
})
|
|
84
|
+
.strict()
|
|
85
|
+
.refine((v) => v.externalId === undefined || v.roleArn !== undefined, {
|
|
86
|
+
message: 'externalId needs roleArn',
|
|
87
|
+
path: ['externalId'],
|
|
88
|
+
});
|
|
89
|
+
export const awsProviderCredentials = z
|
|
90
|
+
.object({
|
|
91
|
+
accessKeyId: z.string().regex(AWS_ACCESS_KEY_ID_RE, 'invalid access key id').optional(),
|
|
92
|
+
secretAccessKey: z.string().min(1).max(256).optional(),
|
|
93
|
+
sessionToken: z.string().min(1).max(4096).optional(),
|
|
94
|
+
})
|
|
95
|
+
.strict();
|
|
96
|
+
/** PUT /v1/settings/secret-providers/aws. */
|
|
97
|
+
export const awsProviderPut = z
|
|
98
|
+
.object({
|
|
99
|
+
enabled: z.boolean().optional(),
|
|
100
|
+
config: awsProviderConfig,
|
|
101
|
+
credentials: awsProviderCredentials.optional(),
|
|
102
|
+
})
|
|
103
|
+
.strict();
|
|
104
|
+
// ── Test and views ─────────────────────────────────────────────────────────
|
|
105
|
+
/** POST /v1/settings/secret-providers/:kind/test. Both probes are optional. */
|
|
106
|
+
export const secretProviderTestRequest = z
|
|
107
|
+
.object({
|
|
108
|
+
/** vault: also read this path (relative to the mount). */
|
|
109
|
+
probePath: vaultPath.optional(),
|
|
110
|
+
/** aws: also read this secret. */
|
|
111
|
+
probeSecretId: awsSecretId.optional(),
|
|
112
|
+
})
|
|
113
|
+
.strict();
|
|
114
|
+
export const secretProviderTestResult = z.object({
|
|
115
|
+
ok: z.boolean(),
|
|
116
|
+
/** Redacted; response bodies cut to 200 characters. */
|
|
117
|
+
detail: z.string(),
|
|
118
|
+
});
|
|
119
|
+
/** One element of GET /v1/settings/secret-providers. Never carries a credential. */
|
|
120
|
+
export const secretProviderView = z.object({
|
|
121
|
+
kind: secretProviderKind,
|
|
122
|
+
configured: z.boolean(),
|
|
123
|
+
enabled: z.boolean(),
|
|
124
|
+
/** Non-secret settings; `{}` when unconfigured. */
|
|
125
|
+
config: z.record(z.string(), z.unknown()),
|
|
126
|
+
hasCredential: z.boolean(),
|
|
127
|
+
lastTestedAt: z.string().nullable(),
|
|
128
|
+
lastTestError: z.string().nullable(),
|
|
129
|
+
});
|
|
130
|
+
//# sourceMappingURL=secretProviders.js.map
|
|
@@ -0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,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
|
package/dist/secretScan.js
CHANGED
package/dist/service.d.ts
CHANGED
|
@@ -11,6 +11,127 @@ export declare const buildPack: z.ZodEnum<{
|
|
|
11
11
|
railpack: "railpack";
|
|
12
12
|
static: "static";
|
|
13
13
|
}>;
|
|
14
|
+
/**
|
|
15
|
+
* 0.16.1: names of the service's environment variables a Dockerfile build
|
|
16
|
+
* receives as `--build-arg` (the Dockerfile reads them with `ARG`). Opt-in per
|
|
17
|
+
* name: a build gets none unless listed. Nixpacks and Railpack builds already
|
|
18
|
+
* see the whole environment.
|
|
19
|
+
*/
|
|
20
|
+
export declare const buildArgNames: z.ZodArray<z.ZodString>;
|
|
21
|
+
/**
|
|
22
|
+
* 0.16.1: capabilities a docker service may add. Deliberately short: the ones
|
|
23
|
+
* real workloads ask for (VPNs, packet capture, profilers, realtime audio,
|
|
24
|
+
* mlock). SYS_ADMIN, SYS_MODULE, DAC_READ_SEARCH and the like are left out —
|
|
25
|
+
* each is a known path out of the container.
|
|
26
|
+
*/
|
|
27
|
+
export declare const runtimeCapability: z.ZodEnum<{
|
|
28
|
+
IPC_LOCK: "IPC_LOCK";
|
|
29
|
+
NET_ADMIN: "NET_ADMIN";
|
|
30
|
+
NET_RAW: "NET_RAW";
|
|
31
|
+
SYS_NICE: "SYS_NICE";
|
|
32
|
+
SYS_PTRACE: "SYS_PTRACE";
|
|
33
|
+
SYS_RESOURCE: "SYS_RESOURCE";
|
|
34
|
+
SYS_TIME: "SYS_TIME";
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* 0.16.1 advanced container options for docker services (operator only):
|
|
38
|
+
* structured fields, never free-form `docker run` flags, so nothing outside
|
|
39
|
+
* this list (privileged, host mounts, host network…) can be asked for.
|
|
40
|
+
*/
|
|
41
|
+
export declare const runtimeOptions: z.ZodObject<{
|
|
42
|
+
gpus: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodNumber]>>>;
|
|
43
|
+
shmSizeMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
init: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
ulimitNofile: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
capAdd: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
47
|
+
IPC_LOCK: "IPC_LOCK";
|
|
48
|
+
NET_ADMIN: "NET_ADMIN";
|
|
49
|
+
NET_RAW: "NET_RAW";
|
|
50
|
+
SYS_NICE: "SYS_NICE";
|
|
51
|
+
SYS_PTRACE: "SYS_PTRACE";
|
|
52
|
+
SYS_RESOURCE: "SYS_RESOURCE";
|
|
53
|
+
SYS_TIME: "SYS_TIME";
|
|
54
|
+
}>>>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export type RuntimeOptions = z.infer<typeof runtimeOptions>;
|
|
57
|
+
/**
|
|
58
|
+
* 0.16.1: the most host ports one service may publish through `portMappings`.
|
|
59
|
+
* Docker starts one userland proxy process per published port and protocol,
|
|
60
|
+
* so a 10 000-port range costs 10 000 processes on the host.
|
|
61
|
+
*/
|
|
62
|
+
export declare const MAX_MAPPED_PORTS = 1000;
|
|
63
|
+
/** Most port-mapping rules per service. */
|
|
64
|
+
export declare const MAX_PORT_MAPPINGS = 20;
|
|
65
|
+
/**
|
|
66
|
+
* A literal IPv4 or IPv6 address a port can be bound to (no zone, no CIDR).
|
|
67
|
+
* The unspecified addresses are refused: an empty IP already means "every
|
|
68
|
+
* address", and two spellings of it would dodge the overlap check.
|
|
69
|
+
*/
|
|
70
|
+
export declare function isBindableIp(ip: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* 0.16.1 extra host-port mappings of a docker service: one port or a range,
|
|
73
|
+
* TCP or UDP, on every host address or one dedicated IP
|
|
74
|
+
* (`docker run -p 203.0.113.7:27015-27030:27015-27030/udp`). The container
|
|
75
|
+
* range starts at `containerPort` and is as long as the host range.
|
|
76
|
+
*/
|
|
77
|
+
export declare const portMapping: z.ZodObject<{
|
|
78
|
+
hostIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
hostPort: z.ZodNumber;
|
|
80
|
+
hostPortEnd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
81
|
+
containerPort: z.ZodNumber;
|
|
82
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
83
|
+
tcp: "tcp";
|
|
84
|
+
udp: "udp";
|
|
85
|
+
}>>;
|
|
86
|
+
allowFrom: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
export type PortMapping = z.infer<typeof portMapping>;
|
|
89
|
+
type PortMappingLike = Pick<PortMapping, 'hostPort' | 'hostPortEnd' | 'containerPort'> & {
|
|
90
|
+
hostIp?: string | null;
|
|
91
|
+
protocol?: 'tcp' | 'udp';
|
|
92
|
+
allowFrom?: readonly string[] | null;
|
|
93
|
+
};
|
|
94
|
+
/** How many host ports a mapping publishes. */
|
|
95
|
+
export declare const mappedPortCount: (m: Pick<PortMapping, 'hostPort' | 'hostPortEnd'>) => number;
|
|
96
|
+
/**
|
|
97
|
+
* Whether two mappings would bind the same host socket: same protocol,
|
|
98
|
+
* overlapping ports, and the same IP (or either on every address).
|
|
99
|
+
*/
|
|
100
|
+
export declare function portMappingsOverlap(a: PortMappingLike, b: PortMappingLike): boolean;
|
|
101
|
+
/** Why a list of mappings cannot be published, or null. Shared by the server, the panel and the CLI. */
|
|
102
|
+
export declare function portMappingsProblem(list: readonly PortMappingLike[]): string | null;
|
|
103
|
+
/** The `docker run -p` operand: `27015-27030:27015-27030/udp`, `203.0.113.7:53:53/udp`, `[2001:db8::7]:53:53/udp`. */
|
|
104
|
+
export declare function formatPortMapping(m: PortMappingLike): string;
|
|
105
|
+
/**
|
|
106
|
+
* Parse `27015-27030:27015/udp`, `8080:80`, `5432@10.0.0.0/8`, `53/udp`, `10000-10100/udp`
|
|
107
|
+
* (no colon = the same ports inside the container), optionally after an IP:
|
|
108
|
+
* `203.0.113.7:53/udp`, `[2001:db8::7]:8080:80`. A container range must be as
|
|
109
|
+
* long as the host range. Returns the mapping, or why the text is not one.
|
|
110
|
+
*/
|
|
111
|
+
export declare function parsePortMapping(text: string): PortMapping | string;
|
|
112
|
+
/** The PATCH field: rules checked together (ranges, overlaps, the port budget). */
|
|
113
|
+
export declare const portMappings: z.ZodArray<z.ZodObject<{
|
|
114
|
+
hostIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
hostPort: z.ZodNumber;
|
|
116
|
+
hostPortEnd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
117
|
+
containerPort: z.ZodNumber;
|
|
118
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
119
|
+
tcp: "tcp";
|
|
120
|
+
udp: "udp";
|
|
121
|
+
}>>;
|
|
122
|
+
allowFrom: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
123
|
+
}, z.core.$strict>>;
|
|
124
|
+
/**
|
|
125
|
+
* 0.16.1 deploy healthcheck: `http` probes the container port (an HTTP answer
|
|
126
|
+
* below 500, then a TCP connect); `running` only waits for the container to
|
|
127
|
+
* stay up, for services with no HTTP or TCP port to probe (UDP game servers,
|
|
128
|
+
* VoIP, queue workers).
|
|
129
|
+
*/
|
|
130
|
+
export declare const healthCheckMode: z.ZodEnum<{
|
|
131
|
+
http: "http";
|
|
132
|
+
running: "running";
|
|
133
|
+
}>;
|
|
134
|
+
export type HealthCheckMode = z.infer<typeof healthCheckMode>;
|
|
14
135
|
export declare const createService: z.ZodObject<{
|
|
15
136
|
templateId: z.ZodOptional<z.ZodString>;
|
|
16
137
|
tagProjectIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -63,6 +184,7 @@ export declare const createService: z.ZodObject<{
|
|
|
63
184
|
preStopCmd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
185
|
restartPolicy: z.ZodOptional<z.ZodString>;
|
|
65
186
|
stopGraceSeconds: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
buildArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
188
|
}, z.core.$strip>>;
|
|
67
189
|
}, z.core.$strip>;
|
|
68
190
|
export type CreateService = z.infer<typeof createService>;
|
|
@@ -71,9 +193,6 @@ export type CreateService = z.infer<typeof createService>;
|
|
|
71
193
|
* still applies `.default()` values for absent keys, which would silently
|
|
72
194
|
* rewrite `type` back to 'docker' and `branch` to 'main' on every PATCH. */
|
|
73
195
|
export declare const updateService: z.ZodObject<{
|
|
74
|
-
tagProjectIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
75
|
-
tagWorkspaceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
76
|
-
tagLabelIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
77
196
|
name: z.ZodOptional<z.ZodString>;
|
|
78
197
|
slug: z.ZodOptional<z.ZodString>;
|
|
79
198
|
type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -95,8 +214,39 @@ export declare const updateService: z.ZodObject<{
|
|
|
95
214
|
memLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
96
215
|
replicas: z.ZodOptional<z.ZodNumber>;
|
|
97
216
|
healthPath: z.ZodOptional<z.ZodString>;
|
|
217
|
+
healthTimeoutSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
218
|
+
healthCheck: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
219
|
+
http: "http";
|
|
220
|
+
running: "running";
|
|
221
|
+
}>>>;
|
|
222
|
+
runtimeOptions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
223
|
+
gpus: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodNumber]>>>;
|
|
224
|
+
shmSizeMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
225
|
+
init: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
ulimitNofile: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
capAdd: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
228
|
+
IPC_LOCK: "IPC_LOCK";
|
|
229
|
+
NET_ADMIN: "NET_ADMIN";
|
|
230
|
+
NET_RAW: "NET_RAW";
|
|
231
|
+
SYS_NICE: "SYS_NICE";
|
|
232
|
+
SYS_PTRACE: "SYS_PTRACE";
|
|
233
|
+
SYS_RESOURCE: "SYS_RESOURCE";
|
|
234
|
+
SYS_TIME: "SYS_TIME";
|
|
235
|
+
}>>>;
|
|
236
|
+
}, z.core.$strict>>>;
|
|
98
237
|
port: z.ZodOptional<z.ZodNumber>;
|
|
99
238
|
publishedPort: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
239
|
+
portMappings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
240
|
+
hostIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
|
+
hostPort: z.ZodNumber;
|
|
242
|
+
hostPortEnd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
243
|
+
containerPort: z.ZodNumber;
|
|
244
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
245
|
+
tcp: "tcp";
|
|
246
|
+
udp: "udp";
|
|
247
|
+
}>>;
|
|
248
|
+
allowFrom: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
249
|
+
}, z.core.$strict>>>>;
|
|
100
250
|
previewDeploymentsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
101
251
|
previewAutoDestroyOnClose: z.ZodOptional<z.ZodBoolean>;
|
|
102
252
|
previewDomainPattern: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -122,6 +272,7 @@ export declare const updateService: z.ZodObject<{
|
|
|
122
272
|
preStopCmd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
273
|
restartPolicy: z.ZodOptional<z.ZodString>;
|
|
124
274
|
stopGraceSeconds: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
buildArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
276
|
}, z.core.$strip>>;
|
|
126
277
|
}, z.core.$strip>;
|
|
127
278
|
export type UpdateService = z.infer<typeof updateService>;
|
|
@@ -176,9 +327,40 @@ export declare const service: z.ZodObject<{
|
|
|
176
327
|
commitSha: z.ZodNullable<z.ZodString>;
|
|
177
328
|
runtimeId: z.ZodNullable<z.ZodString>;
|
|
178
329
|
healthPath: z.ZodString;
|
|
330
|
+
healthTimeoutSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
331
|
+
healthCheck: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
http: "http";
|
|
333
|
+
running: "running";
|
|
334
|
+
}>>;
|
|
335
|
+
runtimeOptions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
336
|
+
gpus: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodNumber]>>>;
|
|
337
|
+
shmSizeMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
338
|
+
init: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
ulimitNofile: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
340
|
+
capAdd: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
341
|
+
IPC_LOCK: "IPC_LOCK";
|
|
342
|
+
NET_ADMIN: "NET_ADMIN";
|
|
343
|
+
NET_RAW: "NET_RAW";
|
|
344
|
+
SYS_NICE: "SYS_NICE";
|
|
345
|
+
SYS_PTRACE: "SYS_PTRACE";
|
|
346
|
+
SYS_RESOURCE: "SYS_RESOURCE";
|
|
347
|
+
SYS_TIME: "SYS_TIME";
|
|
348
|
+
}>>>;
|
|
349
|
+
}, z.core.$strict>>>;
|
|
179
350
|
autoUrl: z.ZodNullable<z.ZodString>;
|
|
180
351
|
port: z.ZodNullable<z.ZodNumber>;
|
|
181
352
|
publishedPort: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
353
|
+
portMappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
354
|
+
hostIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
hostPort: z.ZodNumber;
|
|
356
|
+
hostPortEnd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
357
|
+
containerPort: z.ZodNumber;
|
|
358
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
359
|
+
tcp: "tcp";
|
|
360
|
+
udp: "udp";
|
|
361
|
+
}>>;
|
|
362
|
+
allowFrom: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
363
|
+
}, z.core.$strict>>>;
|
|
182
364
|
cpuShares: z.ZodNumber;
|
|
183
365
|
cpuLimitMilli: z.ZodNumber;
|
|
184
366
|
memLimitMb: z.ZodNumber;
|
|
@@ -211,11 +393,14 @@ export declare const service: z.ZodObject<{
|
|
|
211
393
|
preStopCmd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
394
|
restartPolicy: z.ZodString;
|
|
213
395
|
stopGraceSeconds: z.ZodNumber;
|
|
396
|
+
buildArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
397
|
}, z.core.$strip>>;
|
|
215
398
|
createdAt: z.ZodString;
|
|
216
399
|
updatedAt: z.ZodString;
|
|
217
400
|
}, z.core.$strip>;
|
|
218
401
|
export type Service = z.infer<typeof service>;
|
|
402
|
+
/** r512: a registry host a `registry` credential may be sent to (`ghcr.io`, `registry.local:5000`). */
|
|
403
|
+
export declare const registryHost: z.ZodString;
|
|
219
404
|
export declare const createSource: z.ZodObject<{
|
|
220
405
|
name: z.ZodString;
|
|
221
406
|
type: z.ZodEnum<{
|
|
@@ -229,7 +414,9 @@ export declare const createSource: z.ZodObject<{
|
|
|
229
414
|
token: z.ZodOptional<z.ZodString>;
|
|
230
415
|
deployKey: z.ZodOptional<z.ZodString>;
|
|
231
416
|
registryUsername: z.ZodOptional<z.ZodString>;
|
|
417
|
+
registryHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
418
|
defaultBranch: z.ZodOptional<z.ZodString>;
|
|
419
|
+
baseUrl: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodURL>, z.ZodTransform<string, string>>>;
|
|
233
420
|
}, z.core.$strip>;
|
|
234
421
|
export type CreateSourceInput = z.input<typeof createSource>;
|
|
235
422
|
export declare const source: z.ZodObject<{
|
|
@@ -239,7 +426,16 @@ export declare const source: z.ZodObject<{
|
|
|
239
426
|
hasToken: z.ZodBoolean;
|
|
240
427
|
hasDeployKey: z.ZodBoolean;
|
|
241
428
|
registryUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
registryHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
430
|
defaultBranch: z.ZodNullable<z.ZodString>;
|
|
431
|
+
baseUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
+
allowOnNodes: z.ZodOptional<z.ZodBoolean>;
|
|
433
|
+
pinHostKeys: z.ZodOptional<z.ZodBoolean>;
|
|
434
|
+
pinnedHostKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
435
|
+
host: z.ZodString;
|
|
436
|
+
type: z.ZodString;
|
|
437
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
438
|
+
}, z.core.$strip>>>;
|
|
243
439
|
createdAt: z.ZodString;
|
|
244
440
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
245
441
|
}, z.core.$strip>;
|
|
@@ -334,6 +530,20 @@ export declare const createDomain: z.ZodObject<{
|
|
|
334
530
|
rateLimitBurst: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
335
531
|
}, z.core.$strip>;
|
|
336
532
|
export type CreateDomainInput = z.input<typeof createDomain>;
|
|
533
|
+
/**
|
|
534
|
+
* Why a redirect regex cannot go to Traefik, or null. Traefik compiles it
|
|
535
|
+
* with Go's RE2, which has no lookaround and no backreferences — and a regex
|
|
536
|
+
* Traefik refuses takes the whole dynamic config file down with it, so these
|
|
537
|
+
* are refused when saved. The rest is checked by compiling it here.
|
|
538
|
+
*/
|
|
539
|
+
export declare function redirectRegexProblem(regex: string): string | null;
|
|
540
|
+
/** 0.16.1 one redirect rule of a domain (Dokploy's "Redirects"): Traefik `redirectRegex`. */
|
|
541
|
+
export declare const redirectRule: z.ZodObject<{
|
|
542
|
+
regex: z.ZodString;
|
|
543
|
+
replacement: z.ZodString;
|
|
544
|
+
permanent: z.ZodDefault<z.ZodBoolean>;
|
|
545
|
+
}, z.core.$strip>;
|
|
546
|
+
export type RedirectRule = z.infer<typeof redirectRule>;
|
|
337
547
|
/** PATCHable routing extras for an existing domain. */
|
|
338
548
|
export declare const domainPatch: z.ZodObject<{
|
|
339
549
|
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -343,6 +553,11 @@ export declare const domainPatch: z.ZodObject<{
|
|
|
343
553
|
ipAllowlist: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
344
554
|
rateLimitAverage: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
345
555
|
rateLimitBurst: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
556
|
+
redirects: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
557
|
+
regex: z.ZodString;
|
|
558
|
+
replacement: z.ZodString;
|
|
559
|
+
permanent: z.ZodDefault<z.ZodBoolean>;
|
|
560
|
+
}, z.core.$strip>>>>;
|
|
346
561
|
}, z.core.$strip>;
|
|
347
562
|
export type DomainPatch = z.input<typeof domainPatch>;
|
|
348
563
|
export declare const domain: z.ZodObject<{
|
|
@@ -357,16 +572,16 @@ export declare const domain: z.ZodObject<{
|
|
|
357
572
|
ipAllowlist: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
573
|
rateLimitAverage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
359
574
|
rateLimitBurst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
575
|
+
redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
576
|
+
regex: z.ZodString;
|
|
577
|
+
replacement: z.ZodString;
|
|
578
|
+
permanent: z.ZodBoolean;
|
|
579
|
+
}, z.core.$strip>>>;
|
|
360
580
|
status: z.ZodString;
|
|
361
581
|
createdAt: z.ZodString;
|
|
362
582
|
updatedAt: z.ZodString;
|
|
363
583
|
}, z.core.$strip>;
|
|
364
584
|
export type Domain = z.infer<typeof domain>;
|
|
365
|
-
export declare const createWebhook: z.ZodObject<{
|
|
366
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
367
|
-
watchPaths: z.ZodOptional<z.ZodString>;
|
|
368
|
-
}, z.core.$strip>;
|
|
369
|
-
export type CreateWebhookInput = z.input<typeof createWebhook>;
|
|
370
585
|
export declare const webhook: z.ZodObject<{
|
|
371
586
|
id: z.ZodNumber;
|
|
372
587
|
branch: z.ZodString;
|
|
@@ -377,15 +592,17 @@ export declare const webhook: z.ZodObject<{
|
|
|
377
592
|
createdAt: z.ZodString;
|
|
378
593
|
}, z.core.$strip>;
|
|
379
594
|
export type Webhook = z.infer<typeof webhook>;
|
|
380
|
-
/**
|
|
595
|
+
/**
|
|
596
|
+
* Returned once at creation time — the secret is never retrievable again.
|
|
597
|
+
* r334: the create route answers id/branch/active/sourceId/url/secret only;
|
|
598
|
+
* `watchPaths` and `createdAt` come from `webhooks.list`.
|
|
599
|
+
*/
|
|
381
600
|
export declare const createdWebhook: z.ZodObject<{
|
|
382
601
|
id: z.ZodNumber;
|
|
383
602
|
branch: z.ZodString;
|
|
384
603
|
active: z.ZodBoolean;
|
|
385
|
-
watchPaths: z.ZodString;
|
|
386
604
|
sourceId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
387
605
|
url: z.ZodString;
|
|
388
|
-
createdAt: z.ZodString;
|
|
389
606
|
secret: z.ZodString;
|
|
390
607
|
}, z.core.$strip>;
|
|
391
608
|
export type CreatedWebhook = z.infer<typeof createdWebhook>;
|
|
@@ -393,6 +610,8 @@ export declare const createDatabase: z.ZodObject<{
|
|
|
393
610
|
name: z.ZodString;
|
|
394
611
|
engine: z.ZodEnum<{
|
|
395
612
|
clickhouse: "clickhouse";
|
|
613
|
+
dragonfly: "dragonfly";
|
|
614
|
+
keydb: "keydb";
|
|
396
615
|
mariadb: "mariadb";
|
|
397
616
|
meilisearch: "meilisearch";
|
|
398
617
|
mongo: "mongo";
|
|
@@ -408,14 +627,9 @@ export declare const createDatabase: z.ZodObject<{
|
|
|
408
627
|
existingVolume: z.ZodOptional<z.ZodString>;
|
|
409
628
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
410
629
|
webGuiEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
630
|
+
serverId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
411
631
|
}, z.core.$strip>;
|
|
412
632
|
export type CreateDatabaseInput = z.input<typeof createDatabase>;
|
|
413
|
-
export declare const databasePatch: z.ZodObject<{
|
|
414
|
-
name: z.ZodOptional<z.ZodString>;
|
|
415
|
-
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
416
|
-
webGuiEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
-
}, z.core.$strip>;
|
|
418
|
-
export type DatabasePatch = z.input<typeof databasePatch>;
|
|
419
633
|
export declare const managedDatabase: z.ZodObject<{
|
|
420
634
|
id: z.ZodNumber;
|
|
421
635
|
projectId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -437,6 +651,9 @@ export declare const managedDatabase: z.ZodObject<{
|
|
|
437
651
|
name: z.ZodString;
|
|
438
652
|
slug: z.ZodString;
|
|
439
653
|
}, z.core.$strip>>>>;
|
|
654
|
+
serverId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
655
|
+
serverName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
656
|
+
reachable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
440
657
|
createdAt: z.ZodString;
|
|
441
658
|
updatedAt: z.ZodString;
|
|
442
659
|
}, z.core.$strip>;
|
|
@@ -1142,4 +1359,5 @@ export declare const autoPruneRunResult: z.ZodObject<{
|
|
|
1142
1359
|
}, z.core.$strip>;
|
|
1143
1360
|
}, z.core.$strip>;
|
|
1144
1361
|
export type AutoPruneRunResult = z.infer<typeof autoPruneRunResult>;
|
|
1362
|
+
export {};
|
|
1145
1363
|
//# sourceMappingURL=service.d.ts.map
|