@serve.zone/interfaces 5.0.3 → 5.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.
Files changed (42) hide show
  1. package/dist_ts_interfaces/data/baremetal.d.ts +61 -0
  2. package/dist_ts_interfaces/data/baremetal.js +2 -0
  3. package/dist_ts_interfaces/data/cloudlyconfig.d.ts +0 -2
  4. package/dist_ts_interfaces/data/cluster.d.ts +7 -3
  5. package/dist_ts_interfaces/data/clusternode.d.ts +59 -0
  6. package/dist_ts_interfaces/data/clusternode.js +2 -0
  7. package/dist_ts_interfaces/data/deployment.d.ts +42 -2
  8. package/dist_ts_interfaces/data/index.d.ts +3 -1
  9. package/dist_ts_interfaces/data/index.js +4 -2
  10. package/dist_ts_interfaces/data/service.d.ts +24 -0
  11. package/dist_ts_interfaces/data/settings.d.ts +34 -0
  12. package/dist_ts_interfaces/data/settings.js +2 -0
  13. package/dist_ts_interfaces/platformservice/mta.d.ts +2 -2
  14. package/dist_ts_interfaces/requests/baremetal.d.ts +19 -0
  15. package/dist_ts_interfaces/requests/baremetal.js +2 -0
  16. package/dist_ts_interfaces/requests/cluster.d.ts +1 -0
  17. package/dist_ts_interfaces/requests/deployment.d.ts +96 -0
  18. package/dist_ts_interfaces/requests/deployment.js +2 -0
  19. package/dist_ts_interfaces/requests/index.d.ts +4 -1
  20. package/dist_ts_interfaces/requests/index.js +5 -2
  21. package/dist_ts_interfaces/requests/node.d.ts +29 -0
  22. package/dist_ts_interfaces/requests/node.js +2 -0
  23. package/dist_ts_interfaces/requests/settings.d.ts +49 -0
  24. package/dist_ts_interfaces/requests/settings.js +2 -0
  25. package/package.json +2 -2
  26. package/readme.md +301 -133
  27. package/ts_interfaces/data/baremetal.ts +73 -0
  28. package/ts_interfaces/data/cloudlyconfig.ts +0 -2
  29. package/ts_interfaces/data/cluster.ts +8 -3
  30. package/ts_interfaces/data/clusternode.ts +71 -0
  31. package/ts_interfaces/data/deployment.ts +52 -2
  32. package/ts_interfaces/data/index.ts +4 -2
  33. package/ts_interfaces/data/service.ts +29 -0
  34. package/ts_interfaces/data/settings.ts +56 -0
  35. package/ts_interfaces/platformservice/mta.ts +1 -1
  36. package/ts_interfaces/readme.md +301 -133
  37. package/ts_interfaces/requests/baremetal.ts +22 -0
  38. package/ts_interfaces/requests/cluster.ts +1 -0
  39. package/ts_interfaces/requests/deployment.ts +141 -0
  40. package/ts_interfaces/requests/index.ts +6 -0
  41. package/ts_interfaces/requests/node.ts +33 -0
  42. package/ts_interfaces/requests/settings.ts +59 -0
@@ -1,207 +1,375 @@
1
- # @serve.zone/interfaces
1
+ # @serve.zone/interfaces 📋
2
2
 
3
- interfaces for working with containers
3
+ **TypeScript interfaces for the Cloudly ecosystem.** Type-safe contracts for multi-cloud infrastructure management.
4
4
 
5
- ## Install
5
+ ## 🎯 What is @serve.zone/interfaces?
6
6
 
7
- To install `@serve.zone/interfaces`, run the following command in your terminal:
7
+ This package provides the complete set of TypeScript interfaces that power the Cloudly platform. It ensures type safety and consistency across all components - from API requests to data models, from service definitions to infrastructure configurations.
8
+
9
+ ## ✨ Features
10
+
11
+ - **🔒 Type Safety** - Comprehensive TypeScript interfaces for all Cloudly operations
12
+ - **📦 Modular Structure** - Organized by domain for easy navigation
13
+ - **🔄 Version Compatibility** - Interfaces versioned with the platform
14
+ - **📚 Well Documented** - Each interface includes JSDoc comments
15
+ - **🎭 Multi-Purpose** - Used by API clients, CLI tools, and web interfaces
16
+ - **✅ Validation Ready** - Compatible with runtime type checking libraries
17
+
18
+ ## 🚀 Installation
8
19
 
