@epilot/app-client 0.0.10 → 0.0.11

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 +1 @@
1
- (()=>{"use strict";var e={187:function(e,p,t){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});var a=r(t(466));p.default=a.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","responses":{}}},"/v1/app":{"get":{"operationId":"listInstalledApps","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstalledApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"put":{"operationId":"installApp","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallAppRequest"},"responses":{}},"delete":{"operationId":"uninstallApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"PublishAppRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},p={},t=function t(r){var a=p[r];if(void 0!==a)return a.exports;var n=p[r]={exports:{}};return e[r].call(n.exports,n,n.exports,t),n.exports}(187),r=exports;for(var a in t)r[a]=t[a];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,r,p){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=t(p(466));r.default=n.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations":{"get":{"operationId":"listAppConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getAppConfigurationVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"responses":{}}},"/v1/app":{"get":{"operationId":"listInstalledApps","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstalledApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"put":{"operationId":"installApp","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallAppRequest"},"responses":{}},"delete":{"operationId":"uninstallApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"PublishAppRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},r={},p=function p(t){var n=r[t];if(void 0!==n)return n.exports;var a=r[t]={exports:{}};return e[t].call(a.exports,a,a.exports,p),a.exports}(187),t=exports;for(var n in p)t[n]=p[n];p.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();
@@ -10,6 +10,22 @@
10
10
  }
11
11
  ],
12
12
  "paths": {
13
+ "/v1/app-configurations": {
14
+ "get": {
15
+ "operationId": "listAppConfigurations",
16
+ "parameters": [
17
+ {
18
+ "name": "page",
19
+ "in": "query"
20
+ },
21
+ {
22
+ "name": "pageSize",
23
+ "in": "query"
24
+ }
25
+ ],
26
+ "responses": {}
27
+ }
28
+ },
13
29
  "/v1/app-configurations/{appId}": {
14
30
  "parameters": [
15
31
  {
@@ -24,6 +40,63 @@
24
40
  "responses": {}
25
41
  }
26
42
  },
43
+ "/v1/app-configurations/{appId}/versions/{version}": {
44
+ "get": {
45
+ "operationId": "getAppConfigurationVersion",
46
+ "parameters": [
47
+ {
48
+ "name": "appId",
49
+ "in": "path",
50
+ "required": true
51
+ },
52
+ {
53
+ "name": "version",
54
+ "in": "path",
55
+ "required": true
56
+ }
57
+ ],
58
+ "responses": {}
59
+ },
60
+ "delete": {
61
+ "operationId": "deleteAppVersion",
62
+ "parameters": [
63
+ {
64
+ "name": "appId",
65
+ "in": "path",
66
+ "required": true
67
+ },
68
+ {
69
+ "name": "version",
70
+ "in": "path",
71
+ "required": true
72
+ }
73
+ ],
74
+ "responses": {}
75
+ }
76
+ },
77
+ "/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}": {
78
+ "post": {
79
+ "operationId": "cloneAppVersion",
80
+ "parameters": [
81
+ {
82
+ "name": "appId",
83
+ "in": "path",
84
+ "required": true
85
+ },
86
+ {
87
+ "name": "sourceVersion",
88
+ "in": "path",
89
+ "required": true
90
+ },
91
+ {
92
+ "name": "targetVersion",
93
+ "in": "path",
94
+ "required": true
95
+ }
96
+ ],
97
+ "responses": {}
98
+ }
99
+ },
27
100
  "/v1/app": {
28
101
  "get": {
29
102
  "operationId": "listInstalledApps",
@@ -85,6 +158,24 @@
85
158
  ],
86
159
  "responses": {}
87
160
  }
161
+ },
162
+ "/v1/app/{appId}/promote-to/{version}": {
163
+ "post": {
164
+ "operationId": "promoteAppVersion",
165
+ "parameters": [
166
+ {
167
+ "name": "appId",
168
+ "in": "path",
169
+ "required": true
170
+ },
171
+ {
172
+ "name": "version",
173
+ "in": "path",
174
+ "required": true
175
+ }
176
+ ],
177
+ "responses": {}
178
+ }
88
179
  }
89
180
  },
