@epilot/app-client 0.6.0-rc.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +18 -0
- package/dist/openapi.d.ts +226 -10
- package/dist/openapi.json +194 -12
- package/package.json +5 -5
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={466:e=>{e.exports=JSON.parse('{"openapi":"3.1.0","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/public/.well-known/public-key":{"get":{"operationId":"getPublicKey","responses":{}}},"/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}/zip":{"post":{"operationId":"createZipUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"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":{}}},"/v1/app-events":{"post":{"operationId":"ingestEvent","requestBody":{"required":true,"content":{"application/json":{}}},"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":{}}}}}}')},757: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}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var p=r[n]={exports:{}};return e[n].call(p.exports,p,p.exports,t),p.exports}(757),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
12
|
"paths": {
|
|
13
|
+
"/v1/public/.well-known/public-key": {
|
|
14
|
+
"get": {
|
|
15
|
+
"operationId": "getPublicKey",
|
|
16
|
+
"responses": {}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
13
19
|
"/v1/app-configurations": {
|
|
14
20
|
"get": {
|
|
15
21
|
"operationId": "listConfigurations",
|
|
@@ -397,6 +403,18 @@
|
|
|
397
403
|
],
|
|
398
404
|
"responses": {}
|
|
399
405
|
}
|
|
406
|
+
},
|
|
407
|
+
"/v1/app-events": {
|
|
408
|
+
"post": {
|
|
409
|
+
"operationId": "ingestEvent",
|
|
410
|
+
"requestBody": {
|
|
411
|
+
"required": true,
|
|
412
|
+
"content": {
|
|
413
|
+
"application/json": {}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"responses": {}
|
|
417
|
+
}
|
|
400
418
|
}
|
|
401
419
|
},
|
|
402
420
|
"components": {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -89,11 +89,25 @@ declare namespace Components {
|
|
|
89
89
|
export type UpsertComponentRequest = Schemas.BaseComponent;
|
|
90
90
|
}
|
|
91
91
|
namespace Schemas {
|
|
92
|
+
export interface Actor {
|
|
93
|
+
/**
|
|
94
|
+
* Organization ID of the actor
|
|
95
|
+
*/
|
|
96
|
+
org_id?: string;
|
|
97
|
+
/**
|
|
98
|
+
* User ID of the actor
|
|
99
|
+
*/
|
|
100
|
+
user_id?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Type of the actor (e.g., user, system)
|
|
103
|
+
*/
|
|
104
|
+
type: "user" | "system";
|
|
105
|
+
}
|
|
92
106
|
export interface AppBridgeSurfaceConfig {
|
|
93
107
|
/**
|
|
94
108
|
* URL of the uploaded App Bridge App. This is the entrypoint for the app
|
|
95
109
|
*/
|
|
96
|
-
app_url
|
|
110
|
+
app_url?: string;
|
|
97
111
|
/**
|
|
98
112
|
* URL of the uploaded zip file containing the app
|
|
99
113
|
*/
|
|
@@ -103,6 +117,29 @@ declare namespace Components {
|
|
|
103
117
|
*/
|
|
104
118
|
override_url?: string;
|
|
105
119
|
}
|
|
120
|
+
export interface AppEventData {
|
|
121
|
+
/**
|
|
122
|
+
* ID of the app configuration
|
|
123
|
+
*/
|
|
124
|
+
app_id: string;
|
|
125
|
+
/**
|
|
126
|
+
* Version of the app configuration
|
|
127
|
+
*/
|
|
128
|
+
version: string;
|
|
129
|
+
event_id?: string;
|
|
130
|
+
component_id: string;
|
|
131
|
+
timestamp?: string;
|
|
132
|
+
correlation_id?: string;
|
|
133
|
+
event_type: "ERROR" | "WARNING" | "INFO";
|
|
134
|
+
source: /* Type of app component */ ComponentType;
|
|
135
|
+
actor?: Actor;
|
|
136
|
+
/**
|
|
137
|
+
* Details about the event
|
|
138
|
+
*/
|
|
139
|
+
details?: {
|
|
140
|
+
[name: string]: any;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
106
143
|
export interface Audit {
|
|
107
144
|
/**
|
|
108
145
|
* Timestamp of the creation
|
|
@@ -223,6 +260,110 @@ declare namespace Components {
|
|
|
223
260
|
*/
|
|
224
261
|
description?: string;
|
|
225
262
|
}
|
|
263
|
+
export interface BatchEventRequest {
|
|
264
|
+
events: [
|
|
265
|
+
AppEventData?,
|
|
266
|
+
AppEventData?,
|
|
267
|
+
AppEventData?,
|
|
268
|
+
AppEventData?,
|
|
269
|
+
AppEventData?,
|
|
270
|
+
AppEventData?,
|
|
271
|
+
AppEventData?,
|
|
272
|
+
AppEventData?,
|
|
273
|
+
AppEventData?,
|
|
274
|
+
AppEventData?,
|
|
275
|
+
AppEventData?,
|
|
276
|
+
AppEventData?,
|
|
277
|
+
AppEventData?,
|
|
278
|
+
AppEventData?,
|
|
279
|
+
AppEventData?,
|
|
280
|
+
AppEventData?,
|
|
281
|
+
AppEventData?,
|
|
282
|
+
AppEventData?,
|
|
283
|
+
AppEventData?,
|
|
284
|
+
AppEventData?,
|
|
285
|
+
AppEventData?,
|
|
286
|
+
AppEventData?,
|
|
287
|
+
AppEventData?,
|
|
288
|
+
AppEventData?,
|
|
289
|
+
AppEventData?,
|
|
290
|
+
AppEventData?,
|
|
291
|
+
AppEventData?,
|
|
292
|
+
AppEventData?,
|
|
293
|
+
AppEventData?,
|
|
294
|
+
AppEventData?,
|
|
295
|
+
AppEventData?,
|
|
296
|
+
AppEventData?,
|
|
297
|
+
AppEventData?,
|
|
298
|
+
AppEventData?,
|
|
299
|
+
AppEventData?,
|
|
300
|
+
AppEventData?,
|
|
301
|
+
AppEventData?,
|
|
302
|
+
AppEventData?,
|
|
303
|
+
AppEventData?,
|
|
304
|
+
AppEventData?,
|
|
305
|
+
AppEventData?,
|
|
306
|
+
AppEventData?,
|
|
307
|
+
AppEventData?,
|
|
308
|
+
AppEventData?,
|
|
309
|
+
AppEventData?,
|
|
310
|
+
AppEventData?,
|
|
311
|
+
AppEventData?,
|
|
312
|
+
AppEventData?,
|
|
313
|
+
AppEventData?,
|
|
314
|
+
AppEventData?,
|
|
315
|
+
AppEventData?,
|
|
316
|
+
AppEventData?,
|
|
317
|
+
AppEventData?,
|
|
318
|
+
AppEventData?,
|
|
319
|
+
AppEventData?,
|
|
320
|
+
AppEventData?,
|
|
321
|
+
AppEventData?,
|
|
322
|
+
AppEventData?,
|
|
323
|
+
AppEventData?,
|
|
324
|
+
AppEventData?,
|
|
325
|
+
AppEventData?,
|
|
326
|
+
AppEventData?,
|
|
327
|
+
AppEventData?,
|
|
328
|
+
AppEventData?,
|
|
329
|
+
AppEventData?,
|
|
330
|
+
AppEventData?,
|
|
331
|
+
AppEventData?,
|
|
332
|
+
AppEventData?,
|
|
333
|
+
AppEventData?,
|
|
334
|
+
AppEventData?,
|
|
335
|
+
AppEventData?,
|
|
336
|
+
AppEventData?,
|
|
337
|
+
AppEventData?,
|
|
338
|
+
AppEventData?,
|
|
339
|
+
AppEventData?,
|
|
340
|
+
AppEventData?,
|
|
341
|
+
AppEventData?,
|
|
342
|
+
AppEventData?,
|
|
343
|
+
AppEventData?,
|
|
344
|
+
AppEventData?,
|
|
345
|
+
AppEventData?,
|
|
346
|
+
AppEventData?,
|
|
347
|
+
AppEventData?,
|
|
348
|
+
AppEventData?,
|
|
349
|
+
AppEventData?,
|
|
350
|
+
AppEventData?,
|
|
351
|
+
AppEventData?,
|
|
352
|
+
AppEventData?,
|
|
353
|
+
AppEventData?,
|
|
354
|
+
AppEventData?,
|
|
355
|
+
AppEventData?,
|
|
356
|
+
AppEventData?,
|
|
357
|
+
AppEventData?,
|
|
358
|
+
AppEventData?,
|
|
359
|
+
AppEventData?,
|
|
360
|
+
AppEventData?,
|
|
361
|
+
AppEventData?,
|
|
362
|
+
AppEventData?,
|
|
363
|
+
AppEventData?,
|
|
364
|
+
AppEventData?
|
|
365
|
+
];
|
|
366
|
+
}
|
|
226
367
|
/**
|
|
227
368
|
* How often the subscription is billed
|
|
228
369
|
*/
|
|
@@ -672,10 +813,6 @@ declare namespace Components {
|
|
|
672
813
|
headers?: {
|
|
673
814
|
[name: string]: any;
|
|
674
815
|
};
|
|
675
|
-
/**
|
|
676
|
-
* SSM Reference to the auth token to use for the request
|
|
677
|
-
*/
|
|
678
|
-
auth_token_ref?: string;
|
|
679
816
|
};
|
|
680
817
|
}
|
|
681
818
|
/**
|
|
@@ -846,7 +983,7 @@ declare namespace Components {
|
|
|
846
983
|
/**
|
|
847
984
|
* The configured value for this option
|
|
848
985
|
*/
|
|
849
|
-
value: string;
|
|
986
|
+
value: string | boolean | number;
|
|
850
987
|
}
|
|
851
988
|
/**
|
|
852
989
|
* Options for the component configuration
|
|
@@ -871,7 +1008,7 @@ declare namespace Components {
|
|
|
871
1008
|
/**
|
|
872
1009
|
* The configured value for this option. Is only present when the component is installed.
|
|
873
1010
|
*/
|
|
874
|
-
value?: string;
|
|
1011
|
+
value?: string | boolean | number;
|
|
875
1012
|
type: "text" | "number" | "boolean" | "secret";
|
|
876
1013
|
}
|
|
877
1014
|
export interface OptionsRef {
|
|
@@ -1129,7 +1266,8 @@ declare namespace Paths {
|
|
|
1129
1266
|
}
|
|
1130
1267
|
export type RequestBody = Components.RequestBodies.UpsertComponentRequest;
|
|
1131
1268
|
namespace Responses {
|
|
1132
|
-
export interface $
|
|
1269
|
+
export interface $200 {
|
|
1270
|
+
component?: Components.Schemas.BaseComponent;
|
|
1133
1271
|
}
|
|
1134
1272
|
export interface $400 {
|
|
1135
1273
|
}
|
|
@@ -1290,6 +1428,26 @@ declare namespace Paths {
|
|
|
1290
1428
|
}
|
|
1291
1429
|
}
|
|
1292
1430
|
}
|
|
1431
|
+
namespace GetPublicKey {
|
|
1432
|
+
namespace Responses {
|
|
1433
|
+
export interface $200 {
|
|
1434
|
+
/**
|
|
1435
|
+
* example:
|
|
1436
|
+
* rsa-sha256
|
|
1437
|
+
*/
|
|
1438
|
+
algorithm?: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* PEM-formatted RSA public key
|
|
1441
|
+
*/
|
|
1442
|
+
public_key?: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* example:
|
|
1445
|
+
* epilot
|
|
1446
|
+
*/
|
|
1447
|
+
issuer?: string;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1293
1451
|
namespace GetVersion {
|
|
1294
1452
|
namespace Parameters {
|
|
1295
1453
|
export type AppId = string;
|
|
@@ -1305,6 +1463,15 @@ declare namespace Paths {
|
|
|
1305
1463
|
}
|
|
1306
1464
|
}
|
|
1307
1465
|
}
|
|
1466
|
+
namespace IngestEvent {
|
|
1467
|
+
export type RequestBody = Components.Schemas.AppEventData | Components.Schemas.BatchEventRequest;
|
|
1468
|
+
namespace Responses {
|
|
1469
|
+
export interface $202 {
|
|
1470
|
+
}
|
|
1471
|
+
export interface $400 {
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1308
1475
|
namespace Install {
|
|
1309
1476
|
namespace Parameters {
|
|
1310
1477
|
export type AppId = string;
|
|
@@ -1510,7 +1677,18 @@ declare namespace Paths {
|
|
|
1510
1677
|
}
|
|
1511
1678
|
}
|
|
1512
1679
|
|
|
1680
|
+
|
|
1513
1681
|
export interface OperationMethods {
|
|
1682
|
+
/**
|
|
1683
|
+
* getPublicKey - getPublicKey
|
|
1684
|
+
*
|
|
1685
|
+
* Retrieve the public key for verifying signatures
|
|
1686
|
+
*/
|
|
1687
|
+
'getPublicKey'(
|
|
1688
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1689
|
+
data?: any,
|
|
1690
|
+
config?: AxiosRequestConfig
|
|
1691
|
+
): OperationResponse<Paths.GetPublicKey.Responses.$200>
|
|
1514
1692
|
/**
|
|
1515
1693
|
* listConfigurations - listConfigurations
|
|
1516
1694
|
*
|
|
@@ -1661,7 +1839,7 @@ export interface OperationMethods {
|
|
|
1661
1839
|
parameters?: Parameters<Paths.CreateComponent.PathParameters> | null,
|
|
1662
1840
|
data?: Paths.CreateComponent.RequestBody,
|
|
1663
1841
|
config?: AxiosRequestConfig
|
|
1664
|
-
): OperationResponse<Paths.CreateComponent.Responses.$
|
|
1842
|
+
): OperationResponse<Paths.CreateComponent.Responses.$200>
|
|
1665
1843
|
/**
|
|
1666
1844
|
* patchComponent - patchComponent
|
|
1667
1845
|
*
|
|
@@ -1752,9 +1930,31 @@ export interface OperationMethods {
|
|
|
1752
1930
|
data?: any,
|
|
1753
1931
|
config?: AxiosRequestConfig
|
|
1754
1932
|
): OperationResponse<Paths.PromoteVersion.Responses.$200>
|
|
1933
|
+
/**
|
|
1934
|
+
* ingestEvent - ingestEvent
|
|
1935
|
+
*
|
|
1936
|
+
* Internal endpoint for services to submit app events for analytic purposes
|
|
1937
|
+
*/
|
|
1938
|
+
'ingestEvent'(
|
|
1939
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1940
|
+
data?: Paths.IngestEvent.RequestBody,
|
|
1941
|
+
config?: AxiosRequestConfig
|
|
1942
|
+
): OperationResponse<Paths.IngestEvent.Responses.$202>
|
|
1755
1943
|
}
|
|
1756
1944
|
|
|
1757
1945
|
export interface PathsDictionary {
|
|
1946
|
+
['/v1/public/.well-known/public-key']: {
|
|
1947
|
+
/**
|
|
1948
|
+
* getPublicKey - getPublicKey
|
|
1949
|
+
*
|
|
1950
|
+
* Retrieve the public key for verifying signatures
|
|
1951
|
+
*/
|
|
1952
|
+
'get'(
|
|
1953
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1954
|
+
data?: any,
|
|
1955
|
+
config?: AxiosRequestConfig
|
|
1956
|
+
): OperationResponse<Paths.GetPublicKey.Responses.$200>
|
|
1957
|
+
}
|
|
1758
1958
|
['/v1/app-configurations']: {
|
|
1759
1959
|
/**
|
|
1760
1960
|
* listConfigurations - listConfigurations
|
|
@@ -1922,7 +2122,7 @@ export interface PathsDictionary {
|
|
|
1922
2122
|
parameters?: Parameters<Paths.CreateComponent.PathParameters> | null,
|
|
1923
2123
|
data?: Paths.CreateComponent.RequestBody,
|
|
1924
2124
|
config?: AxiosRequestConfig
|
|
1925
|
-
): OperationResponse<Paths.CreateComponent.Responses.$
|
|
2125
|
+
): OperationResponse<Paths.CreateComponent.Responses.$200>
|
|
1926
2126
|
}
|
|
1927
2127
|
['/v1/app-configurations/{appId}/versions/{version}/components/{componentId}']: {
|
|
1928
2128
|
/**
|
|
@@ -2024,16 +2224,32 @@ export interface PathsDictionary {
|
|
|
2024
2224
|
config?: AxiosRequestConfig
|
|
2025
2225
|
): OperationResponse<Paths.PromoteVersion.Responses.$200>
|
|
2026
2226
|
}
|
|
2227
|
+
['/v1/app-events']: {
|
|
2228
|
+
/**
|
|
2229
|
+
* ingestEvent - ingestEvent
|
|
2230
|
+
*
|
|
2231
|
+
* Internal endpoint for services to submit app events for analytic purposes
|
|
2232
|
+
*/
|
|
2233
|
+
'post'(
|
|
2234
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2235
|
+
data?: Paths.IngestEvent.RequestBody,
|
|
2236
|
+
config?: AxiosRequestConfig
|
|
2237
|
+
): OperationResponse<Paths.IngestEvent.Responses.$202>
|
|
2238
|
+
}
|
|
2027
2239
|
}
|
|
2028
2240
|
|
|
2029
2241
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
2030
2242
|
|
|
2243
|
+
|
|
2244
|
+
export type Actor = Components.Schemas.Actor;
|
|
2031
2245
|
export type AppBridgeSurfaceConfig = Components.Schemas.AppBridgeSurfaceConfig;
|
|
2246
|
+
export type AppEventData = Components.Schemas.AppEventData;
|
|
2032
2247
|
export type Audit = Components.Schemas.Audit;
|
|
2033
2248
|
export type Author = Components.Schemas.Author;
|
|
2034
2249
|
export type BaseComponent = Components.Schemas.BaseComponent;
|
|
2035
2250
|
export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
|
|
2036
2251
|
export type BaseCustomActionConfig = Components.Schemas.BaseCustomActionConfig;
|
|
2252
|
+
export type BatchEventRequest = Components.Schemas.BatchEventRequest;
|
|
2037
2253
|
export type BillingFrequency = Components.Schemas.BillingFrequency;
|
|
2038
2254
|
export type BooleanArg = Components.Schemas.BooleanArg;
|
|
2039
2255
|
export type CallerIdentity = Components.Schemas.CallerIdentity;
|
package/dist/openapi.json
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
{
|
|
14
14
|
"name": "App Installation",
|
|
15
15
|
"description": "Install and uninstall apps"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "App Analytics",
|
|
19
|
+
"description": "Analytics for installed apps"
|
|
16
20
|
}
|
|
17
21
|
],
|
|
18
22
|
"servers": [
|
|
@@ -32,6 +36,43 @@
|
|
|
32
36
|
}
|
|
33
37
|
],
|
|
34
38
|
"paths": {
|
|
39
|
+
"/v1/public/.well-known/public-key": {
|
|
40
|
+
"get": {
|
|
41
|
+
"security": [],
|
|
42
|
+
"summary": "getPublicKey",
|
|
43
|
+
"operationId": "getPublicKey",
|
|
44
|
+
"description": "Retrieve the public key for verifying signatures",
|
|
45
|
+
"tags": [
|
|
46
|
+
"App Configuration"
|
|
47
|
+
],
|
|
48
|
+
"responses": {
|
|
49
|
+
"200": {
|
|
50
|
+
"description": "Public key for signature verification",
|
|
51
|
+
"content": {
|
|
52
|
+
"application/json": {
|
|
53
|
+
"schema": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"algorithm": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"example": "rsa-sha256"
|
|
59
|
+
},
|
|
60
|
+
"public_key": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "PEM-formatted RSA public key"
|
|
63
|
+
},
|
|
64
|
+
"issuer": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"example": "epilot"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
35
76
|
"/v1/app-configurations": {
|
|
36
77
|
"get": {
|
|
37
78
|
"summary": "listConfigurations",
|
|
@@ -701,8 +742,20 @@
|
|
|
701
742
|
"$ref": "#/components/requestBodies/UpsertComponentRequest"
|
|
702
743
|
},
|
|
703
744
|
"responses": {
|
|
704
|
-
"
|
|
705
|
-
"description": "Component created successfully"
|
|
745
|
+
"200": {
|
|
746
|
+
"description": "Component created successfully",
|
|
747
|
+
"content": {
|
|
748
|
+
"application/json": {
|
|
749
|
+
"schema": {
|
|
750
|
+
"type": "object",
|
|
751
|
+
"properties": {
|
|
752
|
+
"component": {
|
|
753
|
+
"$ref": "#/components/schemas/BaseComponent"
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
706
759
|
},
|
|
707
760
|
"400": {
|
|
708
761
|
"description": "Invalid version format"
|
|
@@ -1135,6 +1188,41 @@
|
|
|
1135
1188
|
}
|
|
1136
1189
|
}
|
|
1137
1190
|
}
|
|
1191
|
+
},
|
|
1192
|
+
"/v1/app-events": {
|
|
1193
|
+
"post": {
|
|
1194
|
+
"summary": "ingestEvent",
|
|
1195
|
+
"operationId": "ingestEvent",
|
|
1196
|
+
"description": "Internal endpoint for services to submit app events for analytic purposes",
|
|
1197
|
+
"tags": [
|
|
1198
|
+
"App Analytics"
|
|
1199
|
+
],
|
|
1200
|
+
"requestBody": {
|
|
1201
|
+
"required": true,
|
|
1202
|
+
"content": {
|
|
1203
|
+
"application/json": {
|
|
1204
|
+
"schema": {
|
|
1205
|
+
"oneOf": [
|
|
1206
|
+
{
|
|
1207
|
+
"$ref": "#/components/schemas/AppEventData"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"$ref": "#/components/schemas/BatchEventRequest"
|
|
1211
|
+
}
|
|
1212
|
+
]
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"responses": {
|
|
1218
|
+
"202": {
|
|
1219
|
+
"description": "Events accepted for processing"
|
|
1220
|
+
},
|
|
1221
|
+
"400": {
|
|
1222
|
+
"description": "Invalid event format"
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1138
1226
|
}
|
|
1139
1227
|
},
|
|
1140
1228
|
"components": {
|
|
@@ -1371,7 +1459,11 @@
|
|
|
1371
1459
|
"description": "Detailed description of what this configuration option does"
|
|
1372
1460
|
},
|
|
1373
1461
|
"value": {
|
|
1374
|
-
"type":
|
|
1462
|
+
"type": [
|
|
1463
|
+
"string",
|
|
1464
|
+
"boolean",
|
|
1465
|
+
"number"
|
|
1466
|
+
],
|
|
1375
1467
|
"description": "The configured value for this option. Is only present when the component is installed."
|
|
1376
1468
|
},
|
|
1377
1469
|
"type": {
|
|
@@ -1397,7 +1489,11 @@
|
|
|
1397
1489
|
"description": "Key matching a config_option from the component"
|
|
1398
1490
|
},
|
|
1399
1491
|
"value": {
|
|
1400
|
-
"type":
|
|
1492
|
+
"type": [
|
|
1493
|
+
"string",
|
|
1494
|
+
"boolean",
|
|
1495
|
+
"number"
|
|
1496
|
+
],
|
|
1401
1497
|
"description": "The configured value for this option"
|
|
1402
1498
|
}
|
|
1403
1499
|
}
|
|
@@ -1650,10 +1746,6 @@
|
|
|
1650
1746
|
"headers": {
|
|
1651
1747
|
"type": "object",
|
|
1652
1748
|
"additionalProperties": true
|
|
1653
|
-
},
|
|
1654
|
-
"auth_token_ref": {
|
|
1655
|
-
"type": "string",
|
|
1656
|
-
"description": "SSM Reference to the auth token to use for the request"
|
|
1657
1749
|
}
|
|
1658
1750
|
}
|
|
1659
1751
|
}
|
|
@@ -1892,10 +1984,7 @@
|
|
|
1892
1984
|
"type": "string",
|
|
1893
1985
|
"description": "URL of the app in dev mode"
|
|
1894
1986
|
}
|
|
1895
|
-
}
|
|
1896
|
-
"required": [
|
|
1897
|
-
"app_url"
|
|
1898
|
-
]
|
|
1987
|
+
}
|
|
1899
1988
|
},
|
|
1900
1989
|
"JourneyBlockComponentArgs": {
|
|
1901
1990
|
"allOf": [
|
|
@@ -2576,6 +2665,99 @@
|
|
|
2576
2665
|
"required": [
|
|
2577
2666
|
"org_id"
|
|
2578
2667
|
]
|
|
2668
|
+
},
|
|
2669
|
+
"BatchEventRequest": {
|
|
2670
|
+
"type": "object",
|
|
2671
|
+
"required": [
|
|
2672
|
+
"events"
|
|
2673
|
+
],
|
|
2674
|
+
"properties": {
|
|
2675
|
+
"events": {
|
|
2676
|
+
"type": "array",
|
|
2677
|
+
"items": {
|
|
2678
|
+
"$ref": "#/components/schemas/AppEventData"
|
|
2679
|
+
},
|
|
2680
|
+
"maxItems": 100
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2684
|
+
"Actor": {
|
|
2685
|
+
"type": "object",
|
|
2686
|
+
"readOnly": true,
|
|
2687
|
+
"required": [
|
|
2688
|
+
"type"
|
|
2689
|
+
],
|
|
2690
|
+
"properties": {
|
|
2691
|
+
"org_id": {
|
|
2692
|
+
"type": "string",
|
|
2693
|
+
"description": "Organization ID of the actor"
|
|
2694
|
+
},
|
|
2695
|
+
"user_id": {
|
|
2696
|
+
"type": "string",
|
|
2697
|
+
"description": "User ID of the actor"
|
|
2698
|
+
},
|
|
2699
|
+
"type": {
|
|
2700
|
+
"type": "string",
|
|
2701
|
+
"description": "Type of the actor (e.g., user, system)",
|
|
2702
|
+
"enum": [
|
|
2703
|
+
"user",
|
|
2704
|
+
"system"
|
|
2705
|
+
]
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
},
|
|
2709
|
+
"AppEventData": {
|
|
2710
|
+
"type": "object",
|
|
2711
|
+
"required": [
|
|
2712
|
+
"app_id",
|
|
2713
|
+
"event_type",
|
|
2714
|
+
"component_id",
|
|
2715
|
+
"version",
|
|
2716
|
+
"source"
|
|
2717
|
+
],
|
|
2718
|
+
"properties": {
|
|
2719
|
+
"app_id": {
|
|
2720
|
+
"type": "string",
|
|
2721
|
+
"description": "ID of the app configuration"
|
|
2722
|
+
},
|
|
2723
|
+
"version": {
|
|
2724
|
+
"type": "string",
|
|
2725
|
+
"description": "Version of the app configuration"
|
|
2726
|
+
},
|
|
2727
|
+
"event_id": {
|
|
2728
|
+
"type": "string",
|
|
2729
|
+
"readOnly": true
|
|
2730
|
+
},
|
|
2731
|
+
"component_id": {
|
|
2732
|
+
"type": "string"
|
|
2733
|
+
},
|
|
2734
|
+
"timestamp": {
|
|
2735
|
+
"type": "string",
|
|
2736
|
+
"readOnly": true
|
|
2737
|
+
},
|
|
2738
|
+
"correlation_id": {
|
|
2739
|
+
"type": "string"
|
|
2740
|
+
},
|
|
2741
|
+
"event_type": {
|
|
2742
|
+
"type": "string",
|
|
2743
|
+
"enum": [
|
|
2744
|
+
"ERROR",
|
|
2745
|
+
"WARNING",
|
|
2746
|
+
"INFO"
|
|
2747
|
+
]
|
|
2748
|
+
},
|
|
2749
|
+
"source": {
|
|
2750
|
+
"$ref": "#/components/schemas/ComponentType"
|
|
2751
|
+
},
|
|
2752
|
+
"actor": {
|
|
2753
|
+
"$ref": "#/components/schemas/Actor"
|
|
2754
|
+
},
|
|
2755
|
+
"details": {
|
|
2756
|
+
"type": "object",
|
|
2757
|
+
"description": "Details about the event",
|
|
2758
|
+
"additionalProperties": true
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2579
2761
|
}
|
|
2580
2762
|
}
|
|
2581
2763
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/app-client",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "JavaScript client library for the epilot App API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"test": "jest",
|
|
26
26
|
"typescript": "tsc",
|
|
27
27
|
"bundle-definition": "webpack",
|
|
28
|
-
"openapi": "node ../../scripts/update-openapi.js
|
|
28
|
+
"openapi": "node ../../scripts/update-openapi.js ../../../backend/app-api/openapi.yml",
|
|
29
29
|
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
30
30
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
31
31
|
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
32
32
|
"build:watch": "npm run build && tsc -w",
|
|
33
33
|
"release-alpha": "npm version prerelease --preid alpha",
|
|
34
34
|
"prepublishOnly": "npm run typegen && npm run build",
|
|
35
|
-
"lint": "
|
|
35
|
+
"lint": "pnpm exec eslint src"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"*.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
|
|
55
55
|
"buffer": "^6.0.3",
|
|
56
56
|
"https-browserify": "^1.0.0",
|
|
57
|
-
"openapi-client-axios": "^7.
|
|
57
|
+
"openapi-client-axios": "^7.6.0",
|
|
58
58
|
"stream-http": "^3.1.1",
|
|
59
59
|
"url": "^0.11.0",
|
|
60
60
|
"util": "^0.12.3"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"copy-webpack-plugin": "^7.0.0",
|
|
66
66
|
"jest": "^26.6.3",
|
|
67
67
|
"json-loader": "^0.5.7",
|
|
68
|
-
"openapicmd": "^2.
|
|
68
|
+
"openapicmd": "^2.7.0",
|
|
69
69
|
"ts-jest": "^26.5.0",
|
|
70
70
|
"ts-loader": "^8.0.14",
|
|
71
71
|
"ts-node": "^10.9.1",
|