@bosunski/laravel-cloud-sdk 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resources/applications.d.ts +197 -11
- package/dist/resources/applications.js +9 -17
- package/dist/resources/databases.d.ts +283 -35
- package/dist/resources/databases.js +18 -40
- package/dist/resources/deployments.d.ts +330 -24
- package/dist/resources/deployments.js +36 -23
- package/dist/resources/domains.d.ts +202 -9
- package/dist/resources/domains.js +9 -17
- package/dist/resources/environments.d.ts +299 -30
- package/dist/resources/environments.js +15 -31
- package/dist/resources/instances.d.ts +221 -16
- package/dist/resources/instances.js +9 -20
- package/dist/utils/caseConversion.d.ts +20 -0
- package/dist/utils/caseConversion.js +35 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { HttpClient } from '../http/client.js';
|
|
3
|
-
import { JsonApiResponse
|
|
3
|
+
import { JsonApiResponse } from '../types/jsonApi.js';
|
|
4
4
|
declare const domainVerificationMethodSchema: z.ZodEnum<{
|
|
5
5
|
pre_verification: "pre_verification";
|
|
6
6
|
real_time: "real_time";
|
|
@@ -9,21 +9,214 @@ declare const domainRedirectSchema: z.ZodEnum<{
|
|
|
9
9
|
root_to_www: "root_to_www";
|
|
10
10
|
www_to_root: "www_to_root";
|
|
11
11
|
}>;
|
|
12
|
-
|
|
12
|
+
declare const transformedDomainSchema: z.ZodPipe<z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
15
|
+
data: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
19
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
20
|
+
type: z.ZodString;
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
23
|
+
}, z.core.$strip>>]>>;
|
|
24
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
related: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
href: z.ZodOptional<z.ZodString>;
|
|
27
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
28
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
29
|
+
title: z.ZodOptional<z.ZodString>;
|
|
30
|
+
type: z.ZodOptional<z.ZodString>;
|
|
31
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
32
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
33
|
+
}, z.core.$loose>>;
|
|
34
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
href: z.ZodOptional<z.ZodString>;
|
|
36
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
37
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
38
|
+
title: z.ZodOptional<z.ZodString>;
|
|
39
|
+
type: z.ZodOptional<z.ZodString>;
|
|
40
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
41
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
45
|
+
}, z.core.$loose>>>;
|
|
46
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
href: z.ZodOptional<z.ZodString>;
|
|
49
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
50
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
51
|
+
title: z.ZodOptional<z.ZodString>;
|
|
52
|
+
type: z.ZodOptional<z.ZodString>;
|
|
53
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
54
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
58
|
+
type: z.ZodLiteral<"domains">;
|
|
59
|
+
attributes: z.ZodObject<{
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
type: z.ZodString;
|
|
62
|
+
hostname_status: z.ZodString;
|
|
63
|
+
ssl_status: z.ZodString;
|
|
64
|
+
origin_status: z.ZodString;
|
|
65
|
+
redirect: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
|
+
dns_records: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
67
|
+
wildcard: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
68
|
+
www: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
69
|
+
last_verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
created_at: z.ZodString;
|
|
71
|
+
}, z.core.$loose>;
|
|
72
|
+
}, z.core.$loose>, z.ZodTransform<{
|
|
13
73
|
id: string;
|
|
74
|
+
raw: {
|
|
75
|
+
[x: string]: unknown;
|
|
76
|
+
id: string;
|
|
77
|
+
type: "domains";
|
|
78
|
+
attributes: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
name: string;
|
|
81
|
+
type: string;
|
|
82
|
+
hostname_status: string;
|
|
83
|
+
ssl_status: string;
|
|
84
|
+
origin_status: string;
|
|
85
|
+
created_at: string;
|
|
86
|
+
redirect?: string | null | undefined;
|
|
87
|
+
dns_records?: Record<string, any> | undefined;
|
|
88
|
+
wildcard?: Record<string, any> | undefined;
|
|
89
|
+
www?: Record<string, any> | undefined;
|
|
90
|
+
last_verified_at?: string | null | undefined;
|
|
91
|
+
};
|
|
92
|
+
relationships?: Record<string, {
|
|
93
|
+
[x: string]: unknown;
|
|
94
|
+
data?: {
|
|
95
|
+
type: string;
|
|
96
|
+
id: string;
|
|
97
|
+
meta?: Record<string, any> | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
type: string;
|
|
100
|
+
id: string;
|
|
101
|
+
meta?: Record<string, any> | undefined;
|
|
102
|
+
}[] | undefined;
|
|
103
|
+
links?: {
|
|
104
|
+
related?: {
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
href?: string | undefined;
|
|
107
|
+
rel?: string | undefined;
|
|
108
|
+
describedby?: string | undefined;
|
|
109
|
+
title?: string | undefined;
|
|
110
|
+
type?: string | undefined;
|
|
111
|
+
hreflang?: string | undefined;
|
|
112
|
+
meta?: Record<string, any> | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
self?: {
|
|
115
|
+
[x: string]: unknown;
|
|
116
|
+
href?: string | undefined;
|
|
117
|
+
rel?: string | undefined;
|
|
118
|
+
describedby?: string | undefined;
|
|
119
|
+
title?: string | undefined;
|
|
120
|
+
type?: string | undefined;
|
|
121
|
+
hreflang?: string | undefined;
|
|
122
|
+
meta?: Record<string, any> | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
meta?: Record<string, any> | undefined;
|
|
126
|
+
}> | undefined;
|
|
127
|
+
links?: {
|
|
128
|
+
self?: {
|
|
129
|
+
[x: string]: unknown;
|
|
130
|
+
href?: string | undefined;
|
|
131
|
+
rel?: string | undefined;
|
|
132
|
+
describedby?: string | undefined;
|
|
133
|
+
title?: string | undefined;
|
|
134
|
+
type?: string | undefined;
|
|
135
|
+
hreflang?: string | undefined;
|
|
136
|
+
meta?: Record<string, any> | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
meta?: Record<string, any> | undefined;
|
|
140
|
+
};
|
|
14
141
|
name: string;
|
|
15
142
|
type: string;
|
|
16
143
|
hostnameStatus: string;
|
|
17
144
|
sslStatus: string;
|
|
18
145
|
originStatus: string;
|
|
19
|
-
redirect?: string | null;
|
|
20
|
-
lastVerifiedAt?: string | null;
|
|
21
146
|
createdAt: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
147
|
+
redirect?: string | null | undefined;
|
|
148
|
+
dnsRecords?: Record<string, any> | undefined;
|
|
149
|
+
wildcard?: Record<string, any> | undefined;
|
|
150
|
+
www?: Record<string, any> | undefined;
|
|
151
|
+
lastVerifiedAt?: string | null | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
[x: string]: unknown;
|
|
154
|
+
id: string;
|
|
155
|
+
type: "domains";
|
|
156
|
+
attributes: {
|
|
157
|
+
[x: string]: unknown;
|
|
158
|
+
name: string;
|
|
159
|
+
type: string;
|
|
160
|
+
hostname_status: string;
|
|
161
|
+
ssl_status: string;
|
|
162
|
+
origin_status: string;
|
|
163
|
+
created_at: string;
|
|
164
|
+
redirect?: string | null | undefined;
|
|
165
|
+
dns_records?: Record<string, any> | undefined;
|
|
166
|
+
wildcard?: Record<string, any> | undefined;
|
|
167
|
+
www?: Record<string, any> | undefined;
|
|
168
|
+
last_verified_at?: string | null | undefined;
|
|
169
|
+
};
|
|
170
|
+
relationships?: Record<string, {
|
|
171
|
+
[x: string]: unknown;
|
|
172
|
+
data?: {
|
|
173
|
+
type: string;
|
|
174
|
+
id: string;
|
|
175
|
+
meta?: Record<string, any> | undefined;
|
|
176
|
+
} | {
|
|
177
|
+
type: string;
|
|
178
|
+
id: string;
|
|
179
|
+
meta?: Record<string, any> | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
links?: {
|
|
182
|
+
related?: {
|
|
183
|
+
[x: string]: unknown;
|
|
184
|
+
href?: string | undefined;
|
|
185
|
+
rel?: string | undefined;
|
|
186
|
+
describedby?: string | undefined;
|
|
187
|
+
title?: string | undefined;
|
|
188
|
+
type?: string | undefined;
|
|
189
|
+
hreflang?: string | undefined;
|
|
190
|
+
meta?: Record<string, any> | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
self?: {
|
|
193
|
+
[x: string]: unknown;
|
|
194
|
+
href?: string | undefined;
|
|
195
|
+
rel?: string | undefined;
|
|
196
|
+
describedby?: string | undefined;
|
|
197
|
+
title?: string | undefined;
|
|
198
|
+
type?: string | undefined;
|
|
199
|
+
hreflang?: string | undefined;
|
|
200
|
+
meta?: Record<string, any> | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
meta?: Record<string, any> | undefined;
|
|
204
|
+
}> | undefined;
|
|
205
|
+
links?: {
|
|
206
|
+
self?: {
|
|
207
|
+
[x: string]: unknown;
|
|
208
|
+
href?: string | undefined;
|
|
209
|
+
rel?: string | undefined;
|
|
210
|
+
describedby?: string | undefined;
|
|
211
|
+
title?: string | undefined;
|
|
212
|
+
type?: string | undefined;
|
|
213
|
+
hreflang?: string | undefined;
|
|
214
|
+
meta?: Record<string, any> | undefined;
|
|
215
|
+
} | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
meta?: Record<string, any> | undefined;
|
|
218
|
+
}>>;
|
|
219
|
+
export type Domain = z.infer<typeof transformedDomainSchema>;
|
|
27
220
|
export interface ListDomainsOptions {
|
|
28
221
|
include?: Array<'environment'>;
|
|
29
222
|
filter?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createJsonApiCollectionSchema, createJsonApiResponseSchema, JsonApiResourceSchema, } from '../types/jsonApi.js';
|
|
3
|
+
import { keysToCamel } from '../utils/caseConversion.js';
|
|
3
4
|
const domainVerificationMethodSchema = z.enum([
|
|
4
5
|
'pre_verification',
|
|
5
6
|
'real_time',
|
|
@@ -24,26 +25,17 @@ const domainResourceSchema = JsonApiResourceSchema.extend({
|
|
|
24
25
|
type: z.literal('domains'),
|
|
25
26
|
attributes: domainAttributesSchema,
|
|
26
27
|
});
|
|
28
|
+
// Transform resource to camelCase with raw data preserved
|
|
29
|
+
const transformedDomainSchema = domainResourceSchema.transform((data) => ({
|
|
30
|
+
...keysToCamel(data.attributes),
|
|
31
|
+
id: data.id,
|
|
32
|
+
raw: data,
|
|
33
|
+
}));
|
|
27
34
|
const domainResponseSchema = createJsonApiResponseSchema(domainResourceSchema);
|
|
28
35
|
const domainCollectionSchema = createJsonApiCollectionSchema(domainResourceSchema);
|
|
36
|
+
// Simple transformation - schema handles the conversion
|
|
29
37
|
const mapDomain = (resource) => {
|
|
30
|
-
|
|
31
|
-
const { attributes } = parsed;
|
|
32
|
-
return {
|
|
33
|
-
id: parsed.id,
|
|
34
|
-
name: attributes.name,
|
|
35
|
-
type: attributes.type,
|
|
36
|
-
hostnameStatus: attributes.hostname_status,
|
|
37
|
-
sslStatus: attributes.ssl_status,
|
|
38
|
-
originStatus: attributes.origin_status,
|
|
39
|
-
redirect: attributes.redirect ?? null,
|
|
40
|
-
lastVerifiedAt: attributes.last_verified_at ?? null,
|
|
41
|
-
createdAt: attributes.created_at,
|
|
42
|
-
dnsRecords: attributes.dns_records,
|
|
43
|
-
wildcard: attributes.wildcard,
|
|
44
|
-
www: attributes.www,
|
|
45
|
-
raw: parsed,
|
|
46
|
-
};
|
|
38
|
+
return transformedDomainSchema.parse(resource);
|
|
47
39
|
};
|
|
48
40
|
const serializeDomainList = (response) => ({
|
|
49
41
|
data: response.data.map(mapDomain),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { HttpClient } from '../http/client.js';
|
|
3
|
-
import { JsonApiResponse
|
|
3
|
+
import { JsonApiResponse } from '../types/jsonApi.js';
|
|
4
4
|
import type { DeploymentResponse } from './deployments.js';
|
|
5
5
|
declare const colorSchema: z.ZodEnum<{
|
|
6
6
|
blue: "blue";
|
|
@@ -23,34 +23,310 @@ declare const nodeVersionSchema: z.ZodEnum<{
|
|
|
23
23
|
22: "22";
|
|
24
24
|
24: "24";
|
|
25
25
|
}>;
|
|
26
|
-
|
|
27
|
-
key:
|
|
28
|
-
value
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
id:
|
|
32
|
-
disk:
|
|
26
|
+
declare const environmentVariableSchema: z.ZodObject<{
|
|
27
|
+
key: z.ZodString;
|
|
28
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
declare const filesystemKeySchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
disk: z.ZodString;
|
|
33
|
+
is_default_disk: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type EnvironmentVariable = z.infer<typeof environmentVariableSchema>;
|
|
36
|
+
export type FilesystemKey = Omit<z.infer<typeof filesystemKeySchema>, 'is_default_disk'> & {
|
|
33
37
|
isDefaultDisk?: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
38
|
+
};
|
|
39
|
+
declare const transformedLogEntrySchema: z.ZodPipe<z.ZodObject<{
|
|
40
|
+
message: z.ZodString;
|
|
41
|
+
level: z.ZodString;
|
|
42
|
+
type: z.ZodString;
|
|
43
|
+
logged_at: z.ZodString;
|
|
44
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
method: z.ZodOptional<z.ZodString>;
|
|
47
|
+
path: z.ZodOptional<z.ZodString>;
|
|
48
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
bytes_sent: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
51
|
+
user_agent: z.ZodOptional<z.ZodString>;
|
|
52
|
+
country: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
|
+
}, z.core.$loose>, z.ZodTransform<import("../utils/caseConversion.js").KeysToCamelCase<{
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
message: string;
|
|
57
|
+
level: string;
|
|
58
|
+
type: string;
|
|
59
|
+
logged_at: string;
|
|
60
|
+
data?: {
|
|
61
|
+
[x: string]: unknown;
|
|
62
|
+
status?: number | undefined;
|
|
63
|
+
method?: string | undefined;
|
|
64
|
+
path?: string | undefined;
|
|
65
|
+
duration_ms?: number | undefined;
|
|
66
|
+
bytes_sent?: number | undefined;
|
|
67
|
+
ip?: string | undefined;
|
|
68
|
+
user_agent?: string | undefined;
|
|
69
|
+
country?: string | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
}>, {
|
|
72
|
+
[x: string]: unknown;
|
|
73
|
+
message: string;
|
|
74
|
+
level: string;
|
|
75
|
+
type: string;
|
|
76
|
+
logged_at: string;
|
|
77
|
+
data?: {
|
|
78
|
+
[x: string]: unknown;
|
|
79
|
+
status?: number | undefined;
|
|
80
|
+
method?: string | undefined;
|
|
81
|
+
path?: string | undefined;
|
|
82
|
+
duration_ms?: number | undefined;
|
|
83
|
+
bytes_sent?: number | undefined;
|
|
84
|
+
ip?: string | undefined;
|
|
85
|
+
user_agent?: string | undefined;
|
|
86
|
+
country?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
}>>;
|
|
89
|
+
export type EnvironmentLogEntry = z.infer<typeof transformedLogEntrySchema>;
|
|
90
|
+
declare const transformedEnvironmentSchema: z.ZodPipe<z.ZodObject<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
93
|
+
data: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
94
|
+
type: z.ZodString;
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
97
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
98
|
+
type: z.ZodString;
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
101
|
+
}, z.core.$strip>>]>>;
|
|
102
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
related: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
href: z.ZodOptional<z.ZodString>;
|
|
105
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
106
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
107
|
+
title: z.ZodOptional<z.ZodString>;
|
|
108
|
+
type: z.ZodOptional<z.ZodString>;
|
|
109
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
110
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
111
|
+
}, z.core.$loose>>;
|
|
112
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
href: z.ZodOptional<z.ZodString>;
|
|
114
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
115
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
116
|
+
title: z.ZodOptional<z.ZodString>;
|
|
117
|
+
type: z.ZodOptional<z.ZodString>;
|
|
118
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
119
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
120
|
+
}, z.core.$loose>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
123
|
+
}, z.core.$loose>>>;
|
|
124
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
href: z.ZodOptional<z.ZodString>;
|
|
127
|
+
rel: z.ZodOptional<z.ZodString>;
|
|
128
|
+
describedby: z.ZodOptional<z.ZodString>;
|
|
129
|
+
title: z.ZodOptional<z.ZodString>;
|
|
130
|
+
type: z.ZodOptional<z.ZodString>;
|
|
131
|
+
hreflang: z.ZodOptional<z.ZodString>;
|
|
132
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
133
|
+
}, z.core.$loose>>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
136
|
+
type: z.ZodLiteral<"environments">;
|
|
137
|
+
attributes: z.ZodObject<{
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
slug: z.ZodString;
|
|
140
|
+
status: z.ZodString;
|
|
141
|
+
created_at: z.ZodString;
|
|
142
|
+
created_from_automation: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
vanity_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
php_major_version: z.ZodOptional<z.ZodString>;
|
|
145
|
+
build_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
|
+
node_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
+
deploy_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
+
uses_octane: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
uses_hibernation: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
uses_push_to_deploy: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
uses_deploy_hook: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
environment_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
153
|
+
key: z.ZodString;
|
|
154
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
}, z.core.$strip>>>;
|
|
156
|
+
network_settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
157
|
+
}, z.core.$loose>;
|
|
158
|
+
}, z.core.$loose>, z.ZodTransform<{
|
|
36
159
|
id: string;
|
|
160
|
+
raw: {
|
|
161
|
+
[x: string]: unknown;
|
|
162
|
+
id: string;
|
|
163
|
+
type: "environments";
|
|
164
|
+
attributes: {
|
|
165
|
+
[x: string]: unknown;
|
|
166
|
+
name: string;
|
|
167
|
+
slug: string;
|
|
168
|
+
status: string;
|
|
169
|
+
created_at: string;
|
|
170
|
+
created_from_automation?: boolean | undefined;
|
|
171
|
+
vanity_domain?: string | null | undefined;
|
|
172
|
+
php_major_version?: string | undefined;
|
|
173
|
+
build_command?: string | null | undefined;
|
|
174
|
+
node_version?: string | null | undefined;
|
|
175
|
+
deploy_command?: string | null | undefined;
|
|
176
|
+
uses_octane?: boolean | undefined;
|
|
177
|
+
uses_hibernation?: boolean | undefined;
|
|
178
|
+
uses_push_to_deploy?: boolean | undefined;
|
|
179
|
+
uses_deploy_hook?: boolean | undefined;
|
|
180
|
+
environment_variables?: {
|
|
181
|
+
key: string;
|
|
182
|
+
value?: string | null | undefined;
|
|
183
|
+
}[] | undefined;
|
|
184
|
+
network_settings?: Record<string, any> | undefined;
|
|
185
|
+
};
|
|
186
|
+
relationships?: Record<string, {
|
|
187
|
+
[x: string]: unknown;
|
|
188
|
+
data?: {
|
|
189
|
+
type: string;
|
|
190
|
+
id: string;
|
|
191
|
+
meta?: Record<string, any> | undefined;
|
|
192
|
+
} | {
|
|
193
|
+
type: string;
|
|
194
|
+
id: string;
|
|
195
|
+
meta?: Record<string, any> | undefined;
|
|
196
|
+
}[] | undefined;
|
|
197
|
+
links?: {
|
|
198
|
+
related?: {
|
|
199
|
+
[x: string]: unknown;
|
|
200
|
+
href?: string | undefined;
|
|
201
|
+
rel?: string | undefined;
|
|
202
|
+
describedby?: string | undefined;
|
|
203
|
+
title?: string | undefined;
|
|
204
|
+
type?: string | undefined;
|
|
205
|
+
hreflang?: string | undefined;
|
|
206
|
+
meta?: Record<string, any> | undefined;
|
|
207
|
+
} | undefined;
|
|
208
|
+
self?: {
|
|
209
|
+
[x: string]: unknown;
|
|
210
|
+
href?: string | undefined;
|
|
211
|
+
rel?: string | undefined;
|
|
212
|
+
describedby?: string | undefined;
|
|
213
|
+
title?: string | undefined;
|
|
214
|
+
type?: string | undefined;
|
|
215
|
+
hreflang?: string | undefined;
|
|
216
|
+
meta?: Record<string, any> | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
meta?: Record<string, any> | undefined;
|
|
220
|
+
}> | undefined;
|
|
221
|
+
links?: {
|
|
222
|
+
self?: {
|
|
223
|
+
[x: string]: unknown;
|
|
224
|
+
href?: string | undefined;
|
|
225
|
+
rel?: string | undefined;
|
|
226
|
+
describedby?: string | undefined;
|
|
227
|
+
title?: string | undefined;
|
|
228
|
+
type?: string | undefined;
|
|
229
|
+
hreflang?: string | undefined;
|
|
230
|
+
meta?: Record<string, any> | undefined;
|
|
231
|
+
} | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
meta?: Record<string, any> | undefined;
|
|
234
|
+
};
|
|
37
235
|
name: string;
|
|
38
236
|
slug: string;
|
|
39
237
|
status: string;
|
|
40
238
|
createdAt: string;
|
|
41
|
-
createdFromAutomation?: boolean;
|
|
42
|
-
vanityDomain?: string | null;
|
|
43
|
-
phpMajorVersion?: string;
|
|
44
|
-
buildCommand?: string | null;
|
|
45
|
-
nodeVersion?: string | null;
|
|
46
|
-
deployCommand?: string | null;
|
|
47
|
-
usesOctane?: boolean;
|
|
48
|
-
usesHibernation?: boolean;
|
|
49
|
-
usesPushToDeploy?: boolean;
|
|
50
|
-
usesDeployHook?: boolean;
|
|
51
|
-
environmentVariables?:
|
|
52
|
-
|
|
53
|
-
|
|
239
|
+
createdFromAutomation?: boolean | undefined;
|
|
240
|
+
vanityDomain?: string | null | undefined;
|
|
241
|
+
phpMajorVersion?: string | undefined;
|
|
242
|
+
buildCommand?: string | null | undefined;
|
|
243
|
+
nodeVersion?: string | null | undefined;
|
|
244
|
+
deployCommand?: string | null | undefined;
|
|
245
|
+
usesOctane?: boolean | undefined;
|
|
246
|
+
usesHibernation?: boolean | undefined;
|
|
247
|
+
usesPushToDeploy?: boolean | undefined;
|
|
248
|
+
usesDeployHook?: boolean | undefined;
|
|
249
|
+
environmentVariables?: {
|
|
250
|
+
key: string;
|
|
251
|
+
value?: string | null | undefined;
|
|
252
|
+
}[] | undefined;
|
|
253
|
+
networkSettings?: Record<string, any> | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
[x: string]: unknown;
|
|
256
|
+
id: string;
|
|
257
|
+
type: "environments";
|
|
258
|
+
attributes: {
|
|
259
|
+
[x: string]: unknown;
|
|
260
|
+
name: string;
|
|
261
|
+
slug: string;
|
|
262
|
+
status: string;
|
|
263
|
+
created_at: string;
|
|
264
|
+
created_from_automation?: boolean | undefined;
|
|
265
|
+
vanity_domain?: string | null | undefined;
|
|
266
|
+
php_major_version?: string | undefined;
|
|
267
|
+
build_command?: string | null | undefined;
|
|
268
|
+
node_version?: string | null | undefined;
|
|
269
|
+
deploy_command?: string | null | undefined;
|
|
270
|
+
uses_octane?: boolean | undefined;
|
|
271
|
+
uses_hibernation?: boolean | undefined;
|
|
272
|
+
uses_push_to_deploy?: boolean | undefined;
|
|
273
|
+
uses_deploy_hook?: boolean | undefined;
|
|
274
|
+
environment_variables?: {
|
|
275
|
+
key: string;
|
|
276
|
+
value?: string | null | undefined;
|
|
277
|
+
}[] | undefined;
|
|
278
|
+
network_settings?: Record<string, any> | undefined;
|
|
279
|
+
};
|
|
280
|
+
relationships?: Record<string, {
|
|
281
|
+
[x: string]: unknown;
|
|
282
|
+
data?: {
|
|
283
|
+
type: string;
|
|
284
|
+
id: string;
|
|
285
|
+
meta?: Record<string, any> | undefined;
|
|
286
|
+
} | {
|
|
287
|
+
type: string;
|
|
288
|
+
id: string;
|
|
289
|
+
meta?: Record<string, any> | undefined;
|
|
290
|
+
}[] | undefined;
|
|
291
|
+
links?: {
|
|
292
|
+
related?: {
|
|
293
|
+
[x: string]: unknown;
|
|
294
|
+
href?: string | undefined;
|
|
295
|
+
rel?: string | undefined;
|
|
296
|
+
describedby?: string | undefined;
|
|
297
|
+
title?: string | undefined;
|
|
298
|
+
type?: string | undefined;
|
|
299
|
+
hreflang?: string | undefined;
|
|
300
|
+
meta?: Record<string, any> | undefined;
|
|
301
|
+
} | undefined;
|
|
302
|
+
self?: {
|
|
303
|
+
[x: string]: unknown;
|
|
304
|
+
href?: string | undefined;
|
|
305
|
+
rel?: string | undefined;
|
|
306
|
+
describedby?: string | undefined;
|
|
307
|
+
title?: string | undefined;
|
|
308
|
+
type?: string | undefined;
|
|
309
|
+
hreflang?: string | undefined;
|
|
310
|
+
meta?: Record<string, any> | undefined;
|
|
311
|
+
} | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
meta?: Record<string, any> | undefined;
|
|
314
|
+
}> | undefined;
|
|
315
|
+
links?: {
|
|
316
|
+
self?: {
|
|
317
|
+
[x: string]: unknown;
|
|
318
|
+
href?: string | undefined;
|
|
319
|
+
rel?: string | undefined;
|
|
320
|
+
describedby?: string | undefined;
|
|
321
|
+
title?: string | undefined;
|
|
322
|
+
type?: string | undefined;
|
|
323
|
+
hreflang?: string | undefined;
|
|
324
|
+
meta?: Record<string, any> | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
meta?: Record<string, any> | undefined;
|
|
328
|
+
}>>;
|
|
329
|
+
export type Environment = z.infer<typeof transformedEnvironmentSchema>;
|
|
54
330
|
export interface ListEnvironmentsOptions {
|
|
55
331
|
include?: Array<'application' | 'branch' | 'deployments' | 'currentDeployment' | 'primaryDomain' | 'instances'>;
|
|
56
332
|
filter?: {
|
|
@@ -122,13 +398,6 @@ export interface ListEnvironmentLogsOptions {
|
|
|
122
398
|
type?: 'all' | 'application' | 'access';
|
|
123
399
|
cursor?: string;
|
|
124
400
|
}
|
|
125
|
-
export interface EnvironmentLogEntry {
|
|
126
|
-
message: string;
|
|
127
|
-
level: string;
|
|
128
|
-
type: string;
|
|
129
|
-
loggedAt: string;
|
|
130
|
-
data?: Record<string, unknown>;
|
|
131
|
-
}
|
|
132
401
|
export interface EnvironmentLogsResponse {
|
|
133
402
|
data: EnvironmentLogEntry[];
|
|
134
403
|
meta: Record<string, unknown> & {
|