90
181
  "components": {
package/dist/openapi.d.ts CHANGED
@@ -34,10 +34,22 @@ declare namespace Components {
34
34
  * URL of the app icon.
35
35
  */
36
36
  icon_url?: string;
37
+ /**
38
+ * Category of the app.
39
+ */
40
+ category?: string;
41
+ /**
42
+ * Flag to indicate if the app is in beta.
43
+ */
44
+ is_beta?: boolean;
37
45
  /**
38
46
  * URL of the app documentation.
39
47
  */
40
48
  documentation_url?: string;
49
+ /**
50
+ * URL of the app homepage.
51
+ */
52
+ homepage_url?: string;
41
53
  description?: TranslatedString;
42
54
  notifications?: NotificationConfig;
43
55
  created_by?: string;
@@ -63,9 +75,17 @@ declare namespace Components {
63
75
  */
64
76
  owner_org_id?: string;
65
77
  /**
66
- * Access level of the app.
78
+ * Flag to indicate if the app is public.
79
+ */
80
+ public?: boolean;
81
+ /**
82
+ * List of available versions of the app
83
+ */
84
+ versions?: string[];
85
+ /**
86
+ * Latest version of the app
67
87
  */
68
- access_level?: "public" | "private";
88
+ latest_version?: string;
69
89
  /**
70
90
  * Unique identifier for the app installation
71
91
  */
@@ -101,10 +121,22 @@ declare namespace Components {
101
121
  * URL of the app icon.
102
122
  */
103
123
  icon_url?: string;
124
+ /**
125
+ * Category of the app.
126
+ */
127
+ category?: string;
128
+ /**
129
+ * Flag to indicate if the app is in beta.
130
+ */
131
+ is_beta?: boolean;
104
132
  /**
105
133
  * URL of the app documentation.
106
134
  */
107
135
  documentation_url?: string;
136
+ /**
137
+ * URL of the app homepage.
138
+ */
139
+ homepage_url?: string;
108
140
  /**
109
141
  * Markdown description of the app.
110
142
  */
@@ -130,9 +162,17 @@ declare namespace Components {
130
162
  */
131
163
  owner_org_id?: string;
132
164
  /**
133
- * Access level of the app.
165
+ * Flag to indicate if the app is public.
166
+ */
167
+ public?: boolean;
168
+ /**
169
+ * List of available versions of the app
134
170
  */
135
- access_level?: "public" | "private";
171
+ versions?: string[];
172
+ /**
173
+ * Latest version of the app
174
+ */
175
+ latest_version?: string;
136
176
  }
137
177
  export interface Author {
138
178
  /**
@@ -418,6 +458,49 @@ declare namespace Components {
418
458
  }
419
459
  }
420
460
  declare namespace Paths {
461
+ namespace CloneAppVersion {
462
+ namespace Parameters {
463
+ export type AppId = string;
464
+ export type SourceVersion = string;
465
+ export type TargetVersion = string;
466
+ }
467
+ export interface PathParameters {
468
+ appId: Parameters.AppId;
469
+ sourceVersion: Parameters.SourceVersion;
470
+ targetVersion: Parameters.TargetVersion;
471
+ }
472
+ namespace Responses {
473
+ export interface $201 {
474
+ app_id?: string;
475
+ version?: string;
476
+ status?: "pending" | "published";
477
+ }
478
+ export interface $400 {
479
+ }
480
+ export interface $404 {
481
+ }
482
+ }
483
+ }
484
+ namespace DeleteAppVersion {
485
+ namespace Parameters {
486
+ export type AppId = string;
487
+ export type Version = string;
488
+ }
489
+ export interface PathParameters {
490
+ appId: Parameters.AppId;
491
+ version: Parameters.Version;
492
+ }
493
+ namespace Responses {
494
+ export interface $204 {
495
+ }
496
+ export interface $400 {
497
+ }
498
+ export interface $404 {
499
+ }
500
+ export interface $409 {
501
+ }
502
+ }
503
+ }
421
504
  namespace GetAppConfiguration {
422
505
  namespace Responses {
423
506
  export type $200 = /* Configuration of the published app */ Components.Schemas.AppConfiguration;
@@ -425,6 +508,21 @@ declare namespace Paths {
425
508
  }
426
509
  }
427
510
  }
511
+ namespace GetAppConfigurationVersion {
512
+ namespace Parameters {
513
+ export type AppId = string;
514
+ export type Version = string;
515
+ }
516
+ export interface PathParameters {
517
+ appId: Parameters.AppId;
518
+ version: Parameters.Version;
519
+ }
520
+ namespace Responses {
521
+ export type $200 = /* Configuration of the published app */ Components.Schemas.AppConfiguration;
522
+ export interface $404 {
523
+ }
524
+ }
525
+ }
428
526
  namespace GetInstalledApp {
429
527
  namespace Parameters {
430
528
  export type AppId = string;
@@ -453,6 +551,26 @@ declare namespace Paths {
453
551
  }
454
552
  }
455
553
  }
554
+ namespace ListAppConfigurations {
555
+ namespace Parameters {
556
+ export type Page = number;
557
+ export type PageSize = number;
558
+ }
559
+ export interface QueryParameters {
560
+ page?: Parameters.Page;
561
+ pageSize?: Parameters.PageSize;
562
+ }
563
+ namespace Responses {
564
+ export interface $200 {
565
+ configurations?: /* Configuration of the published app */ Components.Schemas.AppConfiguration[];
566
+ pagination?: {
567
+ total?: number;
568
+ page?: number;
569
+ pageSize?: number;
570
+ };
571
+ }
572
+ }
573
+ }
456
574
  namespace ListInstalledApps {
457
575
  namespace Parameters {
458
576
  export type ComponentType = /* Type of app component */ Components.Schemas.ComponentType;
@@ -477,6 +595,23 @@ declare namespace Paths {
477
595
  }
478
596
  }
479
597
  }
598
+ namespace PromoteAppVersion {
599
+ namespace Parameters {
600
+ export type AppId = string;
601
+ export type Version = string;
602
+ }
603
+ export interface PathParameters {
604
+ appId: Parameters.AppId;
605
+ version: Parameters.Version;
606
+ }
607
+ namespace Responses {
608
+ export type $200 = /* Information about the installed app */ Components.Schemas.App;
609
+ export interface $400 {
610
+ }
611
+ export interface $404 {
612
+ }
613
+ }
614
+ }
480
615
  namespace UninstallApp {
481
616
  namespace Parameters {
482
617
  export type AppId = string;
@@ -502,6 +637,16 @@ declare namespace Paths {
502
637
  }
503
638
 
504
639
  export interface OperationMethods {
640
+ /**
641
+ * listAppConfigurations - listAppConfigurations
642
+ *
643
+ * List all app configurations owned by an organization
644
+ */
645
+ 'listAppConfigurations'(
646
+ parameters?: Parameters<Paths.ListAppConfigurations.QueryParameters> | null,
647
+ data?: any,
648
+ config?: AxiosRequestConfig
649
+ ): OperationResponse<Paths.ListAppConfigurations.Responses.$200>
505
650
  /**
506
651
  * getAppConfiguration - getAppConfiguration
507
652
  *
@@ -512,6 +657,36 @@ export interface OperationMethods {
512
657
  data?: any,
513
658
  config?: AxiosRequestConfig
514
659
  ): OperationResponse<Paths.GetAppConfiguration.Responses.$200>
660
+ /**
661
+ * getAppConfigurationVersion - getAppConfigurationVersion
662
+ *
663
+ * Retrieve a specific version of an app configuration
664
+ */
665
+ 'getAppConfigurationVersion'(
666
+ parameters?: Parameters<Paths.GetAppConfigurationVersion.PathParameters> | null,
667
+ data?: any,
668
+ config?: AxiosRequestConfig
669
+ ): OperationResponse<Paths.GetAppConfigurationVersion.Responses.$200>
670
+ /**
671
+ * deleteAppVersion - deleteAppVersion
672
+ *
673
+ * Delete a specific version of an app configuration
674
+ */
675
+ 'deleteAppVersion'(
676
+ parameters?: Parameters<Paths.DeleteAppVersion.PathParameters> | null,
677
+ data?: any,
678
+ config?: AxiosRequestConfig
679
+ ): OperationResponse<Paths.DeleteAppVersion.Responses.$204>
680
+ /**
681
+ * cloneAppVersion - cloneAppVersion
682
+ *
683
+ * Clone an existing app version to create a new version
684
+ */
685
+ 'cloneAppVersion'(
686
+ parameters?: Parameters<Paths.CloneAppVersion.PathParameters> | null,
687
+ data?: any,
688
+ config?: AxiosRequestConfig
689
+ ): OperationResponse<Paths.CloneAppVersion.Responses.$201>
515
690
  /**
516
691
  * listInstalledApps - listInstalledApps
517
692
  *
@@ -552,9 +727,31 @@ export interface OperationMethods {
552
727
  data?: any,
553
728
  config?: AxiosRequestConfig
554
729
  ): OperationResponse<Paths.UninstallApp.Responses.$204>
730
+ /**
731
+ * promoteAppVersion - promoteAppVersion
732
+ *
733
+ * Update an installed app to a new version
734
+ */
735
+ 'promoteAppVersion'(
736
+ parameters?: Parameters<Paths.PromoteAppVersion.PathParameters> | null,
737
+ data?: any,
738
+ config?: AxiosRequestConfig
739
+ ): OperationResponse<Paths.PromoteAppVersion.Responses.$200>
555
740
  }
556
741
 
557
742
  export interface PathsDictionary {
743
+ ['/v1/app-configurations']: {
744
+ /**
745
+ * listAppConfigurations - listAppConfigurations
746
+ *
747
+ * List all app configurations owned by an organization
748
+ */
749
+ 'get'(
750
+ parameters?: Parameters<Paths.ListAppConfigurations.QueryParameters> | null,
751
+ data?: any,
752
+ config?: AxiosRequestConfig
753
+ ): OperationResponse<Paths.ListAppConfigurations.Responses.$200>
754
+ }
558
755
  ['/v1/app-configurations/{appId}']: {
559
756
  /**
560
757
  * getAppConfiguration - getAppConfiguration
@@ -567,6 +764,40 @@ export interface PathsDictionary {
567
764
  config?: AxiosRequestConfig
568
765
  ): OperationResponse<Paths.GetAppConfiguration.Responses.$200>
569
766
  }
767
+ ['/v1/app-configurations/{appId}/versions/{version}']: {
768
+ /**
769
+ * getAppConfigurationVersion - getAppConfigurationVersion
770
+ *
771
+ * Retrieve a specific version of an app configuration
772
+ */
773
+ 'get'(
774
+ parameters?: Parameters<Paths.GetAppConfigurationVersion.PathParameters> | null,
775
+ data?: any,
776
+ config?: AxiosRequestConfig
777
+ ): OperationResponse<Paths.GetAppConfigurationVersion.Responses.$200>
778
+ /**
779
+ * deleteAppVersion - deleteAppVersion
780
+ *
781
+ * Delete a specific version of an app configuration
782
+ */
783
+ 'delete'(
784
+ parameters?: Parameters<Paths.DeleteAppVersion.PathParameters> | null,
785
+ data?: any,
786
+ config?: AxiosRequestConfig
787
+ ): OperationResponse<Paths.DeleteAppVersion.Responses.$204>
788
+ }
789
+ ['/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}']: {
790
+ /**
791
+ * cloneAppVersion - cloneAppVersion
792
+ *
793
+ * Clone an existing app version to create a new version
794
+ */
795
+ 'post'(
796
+ parameters?: Parameters<Paths.CloneAppVersion.PathParameters> | null,
797
+ data?: any,
798
+ config?: AxiosRequestConfig
799
+ ): OperationResponse<Paths.CloneAppVersion.Responses.$201>
800
+ }
570
801
  ['/v1/app']: {
571
802
  /**
572
803
  * listInstalledApps - listInstalledApps
@@ -611,6 +842,18 @@ export interface PathsDictionary {
611
842
  config?: AxiosRequestConfig
612
843
  ): OperationResponse<Paths.UninstallApp.Responses.$204>
613
844
  }
845
+ ['/v1/app/{appId}/promote-to/{version}']: {
846
+ /**
847
+ * promoteAppVersion - promoteAppVersion
848
+ *
849
+ * Update an installed app to a new version
850
+ */
851
+ 'post'(
852
+ parameters?: Parameters<Paths.PromoteAppVersion.PathParameters> | null,
853
+ data?: any,
854
+ config?: AxiosRequestConfig
855
+ ): OperationResponse<Paths.PromoteAppVersion.Responses.$200>
856
+ }
614
857
  }
615
858
 
616
859
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
package/dist/openapi.json CHANGED
@@ -22,6 +22,67 @@
22
22
  }
23
23
  ],
24
24
  "paths": {
25
+ "/v1/app-configurations": {
26
+ "get": {
27
+ "summary": "listAppConfigurations",
28
+ "description": "List all app configurations owned by an organization",
29
+ "operationId": "listAppConfigurations",
30
+ "parameters": [
31
+ {
32
+ "name": "page",
33
+ "in": "query",
34
+ "schema": {
35
+ "type": "integer",
36
+ "default": 1
37
+ },
38
+ "description": "Page number for pagination"
39
+ },
40
+ {
41
+ "name": "pageSize",
42
+ "in": "query",
43
+ "schema": {
44
+ "type": "integer",
45
+ "default": 20
46
+ },
47
+ "description": "Number of items per page"
48
+ }
49
+ ],
50
+ "responses": {
51
+ "200": {
52
+ "description": "List of app configurations",
53
+ "content": {
54
+ "application/json": {
55
+ "schema": {
56
+ "type": "object",
57
+ "properties": {
58
+ "configurations": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/components/schemas/AppConfiguration"
62
+ }
63
+ },
64
+ "pagination": {
65
+ "type": "object",
66
+ "properties": {
67
+ "total": {
68
+ "type": "integer"
69
+ },
70
+ "page": {
71
+ "type": "integer"
72
+ },
73
+ "pageSize": {
74
+ "type": "integer"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
25
86
  "/v1/app-configurations/{appId}": {
26
87
  "parameters": [
27
88
  {
@@ -55,6 +116,156 @@
55
116
  }
56
117
  }
57
118
  },
119
+ "/v1/app-configurations/{appId}/versions/{version}": {
120
+ "get": {
121
+ "summary": "getAppConfigurationVersion",
122
+ "description": "Retrieve a specific version of an app configuration",
123
+ "operationId": "getAppConfigurationVersion",
124
+ "parameters": [
125
+ {
126
+ "name": "appId",
127
+ "in": "path",
128
+ "required": true,
129
+ "schema": {
130
+ "type": "string"
131
+ },
132
+ "description": "ID of the app configuration"
133
+ },
134
+ {
135
+ "name": "version",
136
+ "in": "path",
137
+ "required": true,
138
+ "schema": {
139
+ "type": "string"
140
+ },
141
+ "description": "Version of the app configuration to retrieve"
142
+ }
143
+ ],
144
+ "responses": {
145
+ "200": {
146
+ "description": "App configuration for specific version",
147
+ "content": {
148
+ "application/json": {
149
+ "schema": {
150
+ "$ref": "#/components/schemas/AppConfiguration"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "404": {
156
+ "description": "App configuration or version not found"
157
+ }
158
+ }
159
+ },
160
+ "delete": {
161
+ "summary": "deleteAppVersion",
162
+ "description": "Delete a specific version of an app configuration",
163
+ "operationId": "deleteAppVersion",
164
+ "parameters": [
165
+ {
166
+ "name": "appId",
167
+ "in": "path",
168
+ "required": true,
169
+ "schema": {
170
+ "type": "string"
171
+ },
172
+ "description": "ID of the app configuration"
173
+ },
174
+ {
175
+ "name": "version",
176
+ "in": "path",
177
+ "required": true,
178
+ "schema": {
179
+ "type": "string"
180
+ },
181
+ "description": "Version to delete"
182
+ }
183
+ ],
184
+ "responses": {
185
+ "204": {
186
+ "description": "Version deleted successfully"
187
+ },
188
+ "400": {
189
+ "description": "Cannot delete the only remaining version"
190
+ },
191
+ "404": {
192
+ "description": "Version not found"
193
+ },
194
+ "409": {
195
+ "description": "Version is in use by installations"
196
+ }
197
+ }
198
+ }
199
+ },
200
+ "/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}": {
201
+ "post": {
202
+ "summary": "cloneAppVersion",
203
+ "description": "Clone an existing app version to create a new version",
204
+ "operationId": "cloneAppVersion",
205
+ "parameters": [
206
+ {
207
+ "name": "appId",
208
+ "in": "path",
209
+ "required": true,
210
+ "schema": {
211
+ "type": "string"
212
+ },
213
+ "description": "ID of the app configuration"
214
+ },
215
+ {
216
+ "name": "sourceVersion",
217
+ "in": "path",
218
+ "required": true,
219
+ "schema": {
220
+ "type": "string"
221
+ },
222
+ "description": "Source version to clone from"
223
+ },
224
+ {
225
+ "name": "targetVersion",
226
+ "in": "path",
227
+ "required": true,
228
+ "schema": {
229
+ "type": "string"
230
+ },
231
+ "description": "Target version to create"
232
+ }
233
+ ],
234
+ "responses": {
235
+ "201": {
236
+ "description": "New version created successfully",
237
+ "content": {
238
+ "application/json": {
239
+ "schema": {
240
+ "type": "object",
241
+ "properties": {
242
+ "app_id": {
243
+ "type": "string"
244
+ },
245
+ "version": {
246
+ "type": "string"
247
+ },
248
+ "status": {
249
+ "type": "string",
250
+ "enum": [
251
+ "pending",
252
+ "published"
253
+ ]
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
259
+ },
260
+ "400": {
261
+ "description": "Invalid version format or target version already exists"
262
+ },
263
+ "404": {
264
+ "description": "Source version not found"
265
+ }
266
+ }
267
+ }
268
+ },
58
269
  "/v1/app": {
59
270
  "get": {
60
271
  "summary": "listInstalledApps",
@@ -213,6 +424,49 @@
213
424
  }
214
425
  }
215
426
  }
427
+ },
428
+ "/v1/app/{appId}/promote-to/{version}": {
429
+ "post": {
430
+ "summary": "promoteAppVersion",
431
+ "description": "Update an installed app to a new version",
432
+ "operationId": "promoteAppVersion",
433
+ "parameters": [
434
+ {
435
+ "name": "appId",
436
+ "in": "path",
437
+ "required": true,
438
+ "schema": {
439
+ "type": "string"
440
+ }
441
+ },
442
+ {
443
+ "name": "version",
444
+ "in": "path",
445
+ "required": true,
446
+ "schema": {
447
+ "type": "string"
448
+ }
449
+ }
450
+ ],
451
+ "responses": {
452
+ "200": {
453
+ "description": "App successfully promoted to new version",
454
+ "content": {
455
+ "application/json": {
456
+ "schema": {
457
+ "$ref": "#/components/schemas/App"
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "400": {
463
+ "description": "Invalid version or version not available"
464
+ },
465
+ "404": {
466
+ "description": "App installation not found"
467
+ }
468
+ }
469
+ }
216
470
  }
217
471
  },
218
472
  "components": {
@@ -868,7 +1122,8 @@
868
1122
  "description": "Configuration of the published app",
869
1123
  "properties": {
870
1124
  "app_id": {
871
- "type": "string"
1125
+ "type": "string",
1126
+ "readOnly": true
872
1127
  },
873
1128
  "name": {
874
1129
  "$ref": "#/components/schemas/TranslatedString"
@@ -877,10 +1132,23 @@
877
1132
  "type": "string",
878
1133
  "description": "URL of the app icon."
879
1134
  },
1135
+ "category": {
1136
+ "type": "string",
1137
+ "description": "Category of the app."
1138
+ },
1139
+ "is_beta": {
1140
+ "type": "boolean",
1141
+ "description": "Flag to indicate if the app is in beta.",
1142
+ "readOnly": true
1143
+ },
880
1144
  "documentation_url": {
881
1145
  "type": "string",
882
1146
  "description": "URL of the app documentation."
883
1147
  },
1148
+ "homepage_url": {
1149
+ "type": "string",
1150
+ "description": "URL of the app homepage."
1151
+ },
884
1152
  "description": {
885
1153
  "$ref": "#/components/schemas/TranslatedString",
886
1154
  "description": "Markdown description of the app."
@@ -917,7 +1185,8 @@
917
1185
  "enum": [
918
1186
  "published",
919
1187
  "pending"
920
- ]
1188
+ ],
1189
+ "readOnly": true
921
1190
  },
922
1191
  "components": {
923
1192
  "type": "array",
@@ -933,16 +1202,27 @@
933
1202
  },
934
1203
  "owner_org_id": {
935
1204
  "type": "string",
936
- "description": "Organization ID of the app owner, required for private apps"
1205
+ "description": "Organization ID of the app owner, required for private apps",
1206
+ "readOnly": true
937
1207
  },
938
- "access_level": {
1208
+ "public": {
1209
+ "type": "boolean",
1210
+ "default": true,
1211
+ "description": "Flag to indicate if the app is public.",
1212
+ "readOnly": true
1213
+ },
1214
+ "versions": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "type": "string"
1218
+ },
1219
+ "description": "List of available versions of the app",
1220
+ "readOnly": true
1221
+ },
1222
+ "latest_version": {
939
1223
  "type": "string",
940
- "enum": [
941
- "public",
942
- "private"
943
- ],
944
- "default": "public",
945
- "description": "Access level of the app."
1224
+ "description": "Latest version of the app",
1225
+ "readOnly": true
946
1226
  }
947
1227
  }
948
1228
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",