@serve.zone/interfaces 6.0.0 → 6.0.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/changelog.md CHANGED
@@ -3,6 +3,12 @@
3
3
  ## Pending
4
4
 
5
5
 
6
+ ## 2026-05-26 - 6.0.1
7
+
8
+ - add App Store service upgrade contracts (appstore)
9
+ - Adds App Store upgrade preview, operation tracking, start/apply, and progress push request contracts
10
+ - Adds service-level App Store upgrade policy, published ports, and service IDs to related service types
11
+
6
12
  ## 2026-05-25 - 6.0.0
7
13
 
8
14
  ### Breaking Changes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '6.0.0',
6
+ version: '6.0.1',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -160,6 +160,7 @@ export interface IAppStoreInstallRequest {
160
160
  envVars?: Record<string, string>;
161
161
  }
162
162
  export interface IUpgradeableAppStoreService {
163
+ serviceId?: string;
163
164
  serviceName: string;
164
165
  appTemplateId: string;
165
166
  currentVersion: string;
@@ -1,5 +1,6 @@
1
1
  import type { IServiceRessources } from './docker.js';
2
2
  import type { IRegistryTarget } from './registry.js';
3
+ import type { IAppStorePublishedPort } from '../appstore/index.js';
3
4
  export interface IServiceVolume {
4
5
  /** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
5
6
  name?: string;
@@ -26,6 +27,7 @@ export interface IService {
26
27
  deployOnPush?: boolean;
27
28
  appTemplateId?: string;
28
29
  appTemplateVersion?: string;
30
+ appStoreUpgradePolicy?: 'manual' | 'notify' | 'auto';
29
31
  environment: {
30
32
  [key: string]: string;
31
33
  };
@@ -71,6 +73,7 @@ export interface IService {
71
73
  };
72
74
  };
73
75
  volumes?: IServiceVolume[];
76
+ publishedPorts?: IAppStorePublishedPort[];
74
77
  resources?: IServiceRessources;
75
78
  domains: {
76
79
  /**
@@ -2,6 +2,45 @@ import * as plugins from '../plugins.js';
2
2
  import type { IIdentity } from '../data/user.js';
3
3
  import type { IService } from '../data/service.js';
4
4
  import type { IAppStoreApp, IAppStoreAppMeta, IAppStoreInstallRequest, IAppStoreVersionConfig, IUpgradeableAppStoreService } from '../appstore/index.js';
5
+ export type TAppStoreUpgradeStatus = 'running' | 'success' | 'failed';
6
+ export type TAppStoreUpgradeStep = 'queued' | 'validating' | 'migration' | 'applying' | 'updating-service' | 'pushing-config' | 'complete' | 'failed';
7
+ export interface IAppStoreUpgradeChange {
8
+ field: string;
9
+ currentValue: string;
10
+ targetValue: string;
11
+ }
12
+ export interface IAppStoreUpgradePreview {
13
+ serviceId: string;
14
+ serviceName: string;
15
+ appTemplateId: string;
16
+ fromVersion: string;
17
+ targetVersion: string;
18
+ resolvedTargetVersion: string;
19
+ hasMigration: boolean;
20
+ requiresManualReview: boolean;
21
+ changes: IAppStoreUpgradeChange[];
22
+ warnings: string[];
23
+ blockers: string[];
24
+ config: IAppStoreVersionConfig;
25
+ appMeta: IAppStoreAppMeta;
26
+ }
27
+ export interface IAppStoreUpgradeOperation {
28
+ id: string;
29
+ serviceId: string;
30
+ serviceName: string;
31
+ appTemplateId: string;
32
+ fromVersion: string;
33
+ targetVersion: string;
34
+ status: TAppStoreUpgradeStatus;
35
+ step: TAppStoreUpgradeStep;
36
+ progressLines: string[];
37
+ warnings: string[];
38
+ error?: string;
39
+ startedAt: number;
40
+ updatedAt: number;
41
+ completedAt?: number;
42
+ service?: IService;
43
+ }
5
44
  export interface IReq_Any_GetAppStoreTemplates extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_GetAppStoreTemplates> {
6
45
  method: 'getAppStoreTemplates';
7
46
  request: {
@@ -42,3 +81,53 @@ export interface IReq_Any_GetUpgradeableAppStoreServices extends plugins.typedre
42
81
  services: IUpgradeableAppStoreService[];
43
82
  };
44
83
  }
84
+ export interface IReq_Any_GetAppStoreUpgradePreview extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_GetAppStoreUpgradePreview> {
85
+ method: 'getAppStoreUpgradePreview';
86
+ request: {
87
+ identity: IIdentity;
88
+ serviceId: string;
89
+ targetVersion?: string;
90
+ };
91
+ response: {
92
+ preview: IAppStoreUpgradePreview;
93
+ };
94
+ }
95
+ export interface IReq_Any_UpgradeAppStoreService extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_UpgradeAppStoreService> {
96
+ method: 'upgradeAppStoreService';
97
+ request: {
98
+ identity: IIdentity;
99
+ serviceId: string;
100
+ targetVersion: string;
101
+ };
102
+ response: {
103
+ service: IService;
104
+ warnings: string[];
105
+ };
106
+ }
107
+ export interface IReq_Any_StartAppStoreServiceUpgrade extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_StartAppStoreServiceUpgrade> {
108
+ method: 'startAppStoreServiceUpgrade';
109
+ request: {
110
+ identity: IIdentity;
111
+ serviceId: string;
112
+ targetVersion: string;
113
+ };
114
+ response: {
115
+ operation: IAppStoreUpgradeOperation;
116
+ };
117
+ }
118
+ export interface IReq_Any_GetAppStoreUpgradeOperations extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_GetAppStoreUpgradeOperations> {
119
+ method: 'getAppStoreUpgradeOperations';
120
+ request: {
121
+ identity: IIdentity;
122
+ };
123
+ response: {
124
+ operations: IAppStoreUpgradeOperation[];
125
+ };
126
+ }
127
+ export interface IReq_Any_PushAppStoreUpgradeProgress extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_PushAppStoreUpgradeProgress> {
128
+ method: 'pushAppStoreUpgradeProgress';
129
+ request: {
130
+ operation: IAppStoreUpgradeOperation;
131
+ };
132
+ response: Record<string, never>;
133
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '6.0.0',
6
+ version: '6.0.1',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
@@ -181,6 +181,7 @@ export interface IAppStoreInstallRequest {
181
181
  }
182
182
 
183
183
  export interface IUpgradeableAppStoreService {
184
+ serviceId?: string;
184
185
  serviceName: string;
185
186
  appTemplateId: string;
186
187
  currentVersion: string;
@@ -1,5 +1,6 @@
1
1
  import type { IServiceRessources } from './docker.js';
2
2
  import type { IRegistryTarget } from './registry.js';
3
+ import type { IAppStorePublishedPort } from '../appstore/index.js';
3
4
 
4
5
  export interface IServiceVolume {
5
6
  /** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
@@ -28,6 +29,7 @@ export interface IService {
28
29
  deployOnPush?: boolean;
29
30
  appTemplateId?: string;
30
31
  appTemplateVersion?: string;
32
+ appStoreUpgradePolicy?: 'manual' | 'notify' | 'auto';
31
33
  environment: { [key: string]: string };
32
34
  /**
33
35
  * the main secret bundle id, exclusive to the service
@@ -74,6 +76,7 @@ export interface IService {
74
76
  custom?: { [domain: string]: string };
75
77
  };
76
78
  volumes?: IServiceVolume[];
79
+ publishedPorts?: IAppStorePublishedPort[];
77
80
  resources?: IServiceRessources;
78
81
  domains: {
79
82
  /**
@@ -9,6 +9,58 @@ import type {
9
9
  IUpgradeableAppStoreService,
10
10
  } from '../appstore/index.js';
11
11
 
12
+ export type TAppStoreUpgradeStatus = 'running' | 'success' | 'failed';
13
+
14
+ export type TAppStoreUpgradeStep =
15
+ | 'queued'
16
+ | 'validating'
17
+ | 'migration'
18
+ | 'applying'
19
+ | 'updating-service'
20
+ | 'pushing-config'
21
+ | 'complete'
22
+ | 'failed';
23
+
24
+ export interface IAppStoreUpgradeChange {
25
+ field: string;
26
+ currentValue: string;
27
+ targetValue: string;
28
+ }
29
+
30
+ export interface IAppStoreUpgradePreview {
31
+ serviceId: string;
32
+ serviceName: string;
33
+ appTemplateId: string;
34
+ fromVersion: string;
35
+ targetVersion: string;
36
+ resolvedTargetVersion: string;
37
+ hasMigration: boolean;
38
+ requiresManualReview: boolean;
39
+ changes: IAppStoreUpgradeChange[];
40
+ warnings: string[];
41
+ blockers: string[];
42
+ config: IAppStoreVersionConfig;
43
+ appMeta: IAppStoreAppMeta;
44
+ }
45
+
46
+ export interface IAppStoreUpgradeOperation {
47
+ id: string;
48
+ serviceId: string;
49
+ serviceName: string;
50
+ appTemplateId: string;
51
+ fromVersion: string;
52
+ targetVersion: string;
53
+ status: TAppStoreUpgradeStatus;
54
+ step: TAppStoreUpgradeStep;
55
+ progressLines: string[];
56
+ warnings: string[];
57
+ error?: string;
58
+ startedAt: number;
59
+ updatedAt: number;
60
+ completedAt?: number;
61
+ service?: IService;
62
+ }
63
+
12
64
  export interface IReq_Any_GetAppStoreTemplates extends plugins.typedrequestInterfaces.implementsTR<
13
65
  plugins.typedrequestInterfaces.ITypedRequest,
14
66
  IReq_Any_GetAppStoreTemplates
@@ -64,3 +116,73 @@ export interface IReq_Any_GetUpgradeableAppStoreServices extends plugins.typedre
64
116
  services: IUpgradeableAppStoreService[];
65
117
  };
66
118
  }
119
+
120
+ export interface IReq_Any_GetAppStoreUpgradePreview extends plugins.typedrequestInterfaces.implementsTR<
121
+ plugins.typedrequestInterfaces.ITypedRequest,
122
+ IReq_Any_GetAppStoreUpgradePreview
123
+ > {
124
+ method: 'getAppStoreUpgradePreview';
125
+ request: {
126
+ identity: IIdentity;
127
+ serviceId: string;
128
+ targetVersion?: string;
129
+ };
130
+ response: {
131
+ preview: IAppStoreUpgradePreview;
132
+ };
133
+ }
134
+
135
+ export interface IReq_Any_UpgradeAppStoreService extends plugins.typedrequestInterfaces.implementsTR<
136
+ plugins.typedrequestInterfaces.ITypedRequest,
137
+ IReq_Any_UpgradeAppStoreService
138
+ > {
139
+ method: 'upgradeAppStoreService';
140
+ request: {
141
+ identity: IIdentity;
142
+ serviceId: string;
143
+ targetVersion: string;
144
+ };
145
+ response: {
146
+ service: IService;
147
+ warnings: string[];
148
+ };
149
+ }
150
+
151
+ export interface IReq_Any_StartAppStoreServiceUpgrade extends plugins.typedrequestInterfaces.implementsTR<
152
+ plugins.typedrequestInterfaces.ITypedRequest,
153
+ IReq_Any_StartAppStoreServiceUpgrade
154
+ > {
155
+ method: 'startAppStoreServiceUpgrade';
156
+ request: {
157
+ identity: IIdentity;
158
+ serviceId: string;
159
+ targetVersion: string;
160
+ };
161
+ response: {
162
+ operation: IAppStoreUpgradeOperation;
163
+ };
164
+ }
165
+
166
+ export interface IReq_Any_GetAppStoreUpgradeOperations extends plugins.typedrequestInterfaces.implementsTR<
167
+ plugins.typedrequestInterfaces.ITypedRequest,
168
+ IReq_Any_GetAppStoreUpgradeOperations
169
+ > {
170
+ method: 'getAppStoreUpgradeOperations';
171
+ request: {
172
+ identity: IIdentity;
173
+ };
174
+ response: {
175
+ operations: IAppStoreUpgradeOperation[];
176
+ };
177
+ }
178
+
179
+ export interface IReq_Any_PushAppStoreUpgradeProgress extends plugins.typedrequestInterfaces.implementsTR<
180
+ plugins.typedrequestInterfaces.ITypedRequest,
181
+ IReq_Any_PushAppStoreUpgradeProgress
182
+ > {
183
+ method: 'pushAppStoreUpgradeProgress';
184
+ request: {
185
+ operation: IAppStoreUpgradeOperation;
186
+ };
187
+ response: Record<string, never>;
188
+ }