9
20
  ```bash
10
- npm install @serve.zone/interfaces --save
21
+ pnpm add @serve.zone/interfaces
11
22
  ```
12
23
 
13
- This will add `@serve.zone/interfaces` to your project's dependencies, allowing you to import and use various predefined interfaces that facilitate container operations and interactions within the ServeZone ecosystem.
24
+ ## 🏗️ Interface Categories
14
25
 
15
- ## Usage
26
+ ### 📡 Request/Response Interfaces
16
27
 
17
- The `@serve.zone/interfaces` module provides a robust set of TypeScript interfaces designed to standardize interaction with various services and components in a cloud-native environment. The interfaces are targeted at simplifying the integration process with container orchestration, network configurations, logging, and service definitions. The module is particularly useful if you're working on infrastructure or service orchestration solutions using Node.js and TypeScript.
28
+ Typed contracts for API communication:
18
29
 
19
- This document guides you through a comprehensive use case scenario of `@serve.zone/interfaces`. We will cover how to effectively utilize these interfaces to set up cloud services, manage application configurations, and handle system-related communications. This tutorial will explore various feature sets within the module, focusing on real-world implementations and practical coding strategies.
30
+ ```typescript
31
+ import {
32
+ IRequest_GetAllImages,
33
+ IRequest_CreateCluster,
34
+ IRequest_DeployService
35
+ } from '@serve.zone/interfaces';
36
+
37
+ // Type-safe request
38
+ const request: IRequest_GetAllImages['request'] = {
39
+ identity: userIdentity,
40
+ filters: {
41
+ tag: 'production'
42
+ }
43
+ };
20
44
 
21
- ### Prerequisites
45
+ // Type-safe response
46
+ const response: IRequest_GetAllImages['response'] = {
47
+ images: [...]
48
+ };
49
+ ```
22
50
 
23
- Before diving in, make sure to satisfy the following prerequisites:
51
+ ### 📦 Data Models
24
52
 
25
- - **Node.js**: Ensure you have Node.js installed (preferably the latest LTS version).
26
-
27
- - **TypeScript**: Your environment should support TypeScript, as this module leverages strong typing offered by TypeScript.
28
-
29
- - **Cloud Account Access**: Some of the interfaces interact with live cloud services; thus, ensure you have necessary credentials (like API tokens) available for testing or integration.
53
+ Core data structures for Cloudly entities:
30
54
 
31
- ### Core Interfaces and Scenarios
55
+ ```typescript
56
+ import {
57
+ ICluster,
58
+ IService,
59
+ IImage,
60
+ ISecret,
61
+ IServer
62
+ } from '@serve.zone/interfaces';
63
+
64
+ // Define a service
65
+ const service: IService = {
66
+ id: 'service-123',
67
+ data: {
68
+ name: 'api-service',
69
+ imageId: 'image-456',
70
+ imageVersion: '2.0.0',
71
+ environment: {
72
+ NODE_ENV: 'production'
73
+ },
74
+ scaleFactor: 3,
75
+ balancingStrategy: 'round-robin',
76
+ ports: {
77
+ web: 80,
78
+ metrics: 9090
79
+ },
80
+ domains: [
81
+ { name: 'api.example.com' }
82
+ ],
83
+ deploymentIds: [],
84
+ deploymentDirectiveIds: []
85
+ }
86
+ };
87
+ ```
32
88
 
33
- #### 1. Handling Typed Requests
89
+ ### 🔐 Authentication & Identity
34
90
 
35
- One fundamental aspect is defining typed requests, which standardizes API call definitions across different microservices or components. The module offers interfaces such as `IRequest_GetAllImages`, `IRequest_CreateCluster`, that you can extend or implement within your service logic to ensure strong typing and consistency.
91
+ Identity management interfaces:
36
92
 
