@epilot/app-client 0.3.0 → 0.3.2

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,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=n(t(466));r.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":{"get":{"operationId":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}}},"/v1/app-configurations/{appId}/bundle":{"post":{"operationId":"createBundleUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateBundlePresignedRequest"},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoPresignedRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listAppVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/PatchVersionRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"responses":{}}},"/v1/app":{"get":{"operationId":"listInstallations","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstallation","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"post":{"operationId":"install","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"patch":{"operationId":"patchInstallation","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"delete":{"operationId":"uninstall","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"CreateLogoPresignedRequest":{"required":true,"content":{"application/json":{}}},"CreateBundlePresignedRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"PatchVersionRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallRequest":{"content":{"application/json":{}}}}}}')}},r={},t=function t(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={exports:{}};return e[n].call(o.exports,o,o.exports,t),o.exports}(187),n=exports;for(var a in t)n[a]=t[a];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.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":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}}},"/v1/app-configurations/{appId}/bundle":{"post":{"operationId":"createBundleUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateBundlePresignedRequest"},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoPresignedRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components":{"post":{"operationId":"createComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components/{componentId}":{"patch":{"operationId":"patchComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}},"delete":{"operationId":"deleteComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"responses":{}}},"/v1/app":{"get":{"operationId":"listInstallations","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstallation","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"post":{"operationId":"install","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"patch":{"operationId":"patchInstallation","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"delete":{"operationId":"uninstall","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"CreateLogoPresignedRequest":{"required":true,"content":{"application/json":{}}},"CreateBundlePresignedRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"UpsertComponentRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallRequest":{"content":{"application/json":{}}}}}}')}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(187),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
@@ -99,7 +99,7 @@
99
99
  },
100
100
  "/v1/app-configurations/{appId}/versions": {
101
101
  "get": {
102
- "operationId": "listAppVersions",
102
+ "operationId": "listVersions",
103
103
  "parameters": [
104
104
  {
105
105
  "name": "appId",
@@ -150,9 +150,32 @@
150
150
  }
151
151
  ],
152
152
  "responses": {}
153
- },
153
+ }
154
+ },
155
+ "/v1/app-configurations/{appId}/versions/{version}/components": {
156
+ "post": {
157
+ "operationId": "createComponent",
158
+ "parameters": [
159
+ {
160
+ "name": "appId",
161
+ "in": "path",
162
+ "required": true
163
+ },
164
+ {
165
+ "name": "version",
166
+ "in": "path",
167
+ "required": true
168
+ }
169
+ ],
170
+ "requestBody": {
171
+ "$ref": "#/components/requestBodies/UpsertComponentRequest"
172
+ },
173
+ "responses": {}
174
+ }
175
+ },
176
+ "/v1/app-configurations/{appId}/versions/{version}/components/{componentId}": {
154
177
  "patch": {
155
- "operationId": "patchVersion",
178
+ "operationId": "patchComponent",
156
179
  "parameters": [
157
180
  {
158
181
  "name": "appId",
@@ -163,12 +186,38 @@
163
186
  "name": "version",
164
187
  "in": "path",
165
188
  "required": true
189
+ },
190
+ {
191
+ "name": "componentId",
192
+ "in": "path",
193
+ "required": true
166
194
  }
167
195
  ],
168
196
  "requestBody": {
169
- "$ref": "#/components/requestBodies/PatchVersionRequest"
197
+ "$ref": "#/components/requestBodies/UpsertComponentRequest"
170
198
  },
171
199
  "responses": {}
200
+ },
201
+ "delete": {
202
+ "operationId": "deleteComponent",
203
+ "parameters": [
204
+ {
205
+ "name": "appId",
206
+ "in": "path",
207
+ "required": true
208
+ },
209
+ {
210
+ "name": "version",
211
+ "in": "path",
212
+ "required": true
213
+ },
214
+ {
215
+ "name": "componentId",
216
+ "in": "path",
217
+ "required": true
218
+ }
219
+ ],
220
+ "responses": {}
172
221
  }
173
222
  },
174
223
  "/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}": {
@@ -309,7 +358,7 @@
309
358
  "application/json": {}
310
359
  }
