@bosunski/laravel-cloud-sdk 0.1.2 → 0.1.5

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.
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { HttpClient } from '../http/client.js';
3
- import { JsonApiResponse, JsonApiResource } from '../types/jsonApi.js';
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
- export interface Domain {
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
- dnsRecords?: Record<string, unknown>;
23
- wildcard?: Record<string, unknown>;
24
- www?: Record<string, unknown>;
25
- raw: JsonApiResource;
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
- const parsed = domainResourceSchema.parse(resource);
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, JsonApiResource } from '../types/jsonApi.js';
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";
@@ -12,6 +12,18 @@ declare const colorSchema: z.ZodEnum<{
12
12
  cyan: "cyan";
13
13
  gray: "gray";
14
14
  }>;
15
+ declare const environmentStatusSchema: z.ZodEnum<{
16
+ deploying: "deploying";
17
+ running: "running";
18
+ hibernating: "hibernating";
19
+ stopped: "stopped";
20
+ }>;
21
+ declare const phpMajorVersionSchema: z.ZodEnum<{
22
+ 8.2: "8.2";
23
+ 8.3: "8.3";
24
+ 8.4: "8.4";
25
+ 8.5: "8.5";
26
+ }>;
15
27
  declare const phpVersionSchema: z.ZodEnum<{
16
28
  "8.2:1": "8.2:1";
17
29
  "8.3:1": "8.3:1";
@@ -23,34 +35,327 @@ declare const nodeVersionSchema: z.ZodEnum<{
23
35
  22: "22";
24
36
  24: "24";
25
37
  }>;
26
- export interface EnvironmentVariable {
27
- key: string;
28
- value?: string | null;
29
- }
30
- export interface FilesystemKey {
31
- id: string;
32
- disk: string;
38
+ export type EnvironmentStatus = z.infer<typeof environmentStatusSchema>;
39
+ export type PhpMajorVersion = z.infer<typeof phpMajorVersionSchema>;
40
+ export type NodeVersion = z.infer<typeof nodeVersionSchema>;
41
+ declare const environmentVariableSchema: z.ZodObject<{
42
+ key: z.ZodString;
43
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ }, z.core.$strip>;
45
+ declare const filesystemKeySchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ disk: z.ZodString;
48
+ is_default_disk: z.ZodOptional<z.ZodBoolean>;
49
+ }, z.core.$strip>;
50
+ export type EnvironmentVariable = z.infer<typeof environmentVariableSchema>;
51
+ export type FilesystemKey = Omit<z.infer<typeof filesystemKeySchema>, 'is_default_disk'> & {
33
52
  isDefaultDisk?: boolean;
34
- }
35
- export interface Environment {
53
+ };
54
+ declare const transformedLogEntrySchema: z.ZodPipe<z.ZodObject<{
55
+ message: z.ZodString;
56
+ level: z.ZodString;
57
+ type: z.ZodString;
58
+ logged_at: z.ZodString;
59
+ data: z.ZodOptional<z.ZodObject<{
60
+ status: z.ZodOptional<z.ZodNumber>;
61
+ method: z.ZodOptional<z.ZodString>;
62
+ path: z.ZodOptional<z.ZodString>;
63
+ duration_ms: z.ZodOptional<z.ZodNumber>;
64
+ bytes_sent: z.ZodOptional<z.ZodNumber>;
65
+ ip: z.ZodOptional<z.ZodString>;
66
+ user_agent: z.ZodOptional<z.ZodString>;
67
+ country: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$loose>>;
69
+ }, z.core.$loose>, z.ZodTransform<import("../utils/caseConversion.js").KeysToCamelCase<{
70
+ [x: string]: unknown;
71
+ message: string;
72
+ level: string;
73
+ type: string;
74
+ logged_at: string;
75
+ data?: {
76
+ [x: string]: unknown;
77
+ status?: number | undefined;
78
+ method?: string | undefined;
79
+ path?: string | undefined;
80
+ duration_ms?: number | undefined;
81
+ bytes_sent?: number | undefined;
82
+ ip?: string | undefined;
83
+ user_agent?: string | undefined;
84
+ country?: string | undefined;
85
+ } | undefined;
86
+ }>, {
87
+ [x: string]: unknown;
88
+ message: string;
89
+ level: string;
90
+ type: string;
91
+ logged_at: string;
92
+ data?: {
93
+ [x: string]: unknown;
94
+ status?: number | undefined;
95
+ method?: string | undefined;
96
+ path?: string | undefined;
97
+ duration_ms?: number | undefined;
98
+ bytes_sent?: number | undefined;
99
+ ip?: string | undefined;
100
+ user_agent?: string | undefined;
101
+ country?: string | undefined;
102
+ } | undefined;
103
+ }>>;
104
+ export type EnvironmentLogEntry = z.infer<typeof transformedLogEntrySchema>;
105
+ declare const transformedEnvironmentSchema: z.ZodPipe<z.ZodObject<{
106
+ id: z.ZodString;
107
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
108
+ data: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
109
+ type: z.ZodString;
110
+ id: z.ZodString;
111
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
112
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
113
+ type: z.ZodString;
114
+ id: z.ZodString;
115
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
116
+ }, z.core.$strip>>]>>;
117
+ links: z.ZodOptional<z.ZodObject<{
118
+ related: z.ZodOptional<z.ZodObject<{
119
+ href: z.ZodOptional<z.ZodString>;
120
+ rel: z.ZodOptional<z.ZodString>;
121
+ describedby: z.ZodOptional<z.ZodString>;
122
+ title: z.ZodOptional<z.ZodString>;
123
+ type: z.ZodOptional<z.ZodString>;
124
+ hreflang: z.ZodOptional<z.ZodString>;
125
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
126
+ }, z.core.$loose>>;
127
+ self: z.ZodOptional<z.ZodObject<{
128
+ href: z.ZodOptional<z.ZodString>;
129
+ rel: z.ZodOptional<z.ZodString>;
130
+ describedby: z.ZodOptional<z.ZodString>;
131
+ title: z.ZodOptional<z.ZodString>;
132
+ type: z.ZodOptional<z.ZodString>;
133
+ hreflang: z.ZodOptional<z.ZodString>;
134
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
135
+ }, z.core.$loose>>;
136
+ }, z.core.$strip>>;
137
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
138
+ }, z.core.$loose>>>;
139
+ links: z.ZodOptional<z.ZodObject<{
140
+ self: z.ZodOptional<z.ZodObject<{
141
+ href: z.ZodOptional<z.ZodString>;
142
+ rel: z.ZodOptional<z.ZodString>;
143
+ describedby: z.ZodOptional<z.ZodString>;
144
+ title: z.ZodOptional<z.ZodString>;
145
+ type: z.ZodOptional<z.ZodString>;
146
+ hreflang: z.ZodOptional<z.ZodString>;
147
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
148
+ }, z.core.$loose>>;
149
+ }, z.core.$strip>>;
150
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
151
+ type: z.ZodLiteral<"environments">;
152
+ attributes: z.ZodObject<{
153
+ name: z.ZodString;
154
+ slug: z.ZodString;
155
+ status: z.ZodEnum<{
156
+ deploying: "deploying";
157
+ running: "running";
158
+ hibernating: "hibernating";
159
+ stopped: "stopped";
160
+ }>;
161
+ created_at: z.ZodString;
162
+ created_from_automation: z.ZodOptional<z.ZodBoolean>;
163
+ vanity_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
+ php_major_version: z.ZodOptional<z.ZodEnum<{
165
+ 8.2: "8.2";
166
+ 8.3: "8.3";
167
+ 8.4: "8.4";
168
+ 8.5: "8.5";
169
+ }>>;
170
+ build_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ node_version: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
172
+ 20: "20";
173
+ 22: "22";
174
+ 24: "24";
175
+ }>>>;
176
+ deploy_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ uses_octane: z.ZodOptional<z.ZodBoolean>;
178
+ uses_hibernation: z.ZodOptional<z.ZodBoolean>;
179
+ uses_push_to_deploy: z.ZodOptional<z.ZodBoolean>;
180
+ uses_deploy_hook: z.ZodOptional<z.ZodBoolean>;
181
+ environment_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
182
+ key: z.ZodString;
183
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ }, z.core.$strip>>>;
185
+ network_settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
186
+ }, z.core.$loose>;
187
+ }, z.core.$loose>, z.ZodTransform<{
36
188
  id: string;
189
+ raw: {
190
+ [x: string]: unknown;
191
+ id: string;
192
+ type: "environments";
193
+ attributes: {
194
+ [x: string]: unknown;
195
+ name: string;
196
+ slug: string;
197
+ status: "deploying" | "running" | "hibernating" | "stopped";
198
+ created_at: string;
199
+ created_from_automation?: boolean | undefined;
200
+ vanity_domain?: string | null | undefined;
201
+ php_major_version?: "8.2" | "8.3" | "8.4" | "8.5" | undefined;
202
+ build_command?: string | null | undefined;
203
+ node_version?: "20" | "22" | "24" | null | undefined;
204
+ deploy_command?: string | null | undefined;
205
+ uses_octane?: boolean | undefined;
206
+ uses_hibernation?: boolean | undefined;
207
+ uses_push_to_deploy?: boolean | undefined;
208
+ uses_deploy_hook?: boolean | undefined;
209
+ environment_variables?: {
210
+ key: string;
211
+ value?: string | null | undefined;
212
+ }[] | undefined;
213
+ network_settings?: Record<string, any> | undefined;
214
+ };
215
+ relationships?: Record<string, {
216
+ [x: string]: unknown;
217
+ data?: {
218
+ type: string;
219
+ id: string;
220
+ meta?: Record<string, any> | undefined;
221
+ } | {
222
+ type: string;
223
+ id: string;
224
+ meta?: Record<string, any> | undefined;
225
+ }[] | undefined;
226
+ links?: {
227
+ related?: {
228
+ [x: string]: unknown;
229
+ href?: string | undefined;
230
+ rel?: string | undefined;
231
+ describedby?: string | undefined;
232
+ title?: string | undefined;
233
+ type?: string | undefined;
234
+ hreflang?: string | undefined;
235
+ meta?: Record<string, any> | undefined;
236
+ } | undefined;
237
+ self?: {
238
+ [x: string]: unknown;
239
+ href?: string | undefined;
240
+ rel?: string | undefined;
241
+ describedby?: string | undefined;
242
+ title?: string | undefined;
243
+ type?: string | undefined;
244
+ hreflang?: string | undefined;
245
+ meta?: Record<string, any> | undefined;
246
+ } | undefined;
247
+ } | undefined;
248
+ meta?: Record<string, any> | undefined;
249
+ }> | undefined;
250
+ links?: {
251
+ self?: {
252
+ [x: string]: unknown;
253
+ href?: string | undefined;
254
+ rel?: string | undefined;
255
+ describedby?: string | undefined;
256
+ title?: string | undefined;
257
+ type?: string | undefined;
258
+ hreflang?: string | undefined;
259
+ meta?: Record<string, any> | undefined;
260
+ } | undefined;
261
+ } | undefined;
262
+ meta?: Record<string, any> | undefined;
263
+ };
37
264
  name: string;
38
265
  slug: string;
39
- status: string;
266
+ status: "deploying" | "running" | "hibernating" | "stopped";
40
267
  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?: EnvironmentVariable[];
52
- raw: JsonApiResource;
53
- }
268
+ createdFromAutomation?: boolean | undefined;
269
+ vanityDomain?: string | null | undefined;
270
+ phpMajorVersion?: "8.2" | "8.3" | "8.4" | "8.5" | undefined;
271
+ buildCommand?: string | null | undefined;
272
+ nodeVersion?: "20" | "22" | "24" | null | undefined;
273
+ deployCommand?: string | null | undefined;
274
+ usesOctane?: boolean | undefined;
275
+ usesHibernation?: boolean | undefined;
276
+ usesPushToDeploy?: boolean | undefined;
277
+ usesDeployHook?: boolean | undefined;
278
+ environmentVariables?: {
279
+ key: string;
280
+ value?: string | null | undefined;
281
+ }[] | undefined;
282
+ networkSettings?: Record<string, any> | undefined;
283
+ }, {
284
+ [x: string]: unknown;
285
+ id: string;
286
+ type: "environments";
287
+ attributes: {
288
+ [x: string]: unknown;
289
+ name: string;
290
+ slug: string;
291
+ status: "deploying" | "running" | "hibernating" | "stopped";
292
+ created_at: string;
293
+ created_from_automation?: boolean | undefined;
294
+ vanity_domain?: string | null | undefined;
295
+ php_major_version?: "8.2" | "8.3" | "8.4" | "8.5" | undefined;
296
+ build_command?: string | null | undefined;
297
+ node_version?: "20" | "22" | "24" | null | undefined;
298
+ deploy_command?: string | null | undefined;
299
+ uses_octane?: boolean | undefined;
300
+ uses_hibernation?: boolean | undefined;
301
+ uses_push_to_deploy?: boolean | undefined;
302
+ uses_deploy_hook?: boolean | undefined;
303
+ environment_variables?: {
304
+ key: string;
305
+ value?: string | null | undefined;
306
+ }[] | undefined;
307
+ network_settings?: Record<string, any> | undefined;
308
+ };
309
+ relationships?: Record<string, {
310
+ [x: string]: unknown;
311
+ data?: {
312
+ type: string;
313
+ id: string;
314
+ meta?: Record<string, any> | undefined;
315
+ } | {
316
+ type: string;
317
+ id: string;
318
+ meta?: Record<string, any> | undefined;
319
+ }[] | undefined;
320
+ links?: {
321
+ related?: {
322
+ [x: string]: unknown;
323
+ href?: string | undefined;
324
+ rel?: string | undefined;
325
+ describedby?: string | undefined;
326
+ title?: string | undefined;
327
+ type?: string | undefined;
328
+ hreflang?: string | undefined;
329
+ meta?: Record<string, any> | undefined;
330
+ } | undefined;
331
+ self?: {
332
+ [x: string]: unknown;
333
+ href?: string | undefined;
334
+ rel?: string | undefined;
335
+ describedby?: string | undefined;
336
+ title?: string | undefined;
337
+ type?: string | undefined;
338
+ hreflang?: string | undefined;
339
+ meta?: Record<string, any> | undefined;
340
+ } | undefined;
341
+ } | undefined;
342
+ meta?: Record<string, any> | undefined;
343
+ }> | undefined;
344
+ links?: {
345
+ self?: {
346
+ [x: string]: unknown;
347
+ href?: string | undefined;
348
+ rel?: string | undefined;
349
+ describedby?: string | undefined;
350
+ title?: string | undefined;
351
+ type?: string | undefined;
352
+ hreflang?: string | undefined;
353
+ meta?: Record<string, any> | undefined;
354
+ } | undefined;
355
+ } | undefined;
356
+ meta?: Record<string, any> | undefined;
357
+ }>>;
358
+ export type Environment = z.infer<typeof transformedEnvironmentSchema>;
54
359
  export interface ListEnvironmentsOptions {
55
360
  include?: Array<'application' | 'branch' | 'deployments' | 'currentDeployment' | 'primaryDomain' | 'instances'>;
56
361
  filter?: {
@@ -122,13 +427,6 @@ export interface ListEnvironmentLogsOptions {
122
427
  type?: 'all' | 'application' | 'access';
123
428
  cursor?: string;
124
429
  }
125
- export interface EnvironmentLogEntry {
126
- message: string;
127
- level: string;
128
- type: string;
129
- loggedAt: string;
130
- data?: Record<string, unknown>;
131
- }
132
430
  export interface EnvironmentLogsResponse {
133
431
  data: EnvironmentLogEntry[];
134
432
  meta: Record<string, unknown> & {