37
93
  ```typescript
38
- import { IRequest_GetAllImages } from '@serve.zone/interfaces/requests/image';
94
+ import {
95
+ IIdentity,
96
+ IServiceToken,
97
+ IPermission
98
+ } from '@serve.zone/interfaces';
99
+
100
+ const identity: IIdentity = {
101
+ id: 'user-789',
102
+ name: 'service-account',
103
+ type: 'service',
104
+ permissions: ['cluster:read', 'service:write'],
105
+ tokenHash: 'hashed-token',
106
+ metadata: {
107
+ createdAt: new Date(),
108
+ lastAccess: new Date()
109
+ }
110
+ };
111
+ ```
39
112
 
40
- class ImageService {
41
- private cloudlyClient;
113
+ ### 🌐 Network Configuration
42
114
 
43
- constructor(cloudlyClient: CloudlyApiClient) {
44
- this.cloudlyClient = cloudlyClient;
45
- }
115
+ Networking and routing interfaces:
46
116
 
47
- public async fetchAllImages() {
48
- const request: IRequest_GetAllImages['request'] = {
49
- identity: this.cloudlyClient.identity,
50
- };
51
- const response = await this.cloudlyClient.typedsocketClient.fireTypedRequest<IRequest_GetAllImages>(request);
52
- return response.images;
117
+ ```typescript
118
+ import {
119
+ IReverseProxyConfig,
120
+ IDomainConfig,
121
+ ILoadBalancerConfig
122
+ } from '@serve.zone/interfaces';
123
+
124
+ const proxyConfig: IReverseProxyConfig = {
125
+ domain: 'app.example.com',
126
+ path: '/api',
127
+ serviceAddress: 'http://api-service:3000',
128
+ ssl: true,
129
+ headers: {
130
+ 'X-Real-IP': '$remote_addr'
53
131
  }
54
- }
132
+ };
55
133
  ```
56
134
 
57
- In the above code, we structured a simple function to retrieve all images from a service, assuming the `cloudlyClient` is your authenticated API client. The typed request interface ensures that both the request and response align with the expected types.
135
+ ### 📊 Monitoring & Metrics
58
136
 
59
- #### 2. Logging and Smart Logging Interfaces
60
-
61
- Logging is a crucial aspect of cloud applications. The module provides interfaces to assist in integrating logging systems like `@push.rocks/smartlog-interfaces`.
137
+ Observability interfaces:
62
138
 
63
139
  ```typescript
64
- import { ILogger, ILogConfig } from '@push.rocks/smartlog-interfaces';
140
+ import {
141
+ IServerMetrics,
142
+ IServiceMetrics,
143
+ IClusterHealth
144
+ } from '@serve.zone/interfaces';
145
+
146
+ const metrics: IServerMetrics = {
147
+ serverId: 'server-001',
148
+ cpuUsageInPercent: 65,
149
+ memoryUsageinMB: 3072,
150
+ memoryAvailableInMB: 8192,
151
+ diskUsageInPercent: 40,
152
+ networkInMbps: 100,
153
+ networkOutMbps: 150,
154
+ containerCount: 12,
155
+ containerMetrics: [...]
156
+ };
157
+ ```
65
158
 
66
- class LoggerService {
67
- private logger: ILogger;
159
+ ### 🔒 Secret Management
68
160
 
69
- constructor(logConfig: ILogConfig) {
70
- this.logger = new SmartLogger(logConfig);
71
- }
161
+ Security and credential interfaces:
72
162
 
73
- public logMessage(logPackage: ILogPackage) {
74
- this.logger.log(logPackage);
163
+ ```typescript
164
+ import {
165
+ ISecretGroup,
166
+ ISecretBundle,
167
+ IEncryptedData
168
+ } from '@serve.zone/interfaces';
169
+
170
+ const secretGroup: ISecretGroup = {
171
+ id: 'secrets-123',
172
+ name: 'database-credentials',
173
+ secrets: [
174
+ {
175
+ key: 'DB_HOST',
176
+ value: 'encrypted-value',
177
+ encrypted: true
178
+ },
179
+ {
180
+ key: 'DB_PASSWORD',
181
+ value: 'encrypted-value',
182
+ encrypted: true
183
+ }
184
+ ],
185
+ metadata: {
186
+ environment: 'production',
187
+ service: 'api'
75
188
  }
76
- }
189
+ };
77
190
  ```
78
191
 
79
- This illustrates a logger service utilizing `ILogConfig` to configure and initiate a logging mechanism. You can log structured data using `logPackage`, thus enhancing traceability and debugging efficiency.
80
-
81
- #### 3. Container Service Management
192
+ ## 📚 Common Usage Patterns
82
193
 
83
- Managing containers, particularly when dealing with microservices, can be complex, but interfaces like `IService`, `ICluster`, and `IServer` aid in structuring container service management.
194
+ ### Creating Type-Safe API Clients
84
195
 
85
196
  ```typescript
86
- import { IService } from '@serve.zone/interfaces/data/service';
87
-
88
- function defineService(): IService {
89
- return {
90
- id: 'unique-service-id',
91
- data: {
92
- name: 'my-container-service',
93
- imageId: 'unique-image-id',
94
- imageVersion: '1.0.0',
95
- environment: { KEY: 'VALUE' },
96
- secretBundleId: 'bundle-id',
97
- scaleFactor: 2,
98
- balancingStrategy: 'round-robin',
99
- ports: { web: 80 },
100
- domains: [{ name: 'example.com' }],
101
- deploymentIds: [],
102
- deploymentDirectiveIds: [],
103
- }
104
- };
197
+ import {
198
+ IRequest_CreateService,
199
+ IService
200
+ } from '@serve.zone/interfaces';
201
+
202
+ class ServiceClient {
203
+ async createService(
204
+ serviceData: IService['data']
205
+ ): Promise<IService> {
206
+ const request: IRequest_CreateService['request'] = {
207
+ identity: this.identity,
208
+ serviceData
209
+ };
210
+
211
+ const response = await this.client.send<IRequest_CreateService>(
212
+ 'createService',
213
+ request
214
+ );
215
+
216
+ return response.service;
217
+ }
105
218
  }
106
219
  ```
107
220
 
108
- In the example, a service definition is drafted, encapsulating critical service metadata, including its environment variables, domain configuration, and load balancing strategy. Adhering to `IService` ensures that all necessary service data is encapsulated correctly.
109
-
110
- #### 4. Network Configuration and Routing
111
-
112
- Networking is integral to cloud-native applications. Interfaces in `@serve.zone/interfaces` help shape network interaction patterns.
221
+ ### Validating Incoming Data
113
222
 
114
223
  ```typescript
115
- import { IReverseProxyConfig } from '@serve.zone/interfaces/data/traffic';
224
+ import { ICluster } from '@serve.zone/interfaces';
225
+ import { validateType } from 'your-validation-library';
116
226
 
117
- const proxyConfig: IReverseProxyConfig = {
118
- domain: 'example.com',
119
- path: '/',
120
- serviceAddress: 'http://service:8080',
121
- ssl: true,
122
- };
123
-
124
- function configureProxy() {
125
- // Logic to apply the proxyConfig, potentially using Typedi, Smartclient, or similar libraries.
227
+ function validateClusterData(data: unknown): ICluster {
228
+ if (!validateType<ICluster>(data)) {
229
+ throw new Error('Invalid cluster data');
230
+ }
231
+ return data;
126
232
  }
127
233
  ```
128
234
 
129
- Here, `IReverseProxyConfig` is used to define a reverse proxy for a service. Such configurations are necessary for routing external requests into internal services securely.
235
+ ### Building Configuration Objects
130
236
 
131
- ### Advanced Interface Utilization
237
+ ```typescript
238
+ import {
239
+ ICloudlyConfig,
240
+ IMongoDescriptor
241
+ } from '@serve.zone/interfaces';
242
+
243
+ const config: ICloudlyConfig = {
244
+ cfToken: process.env.CF_TOKEN!,
245
+ hetznerToken: process.env.HETZNER_TOKEN!,
246
+ environment: 'production',
247
+ letsEncryptEmail: 'certs@example.com',
248
+ publicUrl: 'cloudly.example.com',
249
+ publicPort: 443,
250
+ mongoDescriptor: {
251
+ mongoDbUrl: process.env.MONGO_URL!,
252
+ mongoDbName: 'cloudly',
253
+ mongoDbUser: process.env.MONGO_USER!,
254
+ mongoDbPass: process.env.MONGO_PASS!
255
+ }
256
+ };
257
+ ```
132
258
 
133
- #### Monitoring and Metrics Collection
259
+ ## 🎯 Advanced Features
134
260
 
135
- For observability, you can track system metrics using `IServerMetrics` or cluster status interfaces.
261
+ ### Generic Request Handler
136
262
 
137
263
  ```typescript
138
- import { IServerMetrics } from '@serve.zone/interfaces/data/server';
139
-
140
- function reportMetrics(metrics: IServerMetrics) {
141
- console.log(`CPU Usage: ${metrics.cpuUsageInPercent}%`);
142
- console.log(`Memory Usage: ${metrics.memoryUsageinMB}MB`);
264
+ import { ITypedRequest } from '@serve.zone/interfaces';
265
+
266
+ class RequestHandler {
267
+ async handle<T extends ITypedRequest>(
268
+ request: T['request']
269
+ ): Promise<T['response']> {
270
+ // Type-safe request handling
271
+ return this.processRequest(request);
272
+ }
143
273
  }
144
-
145
- const sampleMetrics: IServerMetrics = {
146
- serverId: 'server-123',
147
- cpuUsageInPercent: 45,
148
- memoryUsageinMB: 2048,
149
- memoryAvailableInMB: 4096,
150
- containerCount: 10,
151
- containerMetrics: [],
152
- };
153
-
154
- reportMetrics(sampleMetrics);
155
274
  ```
156
275
 
157
- Implementing such metrics tracking provides insight into performance bottlenecks and helps strategize scaling decisions.
276
+ ### Discriminated Unions
158
277
 
159
- #### Certificate Management
278
+ ```typescript
279
+ import { IDeploymentStatus } from '@serve.zone/interfaces';
280
+
281
+ function handleStatus(status: IDeploymentStatus) {
282
+ switch (status.type) {
283
+ case 'pending':
284
+ console.log('Deployment pending...');
285
+ break;
286
+ case 'running':
287
+ console.log(`Running on ${status.serverId}`);
288
+ break;
289
+ case 'failed':
290
+ console.log(`Failed: ${status.error}`);
291
+ break;
292
+ }
293
+ }
294
+ ```
160
295
 
161
- To handle SSL certificates programmatically, utilize interfaces such as `IRequest_Any_Cloudly_GetCertificateForDomain`.
296
+ ### Extending Interfaces
162
297
 
163
298
  ```typescript
164
- import { IRequest_Any_Cloudly_GetCertificateForDomain } from '@serve.zone/interfaces/requests/certificate';
299
+ import { IService } from '@serve.zone/interfaces';
165
300
 
166
- async function fetchCertificate(cloudlyClient: CloudlyApiClient, domainName: string) {
167
- const request: IRequest_Any_Cloudly_GetCertificateForDomain['request'] = {
168
- identity: cloudlyClient.identity,
169
- domainName: domainName,
170
- type: 'ssl'
301
+ interface IExtendedService extends IService {
302
+ customMetadata: {
303
+ team: string;
304
+ costCenter: string;
305
+ sla: 'standard' | 'premium';
171
306
  };
172
-
173
- return await cloudlyClient.typedsocketClient.fireTypedRequest<IRequest_Any_Cloudly_GetCertificateForDomain>(request);
174
307
  }
175
308
  ```
176
309
 
177
- Managing certificates dynamically via typed requests simplifies deployment and automates the security dimensions of your applications.
310
+ ## 🔄 Version Compatibility
178
311
 
179
- #### Integrating with External Messaging Services
312
+ | @serve.zone/interfaces | @serve.zone/cloudly | @serve.zone/api | @serve.zone/cli |
313
+ |------------------------|---------------------|-----------------|-----------------|
314
+ | 5.x | 5.x | 5.x | 5.x |
315
+ | 4.x | 4.x | 4.x | 4.x |
316
+ | 3.x | 3.x | 3.x | 3.x |
180
317
 
181
- Use `IRequest_SendEmail` to integrate platform services for sending emails:
318
+ ## 📖 Interface Documentation
182
319
 
183
- ```typescript
184
- import { IRequest_SendEmail } from '@serve.zone/interfaces/platformservice/mta';
185
-
186
- async function sendNotification(emailClient: any) {
187
- const emailRequest: IRequest_SendEmail['request'] = {
188
- title: 'Welcome to ServeZone!',
189
- from: 'service@company.com',
190
- to: 'user@example.com',
191
- body: '<h1>Congratulations</h1><p>Your account has been created successfully.</p>',
192
- };
320
+ All interfaces include comprehensive JSDoc comments:
193
321
 
194
- await emailClient.sendEmail(emailRequest);
322
+ ```typescript
323
+ /**
324
+ * Represents a cluster configuration
325
+ * @interface ICluster
326
+ */
327
+ export interface ICluster {
328
+ /**
329
+ * Unique identifier for the cluster
330
+ * @type {string}
331
+ */
332
+ id: string;
333
+
334
+ /**
335
+ * Cluster configuration data
336
+ * @type {IClusterData}
337
+ */
338
+ data: IClusterData;
195
339
  }
196
340
  ```
197
341
 
198
- This approach demonstrates abstracting the email sending functionality using typed interfaces, contributing to code consistency and robustness.
342
+ ## 🛠️ Development Tips
199
343
 
200
- ### Conclusion
344
+ ### Import Organization
201
345
 
202
- The `@serve.zone/interfaces` module equips developers with a set of interfaces tailored for managing containers, orchestrating cloud services, and handling system interactions seamlessly. By applying these interfaces, projects can achieve coherence, reduce coupling, and simplify the integration process across various service domains.
346
+ ```typescript
347
+ // Group imports by category
348
+ import {
349
+ // Data models
350
+ ICluster,
351
+ IService,
352
+ IImage,
353
+
354
+ // Requests
355
+ IRequest_CreateCluster,
356
+ IRequest_DeployService,
357
+
358
+ // Configuration
359
+ ICloudlyConfig,
360
+ IReverseProxyConfig
361
+ } from '@serve.zone/interfaces';
362
+ ```
363
+
364
+ ### Type Guards
203
365
 
204
- Focusing on practical applications, try extending these interfaces to suit additional requirements in your projects. Engage actively with the module community, or contribute new ideas to enhance the breadth and depth of this interface library. Explore the integration patterns showcased here and contribute toward a sophisticated cloud-native development framework.
366
+ ```typescript
367
+ import { IService, ICluster } from '@serve.zone/interfaces';
368
+
369
+ function isService(entity: IService | ICluster): entity is IService {
370
+ return 'imageId' in entity.data;
371
+ }
372
+ ```
205
373
 
206
374
  ## License and Legal Information
207
375
 
@@ -220,4 +388,4 @@ Registered at District court Bremen HRB 35230 HB, Germany
220
388
 
221
389
  For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
222
390
 
223
- By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
391
+ By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
@@ -0,0 +1,22 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type { IBareMetal } from '../data/baremetal.js';
3
+
4
+ export interface IRequest_Any_Cloudly_GetBaremetalServers {
5
+ method: 'getBaremetalServers';
6
+ request: {};
7
+ response: {
8
+ baremetals: IBareMetal[];
9
+ };
10
+ }
11
+
12
+ export interface IRequest_Any_Cloudly_ControlBaremetal {
13
+ method: 'controlBaremetal';
14
+ request: {
15
+ baremetalId: string;
16
+ action: 'powerOn' | 'powerOff' | 'reset';
17
+ };
18
+ response: {
19
+ success: boolean;
20
+ message: string;
21
+ };
22
+ }
@@ -41,6 +41,7 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
41
41
  request: {
42
42
  identity: userInterfaces.IIdentity;
43
43
  clusterName: string;
44
+ setupMode?: 'manual' | 'hetzner' | 'aws' | 'digitalocean';
44
45
  };
45
46
  response: {
46
47
  cluster: clusterInterfaces.ICluster;
@@ -0,0 +1,141 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type { IDeployment } from '../data/deployment.js';
3
+ import type { IIdentity } from '../data/user.js';
4
+
5
+ export interface IReq_Any_Cloudly_GetDeploymentById
6
+ extends plugins.typedrequestInterfaces.implementsTR<
7
+ plugins.typedrequestInterfaces.ITypedRequest,
8
+ IReq_Any_Cloudly_GetDeploymentById
9
+ > {
10
+ method: 'getDeploymentById';
11
+ request: {
12
+ identity: IIdentity;
13
+ deploymentId: string;
14
+ };
15
+ response: {
16
+ deployment: IDeployment;
17
+ };
18
+ }
19
+
20
+ export interface IReq_Any_Cloudly_GetDeployments
21
+ extends plugins.typedrequestInterfaces.implementsTR<
22
+ plugins.typedrequestInterfaces.ITypedRequest,
23
+ IReq_Any_Cloudly_GetDeployments
24
+ > {
25
+ method: 'getDeployments';
26
+ request: {
27
+ identity: IIdentity;
28
+ };
29
+ response: {
30
+ deployments: IDeployment[];
31
+ };
32
+ }
33
+
34
+ export interface IReq_Any_Cloudly_GetDeploymentsByService
35
+ extends plugins.typedrequestInterfaces.implementsTR<
36
+ plugins.typedrequestInterfaces.ITypedRequest,
37
+ IReq_Any_Cloudly_GetDeploymentsByService
38
+ > {
39
+ method: 'getDeploymentsByService';
40
+ request: {
41
+ identity: IIdentity;
42
+ serviceId: string;
43
+ };
44
+ response: {
45
+ deployments: IDeployment[];
46
+ };
47
+ }
48
+
49
+ export interface IReq_Any_Cloudly_GetDeploymentsByNode
50
+ extends plugins.typedrequestInterfaces.implementsTR<
51
+ plugins.typedrequestInterfaces.ITypedRequest,
52
+ IReq_Any_Cloudly_GetDeploymentsByNode
53
+ > {
54
+ method: 'getDeploymentsByNode';
55
+ request: {
56
+ identity: IIdentity;
57
+ nodeId: string;
58
+ };
59
+ response: {
60
+ deployments: IDeployment[];
61
+ };
62
+ }
63
+
64
+ export interface IReq_Any_Cloudly_CreateDeployment
65
+ extends plugins.typedrequestInterfaces.implementsTR<
66
+ plugins.typedrequestInterfaces.ITypedRequest,
67
+ IReq_Any_Cloudly_CreateDeployment
68
+ > {
69
+ method: 'createDeployment';
70
+ request: {
71
+ identity: IIdentity;
72
+ deploymentData: Partial<IDeployment>;
73
+ };
74
+ response: {
75
+ deployment: IDeployment;
76
+ };
77
+ }
78
+
79
+ export interface IReq_Any_Cloudly_UpdateDeployment
80
+ extends plugins.typedrequestInterfaces.implementsTR<
81
+ plugins.typedrequestInterfaces.ITypedRequest,
82
+ IReq_Any_Cloudly_UpdateDeployment
83
+ > {
84
+ method: 'updateDeployment';
85
+ request: {
86
+ identity: IIdentity;
87
+ deploymentId: string;
88
+ deploymentData: Partial<IDeployment>;
89
+ };
90
+ response: {
91
+ deployment: IDeployment;
92
+ };
93
+ }
94
+
95
+ export interface IReq_Any_Cloudly_DeleteDeploymentById
96
+ extends plugins.typedrequestInterfaces.implementsTR<
97
+ plugins.typedrequestInterfaces.ITypedRequest,
98
+ IReq_Any_Cloudly_DeleteDeploymentById
99
+ > {
100
+ method: 'deleteDeploymentById';
101
+ request: {
102
+ identity: IIdentity;
103
+ deploymentId: string;
104
+ };
105
+ response: {
106
+ success: boolean;
107
+ };
108
+ }
109
+
110
+ export interface IReq_Any_Cloudly_RestartDeployment
111
+ extends plugins.typedrequestInterfaces.implementsTR<
112
+ plugins.typedrequestInterfaces.ITypedRequest,
113
+ IReq_Any_Cloudly_RestartDeployment
114
+ > {
115
+ method: 'restartDeployment';
116
+ request: {
117
+ identity: IIdentity;
118
+ deploymentId: string;
119
+ };
120
+ response: {
121
+ success: boolean;
122
+ deployment: IDeployment;
123
+ };
124
+ }
125
+
126
+ export interface IReq_Any_Cloudly_ScaleDeployment
127
+ extends plugins.typedrequestInterfaces.implementsTR<
128
+ plugins.typedrequestInterfaces.ITypedRequest,
129
+ IReq_Any_Cloudly_ScaleDeployment
130
+ > {
131
+ method: 'scaleDeployment';
132
+ request: {
133
+ identity: IIdentity;
134
+ deploymentId: string;
135
+ replicas: number;
136
+ };
137
+ response: {
138
+ success: boolean;
139
+ deployment: IDeployment;
140
+ };
141
+ }