@epilot/app-client 0.5.2 → 0.5.4

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 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/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"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})})();
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.1.0","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/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"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":{}},"delete":{"operationId":"deleteConfiguration","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":{}},"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/{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":{}}},"PatchVersionRequest":{"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})})();
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.0.3",
2
+ "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "",
5
5
  "version": ""
@@ -78,6 +78,10 @@
78
78
  "$ref": "#/components/requestBodies/PatchConfigMetadataRequest"
79
79
  },
80
80
  "responses": {}
81
+ },
82
+ "delete": {
83
+ "operationId": "deleteConfiguration",
84
+ "responses": {}
81
85
  }
82
86
  },
83
87
  "/v1/app-configurations/{appId}/bundle": {
@@ -170,6 +174,25 @@
170
174
  }
171
175
  ],
172
176
  "responses": {}
177
+ },
178
+ "patch": {
179
+ "operationId": "patchVersion",
180
+ "parameters": [
181
+ {
182
+ "name": "appId",
183
+ "in": "path",
184
+ "required": true
185
+ },
186
+ {
187
+ "name": "version",
188
+ "in": "path",
189
+ "required": true
190
+ }
191
+ ],
192
+ "requestBody": {
193
+ "$ref": "#/components/requestBodies/PatchVersionRequest"
194
+ },
195
+ "responses": {}
173
196
  }
174
197
  },
175
198
  "/v1/app-configurations/{appId}/versions/{version}/components": {
@@ -378,6 +401,12 @@
378
401
  "application/json": {}
379
402
  }
380
403
  },