311
360
  },
312
- "PatchVersionRequest": {
361
+ "UpsertComponentRequest": {
313
362
  "required": true,
314
363
  "content": {
315
364
  "application/json": {}
package/dist/openapi.d.ts CHANGED
@@ -71,12 +71,7 @@ declare namespace Components {
71
71
  */
72
72
  support_email?: string;
73
73
  }
74
- export interface PatchVersionRequest {
75
- /**
76
- * Updated full list of app components
77
- */
78
- components: Schemas.BaseComponent[];
79
- }
74
+ export type UpsertComponentRequest = Schemas.BaseComponent;
80
75
  }
81
76
  namespace Schemas {
82
77
  export interface Audit {
@@ -691,6 +686,14 @@ declare namespace Paths {
691
686
  export type RequestBody = Components.RequestBodies.CreateBundlePresignedRequest;
692
687
  namespace Responses {
693
688
  export interface $200 {
689
+ /**
690
+ * ID of the journye block component
691
+ */
692
+ component_id?: string;
693
+ /**
694
+ * URL of the web component object
695
+ */
696
+ component_url?: string;
694
697
  /**
695
698
  * Presigned S3 URL for uploading the bundle
696
699
  */
@@ -705,6 +708,25 @@ declare namespace Paths {
705
708
  }
706
709
  }
707
710
  }
711
+ namespace CreateComponent {
712
+ namespace Parameters {
713
+ export type AppId = string;
714
+ export type Version = string;
715
+ }
716
+ export interface PathParameters {
717
+ appId: Parameters.AppId;
718
+ version: Parameters.Version;
719
+ }
720
+ export type RequestBody = Components.RequestBodies.UpsertComponentRequest;
721
+ namespace Responses {
722
+ export interface $204 {
723
+ }
724
+ export interface $400 {
725
+ }
726
+ export interface $404 {
727
+ }
728
+ }
729
+ }
708
730
  namespace CreateConfiguration {
709
731
  export type RequestBody = Components.RequestBodies.CreateConfigRequest;
710
732
  namespace Responses {
@@ -731,6 +753,24 @@ declare namespace Paths {
731
753
  }
732
754
  }
733
755
  }
756
+ namespace DeleteComponent {
757
+ namespace Parameters {
758
+ export type AppId = string;
759
+ export type ComponentId = string;
760
+ export type Version = string;
761
+ }
762
+ export interface PathParameters {
763
+ appId: Parameters.AppId;
764
+ version: Parameters.Version;
765
+ componentId: Parameters.ComponentId;
766
+ }
767
+ namespace Responses {
768
+ export interface $204 {
769
+ }
770
+ export interface $404 {
771
+ }
772
+ }
773
+ }
734
774
  namespace DeleteLogo {
735
775
  namespace Responses {
736
776
  export interface $204 {
@@ -815,22 +855,18 @@ declare namespace Paths {
815
855
  }
816
856
  }
817
857
  }
818
- namespace ListAppVersions {
858
+ namespace ListConfigurations {
819
859
  namespace Parameters {
820
- export type AppId = string;
821
860
  export type Page = number;
822
861
  export type PageSize = number;
823
862
  }
824
- export interface PathParameters {
825
- appId: Parameters.AppId;
826
- }
827
863
  export interface QueryParameters {
828
864
  page?: Parameters.Page;
829
865
  pageSize?: Parameters.PageSize;
830
866
  }
831
867
  namespace Responses {
832
868
  export interface $200 {
833
- versions?: /* Configuration data about your app which is versionable */ Components.Schemas.ConfigurationVersion[];
869
+ configurations?: /* Basic metadata about your app configuration which does not get versioned */ Components.Schemas.ConfigurationMetadata[];
834
870
  pagination?: {
835
871
  total?: number;
836
872
  page?: number;
@@ -839,18 +875,22 @@ declare namespace Paths {
839
875
  }
840
876
  }
841
877
  }
842
- namespace ListConfigurations {
878
+ namespace ListInstallations {
843
879
  namespace Parameters {
880
+ export type ComponentType = /* Type of app component */ Components.Schemas.ComponentType;
881
+ export type Enabled = boolean;
844
882
  export type Page = number;
845
883
  export type PageSize = number;
846
884
  }
847
885
  export interface QueryParameters {
886
+ componentType?: Parameters.ComponentType;
887
+ enabled?: Parameters.Enabled;
848
888
  page?: Parameters.Page;
849
889
  pageSize?: Parameters.PageSize;
850
890
  }
851
891
  namespace Responses {
852
892
  export interface $200 {
853
- configurations?: /* Basic metadata about your app configuration which does not get versioned */ Components.Schemas.ConfigurationMetadata[];
893
+ apps?: /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation[];
854
894
  pagination?: {
855
895
  total?: number;
856
896
  page?: number;
@@ -859,22 +899,22 @@ declare namespace Paths {
859
899
  }
860
900
  }
861
901
  }
862
- namespace ListInstallations {
902
+ namespace ListVersions {
863
903
  namespace Parameters {
864
- export type ComponentType = /* Type of app component */ Components.Schemas.ComponentType;
865
- export type Enabled = boolean;
904
+ export type AppId = string;
866
905
  export type Page = number;
867
906
  export type PageSize = number;
868
907
  }
908
+ export interface PathParameters {
909
+ appId: Parameters.AppId;
910
+ }
869
911
  export interface QueryParameters {
870
- componentType?: Parameters.ComponentType;
871
- enabled?: Parameters.Enabled;
872
912
  page?: Parameters.Page;
873
913
  pageSize?: Parameters.PageSize;
874
914
  }
875
915
  namespace Responses {
876
916
  export interface $200 {
877
- apps?: /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation[];
917
+ versions?: /* Configuration data about your app which is versionable */ Components.Schemas.ConfigurationVersion[];
878
918
  pagination?: {
879
919
  total?: number;
880
920
  page?: number;
@@ -883,44 +923,46 @@ declare namespace Paths {
883
923
  }
884
924
  }
885
925
  }
886
- namespace PatchInstallation {
926
+ namespace PatchComponent {
887
927
  namespace Parameters {
888
928
  export type AppId = string;
929
+ export type ComponentId = string;
930
+ export type Version = string;
889
931
  }
890
932
  export interface PathParameters {
891
933
  appId: Parameters.AppId;
934
+ version: Parameters.Version;
935
+ componentId: Parameters.ComponentId;
892
936
  }
893
- export type RequestBody = Components.RequestBodies.InstallRequest;
937
+ export type RequestBody = Components.RequestBodies.UpsertComponentRequest;
894
938
  namespace Responses {
895
939
  export interface $204 {
896
940
  }
897
- export interface $404 {
898
- }
899
- }
900
- }
901
- namespace PatchMetadata {
902
- export type RequestBody = Components.RequestBodies.PatchConfigMetadataRequest;
903
- namespace Responses {
904
- export interface $204 {
941
+ export interface $400 {
905
942
  }
906
943
  export interface $404 {
907
944
  }
908
945
  }
909
946
  }
910
- namespace PatchVersion {
947
+ namespace PatchInstallation {
911
948
  namespace Parameters {
912
949
  export type AppId = string;
913
- export type Version = string;
914
950
  }
915
951
  export interface PathParameters {
916
952
  appId: Parameters.AppId;
917
- version: Parameters.Version;
918
953
  }
919
- export type RequestBody = Components.RequestBodies.PatchVersionRequest;
954
+ export type RequestBody = Components.RequestBodies.InstallRequest;
920
955
  namespace Responses {
921
956
  export interface $204 {
922
957
  }
923
- export interface $400 {
958
+ export interface $404 {
959
+ }
960
+ }
961
+ }
962
+ namespace PatchMetadata {
963
+ export type RequestBody = Components.RequestBodies.PatchConfigMetadataRequest;
964
+ namespace Responses {
965
+ export interface $204 {
924
966
  }
925
967
  export interface $404 {
926
968
  }
@@ -1047,15 +1089,15 @@ export interface OperationMethods {
1047
1089
  config?: AxiosRequestConfig
1048
1090
  ): OperationResponse<Paths.DeleteLogo.Responses.$204>
1049
1091
  /**
1050
- * listAppVersions - listVersions
1092
+ * listVersions - listVersions
1051
1093
  *
1052
1094
  * Retrieve a list of versions for an app configuration
1053
1095
  */
1054
- 'listAppVersions'(
1055
- parameters?: Parameters<Paths.ListAppVersions.QueryParameters & Paths.ListAppVersions.PathParameters> | null,
1096
+ 'listVersions'(
1097
+ parameters?: Parameters<Paths.ListVersions.QueryParameters & Paths.ListVersions.PathParameters> | null,
1056
1098
  data?: any,
1057
1099
  config?: AxiosRequestConfig
1058
- ): OperationResponse<Paths.ListAppVersions.Responses.$200>
1100
+ ): OperationResponse<Paths.ListVersions.Responses.$200>
1059
1101
  /**
1060
1102
  * getVersion - getVersion
1061
1103
  *
@@ -1066,16 +1108,6 @@ export interface OperationMethods {
1066
1108
  data?: any,
1067
1109
  config?: AxiosRequestConfig
1068
1110
  ): OperationResponse<Paths.GetVersion.Responses.$200>
1069
- /**
1070
- * patchVersion - patchVersion
1071
- *
1072
- * Patch version specific data of a configuration
1073
- */
1074
- 'patchVersion'(
1075
- parameters?: Parameters<Paths.PatchVersion.PathParameters> | null,
1076
- data?: Paths.PatchVersion.RequestBody,
1077
- config?: AxiosRequestConfig
1078
- ): OperationResponse<Paths.PatchVersion.Responses.$204>
1079
1111
  /**
1080
1112
  * deleteVersion - deleteVersion
1081
1113
  *
@@ -1086,6 +1118,36 @@ export interface OperationMethods {
1086
1118
  data?: any,
1087
1119
  config?: AxiosRequestConfig
1088
1120
  ): OperationResponse<Paths.DeleteVersion.Responses.$204>
1121
+ /**
1122
+ * createComponent - createComponent
1123
+ *
1124
+ * Patch an existing app version to create/add a component
1125
+ */
1126
+ 'createComponent'(
1127
+ parameters?: Parameters<Paths.CreateComponent.PathParameters> | null,
1128
+ data?: Paths.CreateComponent.RequestBody,
1129
+ config?: AxiosRequestConfig
1130
+ ): OperationResponse<Paths.CreateComponent.Responses.$204>
1131
+ /**
1132
+ * patchComponent - patchComponent
1133
+ *
1134
+ * Patch an existing app version to update its components
1135
+ */
1136
+ 'patchComponent'(
1137
+ parameters?: Parameters<Paths.PatchComponent.PathParameters> | null,
1138
+ data?: Paths.PatchComponent.RequestBody,
1139
+ config?: AxiosRequestConfig
1140
+ ): OperationResponse<Paths.PatchComponent.Responses.$204>
1141
+ /**
1142
+ * deleteComponent - deleteComponent
1143
+ *
1144
+ * Delete a specific component from an app version
1145
+ */
1146
+ 'deleteComponent'(
1147
+ parameters?: Parameters<Paths.DeleteComponent.PathParameters> | null,
1148
+ data?: any,
1149
+ config?: AxiosRequestConfig
1150
+ ): OperationResponse<Paths.DeleteComponent.Responses.$204>
1089
1151
  /**
1090
1152
  * cloneVersion - cloneVersion
1091
1153
  *
@@ -1239,15 +1301,15 @@ export interface PathsDictionary {
1239
1301
  }
1240
1302
  ['/v1/app-configurations/{appId}/versions']: {
1241
1303
  /**
1242
- * listAppVersions - listVersions
1304
+ * listVersions - listVersions
1243
1305
  *
1244
1306
  * Retrieve a list of versions for an app configuration
1245
1307
  */
1246
1308
  'get'(
1247
- parameters?: Parameters<Paths.ListAppVersions.QueryParameters & Paths.ListAppVersions.PathParameters> | null,
1309
+ parameters?: Parameters<Paths.ListVersions.QueryParameters & Paths.ListVersions.PathParameters> | null,
1248
1310
  data?: any,
1249
1311
  config?: AxiosRequestConfig
1250
- ): OperationResponse<Paths.ListAppVersions.Responses.$200>
1312
+ ): OperationResponse<Paths.ListVersions.Responses.$200>
1251
1313
  }
1252
1314
  ['/v1/app-configurations/{appId}/versions/{version}']: {
1253
1315
  /**
@@ -1270,16 +1332,40 @@ export interface PathsDictionary {
1270
1332
  data?: any,
1271
1333
  config?: AxiosRequestConfig
1272
1334
  ): OperationResponse<Paths.DeleteVersion.Responses.$204>
1335
+ }
1336
+ ['/v1/app-configurations/{appId}/versions/{version}/components']: {
1273
1337
  /**
1274
- * patchVersion - patchVersion
1338
+ * createComponent - createComponent
1275
1339
  *
1276
- * Patch version specific data of a configuration
1340
+ * Patch an existing app version to create/add a component
1341
+ */
1342
+ 'post'(
1343
+ parameters?: Parameters<Paths.CreateComponent.PathParameters> | null,
1344
+ data?: Paths.CreateComponent.RequestBody,
1345
+ config?: AxiosRequestConfig
1346
+ ): OperationResponse<Paths.CreateComponent.Responses.$204>
1347
+ }
1348
+ ['/v1/app-configurations/{appId}/versions/{version}/components/{componentId}']: {
1349
+ /**
1350
+ * patchComponent - patchComponent
1351
+ *
1352
+ * Patch an existing app version to update its components
1277
1353
  */
1278
1354
  'patch'(
1279
- parameters?: Parameters<Paths.PatchVersion.PathParameters> | null,
1280
- data?: Paths.PatchVersion.RequestBody,
1355
+ parameters?: Parameters<Paths.PatchComponent.PathParameters> | null,
1356
+ data?: Paths.PatchComponent.RequestBody,
1357
+ config?: AxiosRequestConfig
1358
+ ): OperationResponse<Paths.PatchComponent.Responses.$204>
1359
+ /**
1360
+ * deleteComponent - deleteComponent
1361
+ *
1362
+ * Delete a specific component from an app version
1363
+ */
1364
+ 'delete'(
1365
+ parameters?: Parameters<Paths.DeleteComponent.PathParameters> | null,
1366
+ data?: any,
1281
1367
  config?: AxiosRequestConfig
1282
- ): OperationResponse<Paths.PatchVersion.Responses.$204>
1368
+ ): OperationResponse<Paths.DeleteComponent.Responses.$204>
1283
1369
  }
1284
1370
  ['/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}']: {
1285
1371
  /**
package/dist/openapi.json CHANGED
@@ -200,6 +200,14 @@
200
200
  "upload_url"
201
201
  ],
202
202
  "properties": {
203
+ "component_id": {
204
+ "type": "string",
205
+ "description": "ID of the journye block component"
206
+ },
207
+ "component_url": {
208
+ "type": "string",
209
+ "description": "URL of the web component object"
210
+ },
203
211
  "upload_url": {
204
212
  "type": "string",
205
213
  "description": "Presigned S3 URL for uploading the bundle"
@@ -293,7 +301,7 @@
293
301
  "get": {
294
302
  "summary": "listVersions",
295
303
  "description": "Retrieve a list of versions for an app configuration",
296
- "operationId": "listAppVersions",
304
+ "operationId": "listVersions",
297
305
  "parameters": [
298
306
  {
299
307
  "name": "appId",
@@ -438,11 +446,13 @@
438
446
  "description": "Version is in use by installations"
439
447
  }
440
448
  }
441
- },
442
- "patch": {
443
- "summary": "patchVersion",
444
- "description": "Patch version specific data of a configuration",
445
- "operationId": "patchVersion",
449
+ }
450
+ },
451
+ "/v1/app-configurations/{appId}/versions/{version}/components": {
452
+ "post": {
453
+ "summary": "createComponent",
454
+ "description": "Patch an existing app version to create/add a component",
455
+ "operationId": "createComponent",
446
456
  "parameters": [
447
457
  {
448
458
  "name": "appId",
@@ -464,11 +474,11 @@
464
474
  }
465
475
  ],
466
476
  "requestBody": {
467
- "$ref": "#/components/requestBodies/PatchVersionRequest"
477
+ "$ref": "#/components/requestBodies/UpsertComponentRequest"
468
478
  },
469
479
  "responses": {
470
480
  "204": {
471
- "description": "Version updated successfully"
481
+ "description": "Component created successfully"
472
482
  },
473
483
  "400": {
474
484
  "description": "Invalid version format"
@@ -479,6 +489,98 @@
479
489
  }
480
490
  }
481
491
  },
492
+ "/v1/app-configurations/{appId}/versions/{version}/components/{componentId}": {
493
+ "patch": {
494
+ "summary": "patchComponent",
495
+ "description": "Patch an existing app version to update its components",
496
+ "operationId": "patchComponent",
497
+ "parameters": [
498
+ {
499
+ "name": "appId",
500
+ "in": "path",
501
+ "required": true,
502
+ "schema": {
503
+ "type": "string"
504
+ },
505
+ "description": "ID of the app configuration"
506
+ },
507
+ {
508
+ "name": "version",
509
+ "in": "path",
510
+ "required": true,
511
+ "schema": {
512
+ "type": "string"
513
+ },
514
+ "description": "Version to update"
515
+ },
516
+ {
517
+ "name": "componentId",
518
+ "in": "path",
519
+ "required": true,
520
+ "schema": {
521
+ "type": "string"
522
+ },
523
+ "description": "ID of the component to update"
524
+ }
525
+ ],
526
+ "requestBody": {
527
+ "$ref": "#/components/requestBodies/UpsertComponentRequest"
528
+ },
529
+ "responses": {
530
+ "204": {
531
+ "description": "Component patched successfully"
532
+ },
533
+ "400": {
534
+ "description": "Invalid version format"
535
+ },
536
+ "404": {
537
+ "description": "Version or component not found"
538
+ }
539
+ }
540
+ },
541
+ "delete": {
542
+ "summary": "deleteComponent",
543
+ "description": "Delete a specific component from an app version",
544
+ "operationId": "deleteComponent",
545
+ "parameters": [
546
+ {
547
+ "name": "appId",
548
+ "in": "path",
549
+ "required": true,
550
+ "schema": {
551
+ "type": "string"
552
+ },
553
+ "description": "ID of the app configuration"
554
+ },
555
+ {
556
+ "name": "version",
557
+ "in": "path",
558
+ "required": true,
559
+ "schema": {
560
+ "type": "string"
561
+ },
562
+ "description": "Version to update"
563
+ },
564
+ {
565
+ "name": "componentId",
566
+ "in": "path",
567
+ "required": true,
568
+ "schema": {
569
+ "type": "string"
570
+ },
571
+ "description": "ID of the component to delete"
572
+ }
573
+ ],
574
+ "responses": {
575
+ "204": {
576
+ "description": "Component deleted successfully"
577
+ },
578
+ "404": {
579
+ "description": "Version or component not found"
580
+ }
581
+ }
582
+ }
583
+ },
482
584
  "/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}": {
483
585
  "post": {
484
586
  "summary": "cloneVersion",
@@ -872,24 +974,12 @@
872
974
  }
873
975
  }
874
976
  },
875
- "PatchVersionRequest": {
977
+ "UpsertComponentRequest": {
876
978
  "required": true,
877
979
  "content": {
878
980
  "application/json": {
879
981
  "schema": {
880
- "type": "object",
881
- "required": [
882
- "components"
883
- ],
884
- "properties": {
885
- "components": {
886
- "type": "array",
887
- "items": {
888
- "$ref": "#/components/schemas/BaseComponent"
889
- },
890
- "description": "Updated full list of app components"
891
- }
892
- }
982
+ "$ref": "#/components/schemas/BaseComponent"
893
983
  }
894
984
  }
895
985
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",