404
+ "PatchVersionRequest": {
405
+ "required": true,
406
+ "content": {
407
+ "application/json": {}
408
+ }
409
+ },
381
410
  "UpsertComponentRequest": {
382
411
  "required": true,
383
412
  "content": {
package/dist/openapi.d.ts CHANGED
@@ -71,6 +71,13 @@ declare namespace Components {
71
71
  */
72
72
  support_email?: string;
73
73
  }
74
+ export interface PatchVersionRequest {
75
+ /**
76
+ * Name of the role
77
+ */
78
+ role_id?: string | null;
79
+ grants?: /* Required grants for the app in order to call APIs for the installing tenant */ Schemas.Grants;
80
+ }
74
81
  export type UpsertComponentRequest = Schemas.BaseComponent;
75
82
  }
76
83
  namespace Schemas {
@@ -368,6 +375,7 @@ declare namespace Components {
368
375
  * Status of the review process
369
376
  */
370
377
  review_status?: "approved" | "rejected" | "pending";
378
+ role?: Role;
371
379
  version_audit: {
372
380
  /**
373
381
  * Timestamp of the creation
@@ -536,6 +544,7 @@ declare namespace Components {
536
544
  * Status of the review process
537
545
  */
538
546
  review_status?: "approved" | "rejected" | "pending";
547
+ role?: Role;
539
548
  version_audit: {
540
549
  /**
541
550
  * Timestamp of the creation
@@ -654,6 +663,19 @@ declare namespace Components {
654
663
  auth_token_ref?: string;
655
664
  };
656
665
  }
666
+ /**
667
+ * Required grants for the app in order to call APIs for the installing tenant
668
+ */
669
+ export type Grants = {
670
+ /**
671
+ * The action the app can perform
672
+ */
673
+ action: string;
674
+ /**
675
+ * The resource the app can access
676
+ */
677
+ resource?: string;
678
+ }[];
657
679
  /**
658
680
  * Information about the installed app. Has configuration data of the installed version
659
681
  */
@@ -686,6 +708,10 @@ declare namespace Components {
686
708
  * Version of the app that is installed
687
709
  */
688
710
  installed_version: string;
711
+ /**
712
+ * The name of the role the app can use to access APIs
713
+ */
714
+ role?: string;
689
715
  /**
690
716
  * Audit information for the app
691
717
  */
@@ -947,6 +973,7 @@ declare namespace Components {
947
973
  * Version of the app that is installed
948
974
  */
949
975
  version: string;
976
+ role?: Role;
950
977
  /**
951
978
  * Flag to indicate if the app is public.
952
979
  */
@@ -956,6 +983,13 @@ declare namespace Components {
956
983
  */
957
984
  versions?: /* Configuration data about your app which is versionable */ ConfigurationVersion[];
958
985
  }
986
+ export interface Role {
987
+ /**
988
+ * Name of the role
989
+ */
990
+ id?: string;
991
+ grants?: /* Required grants for the app in order to call APIs for the installing tenant */ Grants;
992
+ }
959
993
  export interface S3Reference {
960
994
  /**
961
995
  * The name of the S3 bucket where the JSON file for import is stored.
@@ -1104,6 +1138,14 @@ declare namespace Paths {
1104
1138
  }
1105
1139
  }
1106
1140
  }
1141
+ namespace DeleteConfiguration {
1142
+ namespace Responses {
1143
+ export interface $204 {
1144
+ }
1145
+ export interface $404 {
1146
+ }
1147
+ }
1148
+ }
1107
1149
  namespace DeleteLogo {
1108
1150
  namespace Responses {
1109
1151
  export interface $204 {
@@ -1316,6 +1358,25 @@ declare namespace Paths {
1316
1358
  }
1317
1359
  }
1318
1360
  }
1361
+ namespace PatchVersion {
1362
+ namespace Parameters {
1363
+ export type AppId = string;
1364
+ export type Version = string;
1365
+ }
1366
+ export interface PathParameters {
1367
+ appId: Parameters.AppId;
1368
+ version: Parameters.Version;
1369
+ }
1370
+ export type RequestBody = Components.RequestBodies.PatchVersionRequest;
1371
+ namespace Responses {
1372
+ export interface $204 {
1373
+ }
1374
+ export interface $400 {
1375
+ }
1376
+ export interface $404 {
1377
+ }
1378
+ }
1379
+ }
1319
1380
  namespace PromoteVersion {
1320
1381
  namespace Parameters {
1321
1382
  export type AppId = string;
@@ -1424,6 +1485,16 @@ export interface OperationMethods {
1424
1485
  data?: Paths.PatchMetadata.RequestBody,
1425
1486
  config?: AxiosRequestConfig
1426
1487
  ): OperationResponse<Paths.PatchMetadata.Responses.$204>
1488
+ /**
1489
+ * deleteConfiguration - Delete app configuration
1490
+ *
1491
+ * Delete an app configuration and all its versions and components.
1492
+ */
1493
+ 'deleteConfiguration'(
1494
+ parameters?: Parameters<Paths.V1AppConfigurations$AppId.PathParameters> | null,
1495
+ data?: any,
1496
+ config?: AxiosRequestConfig
1497
+ ): OperationResponse<Paths.DeleteConfiguration.Responses.$204>
1427
1498
  /**
1428
1499
  * createBundleUploadUrl - createBundleUploadUrl
1429
1500
  *
@@ -1474,6 +1545,16 @@ export interface OperationMethods {
1474
1545
  data?: any,
1475
1546
  config?: AxiosRequestConfig
1476
1547
  ): OperationResponse<Paths.GetVersion.Responses.$200>
1548
+ /**
1549
+ * patchVersion - patchVersion
1550
+ *
1551
+ * Patch an existing app version
1552
+ */
1553
+ 'patchVersion'(
1554
+ parameters?: Parameters<Paths.PatchVersion.PathParameters> | null,
1555
+ data?: Paths.PatchVersion.RequestBody,
1556
+ config?: AxiosRequestConfig
1557
+ ): OperationResponse<Paths.PatchVersion.Responses.$204>
1477
1558
  /**
1478
1559
  * deleteVersion - deleteVersion
1479
1560
  *
@@ -1642,6 +1723,16 @@ export interface PathsDictionary {
1642
1723
  data?: Paths.PatchMetadata.RequestBody,
1643
1724
  config?: AxiosRequestConfig
1644
1725
  ): OperationResponse<Paths.PatchMetadata.Responses.$204>
1726
+ /**
1727
+ * deleteConfiguration - Delete app configuration
1728
+ *
1729
+ * Delete an app configuration and all its versions and components.
1730
+ */
1731
+ 'delete'(
1732
+ parameters?: Parameters<Paths.V1AppConfigurations$AppId.PathParameters> | null,
1733
+ data?: any,
1734
+ config?: AxiosRequestConfig
1735
+ ): OperationResponse<Paths.DeleteConfiguration.Responses.$204>
1645
1736
  }
1646
1737
  ['/v1/app-configurations/{appId}/bundle']: {
1647
1738
  /**
@@ -1710,6 +1801,16 @@ export interface PathsDictionary {
1710
1801
  data?: any,
1711
1802
  config?: AxiosRequestConfig
1712
1803
  ): OperationResponse<Paths.DeleteVersion.Responses.$204>
1804
+ /**
1805
+ * patchVersion - patchVersion
1806
+ *
1807
+ * Patch an existing app version
1808
+ */
1809
+ 'patch'(
1810
+ parameters?: Parameters<Paths.PatchVersion.PathParameters> | null,
1811
+ data?: Paths.PatchVersion.RequestBody,
1812
+ config?: AxiosRequestConfig
1813
+ ): OperationResponse<Paths.PatchVersion.Responses.$204>
1713
1814
  }
1714
1815
  ['/v1/app-configurations/{appId}/versions/{version}/components']: {
1715
1816
  /**
@@ -1843,6 +1944,7 @@ export type CustomFlowActionComponent = Components.Schemas.CustomFlowActionCompo
1843
1944
  export type CustomFlowConfig = Components.Schemas.CustomFlowConfig;
1844
1945
  export type EnumArg = Components.Schemas.EnumArg;
1845
1946
  export type ExternalIntegrationCustomActionConfig = Components.Schemas.ExternalIntegrationCustomActionConfig;
1947
+ export type Grants = Components.Schemas.Grants;
1846
1948
  export type Installation = Components.Schemas.Installation;
1847
1949
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
1848
1950
  export type JourneyBlockComponentArgs = Components.Schemas.JourneyBlockComponentArgs;
@@ -1857,6 +1959,7 @@ export type PortalExtensionComponent = Components.Schemas.PortalExtensionCompone
1857
1959
  export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
1858
1960
  export type Pricing = Components.Schemas.Pricing;
1859
1961
  export type PublicConfiguration = Components.Schemas.PublicConfiguration;
1962
+ export type Role = Components.Schemas.Role;
1860
1963
  export type S3Reference = Components.Schemas.S3Reference;
1861
1964
  export type TextArg = Components.Schemas.TextArg;
1862
1965
  export type TranslatedString = Components.Schemas.TranslatedString;
package/dist/openapi.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.0.3",
2
+ "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "App API",
5
5
  "description": "API for managing app publishing and installed app.",
@@ -236,6 +236,22 @@
236
236
  "description": "App configuration not found"
237
237
  }
238
238
  }
239
+ },
240
+ "delete": {
241
+ "summary": "Delete app configuration",
242
+ "description": "Delete an app configuration and all its versions and components.",
243
+ "operationId": "deleteConfiguration",
244
+ "tags": [
245
+ "App Configuration"
246
+ ],
247
+ "responses": {
248
+ "204": {
249
+ "description": "App configuration deleted successfully"
250
+ },
251
+ "404": {
252
+ "description": "App configuration not found"
253
+ }
254
+ }
239
255
  }
240
256
  },
241
257
  "/v1/app-configurations/{appId}/bundle": {
@@ -535,6 +551,48 @@
535
551
  "description": "Version is in use by installations"
536
552
  }
537
553
  }
554
+ },
555
+ "patch": {
556
+ "summary": "patchVersion",
557
+ "description": "Patch an existing app version",
558
+ "operationId": "patchVersion",
559
+ "tags": [
560
+ "App Configuration"
561
+ ],
562
+ "parameters": [
563
+ {
564
+ "name": "appId",
565
+ "in": "path",
566
+ "required": true,
567
+ "schema": {
568
+ "type": "string"
569
+ },
570
+ "description": "ID of the app configuration"
571
+ },
572
+ {
573
+ "name": "version",
574
+ "in": "path",
575
+ "required": true,
576
+ "schema": {
577
+ "type": "string"
578
+ },
579
+ "description": "Version to update"
580
+ }
581
+ ],
582
+ "requestBody": {
583
+ "$ref": "#/components/requestBodies/PatchVersionRequest"
584
+ },
585
+ "responses": {
586
+ "204": {
587
+ "description": "Version patched successfully"
588
+ },
589
+ "400": {
590
+ "description": "Invalid version format"
591
+ },
592
+ "404": {
593
+ "description": "Version not found"
594
+ }
595
+ }
538
596
  }
539
597
  },
540
598
  "/v1/app-configurations/{appId}/versions/{version}/components": {
@@ -1093,6 +1151,26 @@
1093
1151
  }
1094
1152
  }
1095
1153
  },
1154
+ "PatchVersionRequest": {
1155
+ "required": true,
1156
+ "content": {
1157
+ "application/json": {
1158
+ "schema": {
1159
+ "type": "object",
1160
+ "properties": {
1161
+ "role_id": {
1162
+ "nullable": true,
1163
+ "type": "string",
1164
+ "description": "Name of the role"
1165
+ },
1166
+ "grants": {
1167
+ "$ref": "#/components/schemas/Grants"
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ }
1173
+ },
1096
1174
  "UpsertComponentRequest": {
1097
1175
  "required": true,
1098
1176
  "content": {
@@ -1167,6 +1245,18 @@
1167
1245
  }
1168
1246
  },
1169
1247
  "schemas": {
1248
+ "Role": {
1249
+ "type": "object",
1250
+ "properties": {
1251
+ "id": {
1252
+ "type": "string",
1253
+ "description": "Name of the role"
1254
+ },
1255
+ "grants": {
1256
+ "$ref": "#/components/schemas/Grants"
1257
+ }
1258
+ }
1259
+ },
1170
1260
  "Options": {
1171
1261
  "type": "object",
1172
1262
  "description": "Options for the component configuration",
@@ -2065,6 +2155,9 @@
2065
2155
  ],
2066
2156
  "description": "Status of the review process"
2067
2157
  },
2158
+ "role": {
2159
+ "$ref": "#/components/schemas/Role"
2160
+ },
2068
2161
  "version_audit": {
2069
2162
  "readOnly": true,
2070
2163
  "allOf": [
@@ -2090,6 +2183,26 @@
2090
2183
  }
2091
2184
  }
2092
2185
  },
2186
+ "Grants": {
2187
+ "type": "array",
2188
+ "description": "Required grants for the app in order to call APIs for the installing tenant",
2189
+ "items": {
2190
+ "type": "object",
2191
+ "required": [
2192
+ "action"
2193
+ ],
2194
+ "properties": {
2195
+ "action": {
2196
+ "type": "string",
2197
+ "description": "The action the app can perform"
2198
+ },
2199
+ "resource": {
2200
+ "type": "string",
2201
+ "description": "The resource the app can access"
2202
+ }
2203
+ }
2204
+ }
2205
+ },
2093
2206
  "Installation": {
2094
2207
  "description": "Information about the installed app. Has configuration data of the installed version",
2095
2208
  "type": "object",
@@ -2144,6 +2257,10 @@
2144
2257
  "description": "Version of the app that is installed",
2145
2258
  "readOnly": true
2146
2259
  },
2260
+ "role": {
2261
+ "type": "string",
2262
+ "description": "The name of the role the app can use to access APIs"
2263
+ },
2147
2264
  "installation_audit": {
2148
2265
  "readOnly": true,
2149
2266
  "allOf": [
@@ -2240,6 +2357,9 @@
2240
2357
  "description": "Version of the app that is installed",
2241
2358
  "readOnly": true
2242
2359
  },
2360
+ "role": {
2361
+ "$ref": "#/components/schemas/Role"
2362
+ },
2243
2363
  "public": {
2244
2364
  "type": "boolean",
2245
2365
  "default": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",