@epilot/app-client 0.10.1 → 0.10.3
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.d.ts +192 -23
- package/dist/openapi.json +347 -39
- package/package.json +2 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={390: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/public/app/{appId}/components/{componentId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"},{"name":"componentId","in":"path","required":true,"description":"ID of the component to retrieve"}],"get":{"operationId":"getPublicFacingComponent","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}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"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}/review":{"get":{"operationId":"getReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"post":{"operationId":"createReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateReviewRequest"},"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":{"CreateReviewRequest":{"required":true,"content":{"application/json":{}}},"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 p=r[n]={exports:{}};return e[n].call(p.exports,p,p.exports,t),p.exports}(390),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -247,7 +247,7 @@ declare namespace Components {
|
|
|
247
247
|
surfaces?: {
|
|
248
248
|
[key: string]: any;
|
|
249
249
|
};
|
|
250
|
-
} & (JourneyBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent);
|
|
250
|
+
} & (JourneyBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent);
|
|
251
251
|
export interface BaseComponentCommon {
|
|
252
252
|
/**
|
|
253
253
|
* Unique identifier for the component
|
|
@@ -451,7 +451,7 @@ declare namespace Components {
|
|
|
451
451
|
/**
|
|
452
452
|
* Type of app component
|
|
453
453
|
*/
|
|
454
|
-
export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY";
|
|
454
|
+
export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG";
|
|
455
455
|
/**
|
|
456
456
|
* Configuration of the published app
|
|
457
457
|
*/
|
|
@@ -821,7 +821,7 @@ declare namespace Components {
|
|
|
821
821
|
flow_action_config?: AppBridgeSurfaceConfig;
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
export type CustomFlowConfig = ExternalIntegrationCustomActionConfig;
|
|
824
|
+
export type CustomFlowConfig = ExternalIntegrationCustomActionConfig | SandboxCustomActionConfig;
|
|
825
825
|
export interface EnumArg {
|
|
826
826
|
type?: "enum";
|
|
827
827
|
/**
|
|
@@ -967,6 +967,131 @@ declare namespace Components {
|
|
|
967
967
|
};
|
|
968
968
|
};
|
|
969
969
|
}
|
|
970
|
+
export interface ExternalProductCatalogAuthBlock {
|
|
971
|
+
/**
|
|
972
|
+
* HTTP method to use for authentication
|
|
973
|
+
*/
|
|
974
|
+
method?: string;
|
|
975
|
+
/**
|
|
976
|
+
* URL to use for authentication. Supports variable interpolation.
|
|
977
|
+
*/
|
|
978
|
+
url: string;
|
|
979
|
+
/**
|
|
980
|
+
* Parameters to append to the URL. Supports variable interpolation.
|
|
981
|
+
*/
|
|
982
|
+
params?: {
|
|
983
|
+
[name: string]: string;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Headers to use for authentication. Supports variable interpolation.
|
|
987
|
+
*/
|
|
988
|
+
headers?: {
|
|
989
|
+
[name: string]: string;
|
|
990
|
+
};
|
|
991
|
+
/**
|
|
992
|
+
* JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.
|
|
993
|
+
*/
|
|
994
|
+
body?: {
|
|
995
|
+
[name: string]: string;
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
export interface ExternalProductCatalogComponent {
|
|
999
|
+
component_type: "EXTERNAL_PRODUCT_CATALOG";
|
|
1000
|
+
configuration: ExternalProductCatalogConfig;
|
|
1001
|
+
}
|
|
1002
|
+
export interface ExternalProductCatalogConfig {
|
|
1003
|
+
hooks?: (/**
|
|
1004
|
+
* Hook for getting products from an external catalog. This hook makes a call to retrieve product data from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.
|
|
1005
|
+
*
|
|
1006
|
+
*/
|
|
1007
|
+
ExternalProductCatalogHookProducts | /**
|
|
1008
|
+
* Hook for getting product recommendations from an external catalog. This hook makes a call to retrieve product recommendations from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.
|
|
1009
|
+
*
|
|
1010
|
+
*/
|
|
1011
|
+
ExternalProductCatalogHookProductsRecommendation)[];
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Hook for getting products from an external catalog. This hook makes a call to retrieve product data from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.
|
|
1015
|
+
*
|
|
1016
|
+
*/
|
|
1017
|
+
export interface ExternalProductCatalogHookProducts {
|
|
1018
|
+
/**
|
|
1019
|
+
* Identifier of the hook. Should not change between updates.
|
|
1020
|
+
*/
|
|
1021
|
+
id: string; // ^[a-zA-Z0-9_-]+$
|
|
1022
|
+
name?: TranslatedString;
|
|
1023
|
+
type: "products";
|
|
1024
|
+
auth?: ExternalProductCatalogAuthBlock;
|
|
1025
|
+
call: {
|
|
1026
|
+
/**
|
|
1027
|
+
* HTTP method to use for the call
|
|
1028
|
+
*/
|
|
1029
|
+
method?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* URL to call. Supports variable interpolation.
|
|
1032
|
+
*/
|
|
1033
|
+
url: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* Parameters to append to the URL. Supports variable interpolation.
|
|
1036
|
+
*/
|
|
1037
|
+
params?: {
|
|
1038
|
+
[name: string]: string;
|
|
1039
|
+
};
|
|
1040
|
+
/**
|
|
1041
|
+
* Headers to use. Supports variable interpolation.
|
|
1042
|
+
*/
|
|
1043
|
+
headers?: {
|
|
1044
|
+
[name: string]: string;
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).
|
|
1048
|
+
*/
|
|
1049
|
+
body?: {
|
|
1050
|
+
[name: string]: string;
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Hook for getting product recommendations from an external catalog. This hook makes a call to retrieve product recommendations from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.
|
|
1056
|
+
*
|
|
1057
|
+
*/
|
|
1058
|
+
export interface ExternalProductCatalogHookProductsRecommendation {
|
|
1059
|
+
/**
|
|
1060
|
+
* Identifier of the hook. Should not change between updates.
|
|
1061
|
+
*/
|
|
1062
|
+
id: string; // ^[a-zA-Z0-9_-]+$
|
|
1063
|
+
name?: TranslatedString;
|
|
1064
|
+
type: "products-recommendation";
|
|
1065
|
+
auth?: ExternalProductCatalogAuthBlock;
|
|
1066
|
+
call: {
|
|
1067
|
+
/**
|
|
1068
|
+
* HTTP method to use for the call
|
|
1069
|
+
*/
|
|
1070
|
+
method?: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* URL to call. Supports variable interpolation.
|
|
1073
|
+
*/
|
|
1074
|
+
url: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Parameters to append to the URL. Supports variable interpolation.
|
|
1077
|
+
*/
|
|
1078
|
+
params?: {
|
|
1079
|
+
[name: string]: string;
|
|
1080
|
+
};
|
|
1081
|
+
/**
|
|
1082
|
+
* Headers to use. Supports variable interpolation.
|
|
1083
|
+
*/
|
|
1084
|
+
headers?: {
|
|
1085
|
+
[name: string]: string;
|
|
1086
|
+
};
|
|
1087
|
+
/**
|
|
1088
|
+
* JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).
|
|
1089
|
+
*/
|
|
1090
|
+
body?: {
|
|
1091
|
+
[name: string]: string;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
970
1095
|
/**
|
|
971
1096
|
* Required grants for the app in order to call APIs for the installing tenant
|
|
972
1097
|
*/
|
|
@@ -1229,17 +1354,7 @@ declare namespace Components {
|
|
|
1229
1354
|
configuration: PortalExtensionConfig;
|
|
1230
1355
|
}
|
|
1231
1356
|
export interface PortalExtensionConfig {
|
|
1232
|
-
/**
|
|
1233
|
-
* Identifier of the extension. Should not change between updates.
|
|
1234
|
-
*/
|
|
1235
|
-
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1236
|
-
hooks?: ({
|
|
1237
|
-
/**
|
|
1238
|
-
* Identifier of the hook. Should not change between updates.
|
|
1239
|
-
*/
|
|
1240
|
-
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1241
|
-
name?: TranslatedString;
|
|
1242
|
-
} & (/**
|
|
1357
|
+
hooks?: (/**
|
|
1243
1358
|
* Hook that replaces the built-in registration identifiers check. This hook makes a POST call whenever a user is trying to register to find the corresponding contact. The expected response to the call is:
|
|
1244
1359
|
* - 200 with contact id if exactly one contact is found
|
|
1245
1360
|
* - 404 if no contact is found or more than contact is found
|
|
@@ -1283,7 +1398,7 @@ declare namespace Components {
|
|
|
1283
1398
|
* - valid: false
|
|
1284
1399
|
*
|
|
1285
1400
|
*/
|
|
1286
|
-
PortalExtensionHookMeterReadingPlausibilityCheck)
|
|
1401
|
+
PortalExtensionHookMeterReadingPlausibilityCheck)[];
|
|
1287
1402
|
links?: {
|
|
1288
1403
|
/**
|
|
1289
1404
|
* Identifier of the link. Should not change between updates.
|
|
@@ -1313,19 +1428,17 @@ declare namespace Components {
|
|
|
1313
1428
|
};
|
|
1314
1429
|
}[];
|
|
1315
1430
|
}
|
|
1316
|
-
export interface PortalExtensionHook {
|
|
1317
|
-
/**
|
|
1318
|
-
* Identifier of the hook. Should not change between updates.
|
|
1319
|
-
*/
|
|
1320
|
-
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1321
|
-
name?: TranslatedString;
|
|
1322
|
-
}
|
|
1323
1431
|
/**
|
|
1324
1432
|
* Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:
|
|
1325
1433
|
* - 200 with the time series data
|
|
1326
1434
|
*
|
|
1327
1435
|
*/
|
|
1328
1436
|
export interface PortalExtensionHookConsumptionDataRetrieval {
|
|
1437
|
+
/**
|
|
1438
|
+
* Identifier of the hook. Should not change between updates.
|
|
1439
|
+
*/
|
|
1440
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1441
|
+
name?: TranslatedString;
|
|
1329
1442
|
type: "consumptionDataRetrieval";
|
|
1330
1443
|
/**
|
|
1331
1444
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
@@ -1386,6 +1499,11 @@ declare namespace Components {
|
|
|
1386
1499
|
*
|
|
1387
1500
|
*/
|
|
1388
1501
|
export interface PortalExtensionHookContractIdentification {
|
|
1502
|
+
/**
|
|
1503
|
+
* Identifier of the hook. Should not change between updates.
|
|
1504
|
+
*/
|
|
1505
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1506
|
+
name?: TranslatedString;
|
|
1389
1507
|
type: "contractIdentification";
|
|
1390
1508
|
auth?: PortalExtensionAuthBlock;
|
|
1391
1509
|
call: {
|
|
@@ -1415,6 +1533,10 @@ declare namespace Components {
|
|
|
1415
1533
|
body?: {
|
|
1416
1534
|
[key: string]: any;
|
|
1417
1535
|
};
|
|
1536
|
+
/**
|
|
1537
|
+
* Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation.
|
|
1538
|
+
*/
|
|
1539
|
+
result?: string;
|
|
1418
1540
|
};
|
|
1419
1541
|
/**
|
|
1420
1542
|
* Mode of contract assignment. See hook description for mode details.
|
|
@@ -1449,6 +1571,11 @@ declare namespace Components {
|
|
|
1449
1571
|
*
|
|
1450
1572
|
*/
|
|
1451
1573
|
export interface PortalExtensionHookCostDataRetrieval {
|
|
1574
|
+
/**
|
|
1575
|
+
* Identifier of the hook. Should not change between updates.
|
|
1576
|
+
*/
|
|
1577
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1578
|
+
name?: TranslatedString;
|
|
1452
1579
|
type: "costDataRetrieval";
|
|
1453
1580
|
/**
|
|
1454
1581
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
@@ -1504,6 +1631,11 @@ declare namespace Components {
|
|
|
1504
1631
|
*
|
|
1505
1632
|
*/
|
|
1506
1633
|
export interface PortalExtensionHookMeterReadingPlausibilityCheck {
|
|
1634
|
+
/**
|
|
1635
|
+
* Identifier of the hook. Should not change between updates.
|
|
1636
|
+
*/
|
|
1637
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1638
|
+
name?: TranslatedString;
|
|
1507
1639
|
type: "meterReadingPlausibilityCheck";
|
|
1508
1640
|
auth?: PortalExtensionAuthBlock;
|
|
1509
1641
|
call: {
|
|
@@ -1558,6 +1690,11 @@ declare namespace Components {
|
|
|
1558
1690
|
*
|
|
1559
1691
|
*/
|
|
1560
1692
|
export interface PortalExtensionHookPriceDataRetrieval {
|
|
1693
|
+
/**
|
|
1694
|
+
* Identifier of the hook. Should not change between updates.
|
|
1695
|
+
*/
|
|
1696
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1697
|
+
name?: TranslatedString;
|
|
1561
1698
|
type: "priceDataRetrieval";
|
|
1562
1699
|
/**
|
|
1563
1700
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
@@ -1610,6 +1747,11 @@ declare namespace Components {
|
|
|
1610
1747
|
*
|
|
1611
1748
|
*/
|
|
1612
1749
|
export interface PortalExtensionHookRegistrationIdentifiersCheck {
|
|
1750
|
+
/**
|
|
1751
|
+
* Identifier of the hook. Should not change between updates.
|
|
1752
|
+
*/
|
|
1753
|
+
id?: string; // ^[a-zA-Z0-9_-]+$
|
|
1754
|
+
name?: TranslatedString;
|
|
1613
1755
|
type: "registrationIdentifiersCheck";
|
|
1614
1756
|
auth?: PortalExtensionAuthBlock;
|
|
1615
1757
|
call: {
|
|
@@ -1821,6 +1963,28 @@ declare namespace Components {
|
|
|
1821
1963
|
*/
|
|
1822
1964
|
key: string;
|
|
1823
1965
|
}
|
|
1966
|
+
export interface SandboxCustomActionConfig {
|
|
1967
|
+
/**
|
|
1968
|
+
* Name of the custom action
|
|
1969
|
+
*/
|
|
1970
|
+
name?: string;
|
|
1971
|
+
/**
|
|
1972
|
+
* Description of the custom action
|
|
1973
|
+
*/
|
|
1974
|
+
description?: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* Wait for callback_url to be called before completing the action
|
|
1977
|
+
*/
|
|
1978
|
+
wait_for_callback?: boolean;
|
|
1979
|
+
type: "sandbox";
|
|
1980
|
+
sandbox_settings?: {
|
|
1981
|
+
/**
|
|
1982
|
+
* JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.
|
|
1983
|
+
*
|
|
1984
|
+
*/
|
|
1985
|
+
code?: string;
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1824
1988
|
export interface TextArg {
|
|
1825
1989
|
type?: "text";
|
|
1826
1990
|
}
|
|
@@ -3034,6 +3198,11 @@ export type ErpInformToolkitComponent = Components.Schemas.ErpInformToolkitCompo
|
|
|
3034
3198
|
export type EventsQuery = Components.Schemas.EventsQuery;
|
|
3035
3199
|
export type EventsQueryResponse = Components.Schemas.EventsQueryResponse;
|
|
3036
3200
|
export type ExternalIntegrationCustomActionConfig = Components.Schemas.ExternalIntegrationCustomActionConfig;
|
|
3201
|
+
export type ExternalProductCatalogAuthBlock = Components.Schemas.ExternalProductCatalogAuthBlock;
|
|
3202
|
+
export type ExternalProductCatalogComponent = Components.Schemas.ExternalProductCatalogComponent;
|
|
3203
|
+
export type ExternalProductCatalogConfig = Components.Schemas.ExternalProductCatalogConfig;
|
|
3204
|
+
export type ExternalProductCatalogHookProducts = Components.Schemas.ExternalProductCatalogHookProducts;
|
|
3205
|
+
export type ExternalProductCatalogHookProductsRecommendation = Components.Schemas.ExternalProductCatalogHookProductsRecommendation;
|
|
3037
3206
|
export type Grants = Components.Schemas.Grants;
|
|
3038
3207
|
export type Installation = Components.Schemas.Installation;
|
|
3039
3208
|
export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
|
|
@@ -3048,7 +3217,6 @@ export type OverrideDevMode = Components.Schemas.OverrideDevMode;
|
|
|
3048
3217
|
export type PortalExtensionAuthBlock = Components.Schemas.PortalExtensionAuthBlock;
|
|
3049
3218
|
export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
|
|
3050
3219
|
export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
|
|
3051
|
-
export type PortalExtensionHook = Components.Schemas.PortalExtensionHook;
|
|
3052
3220
|
export type PortalExtensionHookConsumptionDataRetrieval = Components.Schemas.PortalExtensionHookConsumptionDataRetrieval;
|
|
3053
3221
|
export type PortalExtensionHookContractIdentification = Components.Schemas.PortalExtensionHookContractIdentification;
|
|
3054
3222
|
export type PortalExtensionHookCostDataRetrieval = Components.Schemas.PortalExtensionHookCostDataRetrieval;
|
|
@@ -3062,5 +3230,6 @@ export type RawEvents = Components.Schemas.RawEvents;
|
|
|
3062
3230
|
export type Review = Components.Schemas.Review;
|
|
3063
3231
|
export type Role = Components.Schemas.Role;
|
|
3064
3232
|
export type S3Reference = Components.Schemas.S3Reference;
|
|
3233
|
+
export type SandboxCustomActionConfig = Components.Schemas.SandboxCustomActionConfig;
|
|
3065
3234
|
export type TextArg = Components.Schemas.TextArg;
|
|
3066
3235
|
export type TranslatedString = Components.Schemas.TranslatedString;
|
package/dist/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "App API",
|
|
5
5
|
"description": "API for managing app publishing and installed app.",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "2.0.0"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
9
9
|
{
|
|
@@ -1768,7 +1768,8 @@
|
|
|
1768
1768
|
"PORTAL_EXTENSION",
|
|
1769
1769
|
"CUSTOM_FLOW_ACTION",
|
|
1770
1770
|
"ERP_INFORM_TOOLKIT",
|
|
1771
|
-
"CUSTOM_CAPABILITY"
|
|
1771
|
+
"CUSTOM_CAPABILITY",
|
|
1772
|
+
"EXTERNAL_PRODUCT_CATALOG"
|
|
1772
1773
|
],
|
|
1773
1774
|
"description": "Type of app component"
|
|
1774
1775
|
},
|
|
@@ -1877,7 +1878,8 @@
|
|
|
1877
1878
|
"PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent",
|
|
1878
1879
|
"CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent",
|
|
1879
1880
|
"ERP_INFORM_TOOLKIT": "#/components/schemas/ErpInformToolkitComponent",
|
|
1880
|
-
"CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent"
|
|
1881
|
+
"CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
|
|
1882
|
+
"EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent"
|
|
1881
1883
|
}
|
|
1882
1884
|
},
|
|
1883
1885
|
"oneOf": [
|
|
@@ -1895,6 +1897,9 @@
|
|
|
1895
1897
|
},
|
|
1896
1898
|
{
|
|
1897
1899
|
"$ref": "#/components/schemas/CustomCapabilityComponent"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
"$ref": "#/components/schemas/ExternalProductCatalogComponent"
|
|
1898
1903
|
}
|
|
1899
1904
|
]
|
|
1900
1905
|
}
|
|
@@ -2070,21 +2075,56 @@
|
|
|
2070
2075
|
}
|
|
2071
2076
|
]
|
|
2072
2077
|
},
|
|
2078
|
+
"SandboxCustomActionConfig": {
|
|
2079
|
+
"allOf": [
|
|
2080
|
+
{
|
|
2081
|
+
"$ref": "#/components/schemas/BaseCustomActionConfig"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"type": "object",
|
|
2085
|
+
"properties": {
|
|
2086
|
+
"type": {
|
|
2087
|
+
"type": "string",
|
|
2088
|
+
"enum": [
|
|
2089
|
+
"sandbox"
|
|
2090
|
+
]
|
|
2091
|
+
},
|
|
2092
|
+
"sandbox_settings": {
|
|
2093
|
+
"type": "object",
|
|
2094
|
+
"properties": {
|
|
2095
|
+
"code": {
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"description": "JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.\n",
|
|
2098
|
+
"maxLength": 307200
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
"required": [
|
|
2104
|
+
"type"
|
|
2105
|
+
]
|
|
2106
|
+
}
|
|
2107
|
+
]
|
|
2108
|
+
},
|
|
2073
2109
|
"CustomFlowConfig": {
|
|
2074
2110
|
"type": "object",
|
|
2075
2111
|
"oneOf": [
|
|
2076
2112
|
{
|
|
2077
2113
|
"$ref": "#/components/schemas/ExternalIntegrationCustomActionConfig"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"$ref": "#/components/schemas/SandboxCustomActionConfig"
|
|
2078
2117
|
}
|
|
2079
2118
|
],
|
|
2080
2119
|
"discriminator": {
|
|
2081
2120
|
"propertyName": "type",
|
|
2082
2121
|
"mapping": {
|
|
2083
|
-
"external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig"
|
|
2122
|
+
"external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig",
|
|
2123
|
+
"sandbox": "#/components/schemas/SandboxCustomActionConfig"
|
|
2084
2124
|
}
|
|
2085
2125
|
}
|
|
2086
2126
|
},
|
|
2087
|
-
"
|
|
2127
|
+
"ExternalProductCatalogComponent": {
|
|
2088
2128
|
"type": "object",
|
|
2089
2129
|
"required": [
|
|
2090
2130
|
"component_type",
|
|
@@ -2094,50 +2134,237 @@
|
|
|
2094
2134
|
"component_type": {
|
|
2095
2135
|
"type": "string",
|
|
2096
2136
|
"enum": [
|
|
2097
|
-
"
|
|
2137
|
+
"EXTERNAL_PRODUCT_CATALOG"
|
|
2098
2138
|
]
|
|
2099
2139
|
},
|
|
2100
2140
|
"configuration": {
|
|
2101
|
-
"$ref": "#/components/schemas/
|
|
2141
|
+
"$ref": "#/components/schemas/ExternalProductCatalogConfig"
|
|
2102
2142
|
}
|
|
2103
2143
|
}
|
|
2104
2144
|
},
|
|
2105
|
-
"
|
|
2145
|
+
"ExternalProductCatalogConfig": {
|
|
2146
|
+
"type": "object",
|
|
2147
|
+
"properties": {
|
|
2148
|
+
"hooks": {
|
|
2149
|
+
"type": "array",
|
|
2150
|
+
"items": {
|
|
2151
|
+
"type": "object",
|
|
2152
|
+
"discriminator": {
|
|
2153
|
+
"propertyName": "type",
|
|
2154
|
+
"mapping": {
|
|
2155
|
+
"products": "#/components/schemas/ExternalProductCatalogHookProducts",
|
|
2156
|
+
"products-recommendation": "#/components/schemas/ExternalProductCatalogHookProductsRecommendation"
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
"oneOf": [
|
|
2160
|
+
{
|
|
2161
|
+
"$ref": "#/components/schemas/ExternalProductCatalogHookProducts"
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
"$ref": "#/components/schemas/ExternalProductCatalogHookProductsRecommendation"
|
|
2165
|
+
}
|
|
2166
|
+
]
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
},
|
|
2170
|
+
"additionalProperties": false
|
|
2171
|
+
},
|
|
2172
|
+
"ExternalProductCatalogHookProducts": {
|
|
2173
|
+
"description": "Hook for getting products from an external catalog. This hook makes a call to retrieve product data from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.\n",
|
|
2174
|
+
"type": "object",
|
|
2175
|
+
"properties": {
|
|
2176
|
+
"id": {
|
|
2177
|
+
"type": "string",
|
|
2178
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2179
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2180
|
+
},
|
|
2181
|
+
"name": {
|
|
2182
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2183
|
+
},
|
|
2184
|
+
"type": {
|
|
2185
|
+
"type": "string",
|
|
2186
|
+
"enum": [
|
|
2187
|
+
"products"
|
|
2188
|
+
]
|
|
2189
|
+
},
|
|
2190
|
+
"auth": {
|
|
2191
|
+
"$ref": "#/components/schemas/ExternalProductCatalogAuthBlock"
|
|
2192
|
+
},
|
|
2193
|
+
"call": {
|
|
2194
|
+
"type": "object",
|
|
2195
|
+
"properties": {
|
|
2196
|
+
"method": {
|
|
2197
|
+
"type": "string",
|
|
2198
|
+
"description": "HTTP method to use for the call",
|
|
2199
|
+
"default": "GET"
|
|
2200
|
+
},
|
|
2201
|
+
"url": {
|
|
2202
|
+
"type": "string",
|
|
2203
|
+
"description": "URL to call. Supports variable interpolation."
|
|
2204
|
+
},
|
|
2205
|
+
"params": {
|
|
2206
|
+
"type": "object",
|
|
2207
|
+
"description": "Parameters to append to the URL. Supports variable interpolation.",
|
|
2208
|
+
"additionalProperties": {
|
|
2209
|
+
"type": "string"
|
|
2210
|
+
},
|
|
2211
|
+
"default": {}
|
|
2212
|
+
},
|
|
2213
|
+
"headers": {
|
|
2214
|
+
"type": "object",
|
|
2215
|
+
"description": "Headers to use. Supports variable interpolation.",
|
|
2216
|
+
"additionalProperties": {
|
|
2217
|
+
"type": "string"
|
|
2218
|
+
},
|
|
2219
|
+
"default": {}
|
|
2220
|
+
},
|
|
2221
|
+
"body": {
|
|
2222
|
+
"type": "object",
|
|
2223
|
+
"description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).",
|
|
2224
|
+
"additionalProperties": {
|
|
2225
|
+
"type": "string"
|
|
2226
|
+
},
|
|
2227
|
+
"default": {}
|
|
2228
|
+
}
|
|
2229
|
+
},
|
|
2230
|
+
"required": [
|
|
2231
|
+
"url"
|
|
2232
|
+
],
|
|
2233
|
+
"additionalProperties": false
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
"required": [
|
|
2237
|
+
"type",
|
|
2238
|
+
"call",
|
|
2239
|
+
"id"
|
|
2240
|
+
],
|
|
2241
|
+
"additionalProperties": false
|
|
2242
|
+
},
|
|
2243
|
+
"ExternalProductCatalogHookProductsRecommendation": {
|
|
2244
|
+
"description": "Hook for getting product recommendations from an external catalog. This hook makes a call to retrieve product recommendations from an external source. Check the docs or the response API call contract https://docs.api.epilot.io/pricing-api-external-catalog for more details.\n",
|
|
2106
2245
|
"type": "object",
|
|
2107
2246
|
"properties": {
|
|
2108
2247
|
"id": {
|
|
2109
2248
|
"type": "string",
|
|
2110
2249
|
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2111
|
-
"description": "Identifier of the
|
|
2250
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2112
2251
|
},
|
|
2252
|
+
"name": {
|
|
2253
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2254
|
+
},
|
|
2255
|
+
"type": {
|
|
2256
|
+
"type": "string",
|
|
2257
|
+
"enum": [
|
|
2258
|
+
"products-recommendation"
|
|
2259
|
+
]
|
|
2260
|
+
},
|
|
2261
|
+
"auth": {
|
|
2262
|
+
"$ref": "#/components/schemas/ExternalProductCatalogAuthBlock"
|
|
2263
|
+
},
|
|
2264
|
+
"call": {
|
|
2265
|
+
"type": "object",
|
|
2266
|
+
"properties": {
|
|
2267
|
+
"method": {
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"description": "HTTP method to use for the call",
|
|
2270
|
+
"default": "GET"
|
|
2271
|
+
},
|
|
2272
|
+
"url": {
|
|
2273
|
+
"type": "string",
|
|
2274
|
+
"description": "URL to call. Supports variable interpolation."
|
|
2275
|
+
},
|
|
2276
|
+
"params": {
|
|
2277
|
+
"type": "object",
|
|
2278
|
+
"description": "Parameters to append to the URL. Supports variable interpolation.",
|
|
2279
|
+
"additionalProperties": {
|
|
2280
|
+
"type": "string"
|
|
2281
|
+
},
|
|
2282
|
+
"default": {}
|
|
2283
|
+
},
|
|
2284
|
+
"headers": {
|
|
2285
|
+
"type": "object",
|
|
2286
|
+
"description": "Headers to use. Supports variable interpolation.",
|
|
2287
|
+
"additionalProperties": {
|
|
2288
|
+
"type": "string"
|
|
2289
|
+
},
|
|
2290
|
+
"default": {}
|
|
2291
|
+
},
|
|
2292
|
+
"body": {
|
|
2293
|
+
"type": "object",
|
|
2294
|
+
"description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).",
|
|
2295
|
+
"additionalProperties": {
|
|
2296
|
+
"type": "string"
|
|
2297
|
+
},
|
|
2298
|
+
"default": {}
|
|
2299
|
+
}
|
|
2300
|
+
},
|
|
2301
|
+
"required": [
|
|
2302
|
+
"url"
|
|
2303
|
+
],
|
|
2304
|
+
"additionalProperties": false
|
|
2305
|
+
}
|
|
2306
|
+
},
|
|
2307
|
+
"required": [
|
|
2308
|
+
"type",
|
|
2309
|
+
"call",
|
|
2310
|
+
"id"
|
|
2311
|
+
],
|
|
2312
|
+
"additionalProperties": false
|
|
2313
|
+
},
|
|
2314
|
+
"PortalExtensionComponent": {
|
|
2315
|
+
"type": "object",
|
|
2316
|
+
"required": [
|
|
2317
|
+
"component_type",
|
|
2318
|
+
"configuration"
|
|
2319
|
+
],
|
|
2320
|
+
"properties": {
|
|
2321
|
+
"component_type": {
|
|
2322
|
+
"type": "string",
|
|
2323
|
+
"enum": [
|
|
2324
|
+
"PORTAL_EXTENSION"
|
|
2325
|
+
]
|
|
2326
|
+
},
|
|
2327
|
+
"configuration": {
|
|
2328
|
+
"$ref": "#/components/schemas/PortalExtensionConfig"
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
"PortalExtensionConfig": {
|
|
2333
|
+
"type": "object",
|
|
2334
|
+
"properties": {
|
|
2113
2335
|
"hooks": {
|
|
2114
2336
|
"type": "array",
|
|
2115
2337
|
"items": {
|
|
2116
|
-
"
|
|
2338
|
+
"type": "object",
|
|
2339
|
+
"discriminator": {
|
|
2340
|
+
"propertyName": "type",
|
|
2341
|
+
"mapping": {
|
|
2342
|
+
"registrationIdentifiersCheck": "#/components/schemas/PortalExtensionHookRegistrationIdentifiersCheck",
|
|
2343
|
+
"contractIdentification": "#/components/schemas/PortalExtensionHookContractIdentification",
|
|
2344
|
+
"priceDataRetrieval": "#/components/schemas/PortalExtensionHookPriceDataRetrieval",
|
|
2345
|
+
"consumptionDataRetrieval": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval",
|
|
2346
|
+
"costDataRetrieval": "#/components/schemas/PortalExtensionHookCostDataRetrieval",
|
|
2347
|
+
"meterReadingPlausibilityCheck": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck"
|
|
2348
|
+
}
|
|
2349
|
+
},
|
|
2350
|
+
"oneOf": [
|
|
2117
2351
|
{
|
|
2118
|
-
"$ref": "#/components/schemas/
|
|
2352
|
+
"$ref": "#/components/schemas/PortalExtensionHookRegistrationIdentifiersCheck"
|
|
2119
2353
|
},
|
|
2120
2354
|
{
|
|
2121
|
-
"
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
{
|
|
2135
|
-
"$ref": "#/components/schemas/PortalExtensionHookCostDataRetrieval"
|
|
2136
|
-
},
|
|
2137
|
-
{
|
|
2138
|
-
"$ref": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck"
|
|
2139
|
-
}
|
|
2140
|
-
]
|
|
2355
|
+
"$ref": "#/components/schemas/PortalExtensionHookContractIdentification"
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"$ref": "#/components/schemas/PortalExtensionHookPriceDataRetrieval"
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
"$ref": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
"$ref": "#/components/schemas/PortalExtensionHookCostDataRetrieval"
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
"$ref": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck"
|
|
2141
2368
|
}
|
|
2142
2369
|
]
|
|
2143
2370
|
}
|
|
@@ -2155,7 +2382,8 @@
|
|
|
2155
2382
|
},
|
|
2156
2383
|
"additionalProperties": false
|
|
2157
2384
|
},
|
|
2158
|
-
"
|
|
2385
|
+
"PortalExtensionHookRegistrationIdentifiersCheck": {
|
|
2386
|
+
"description": "Hook that replaces the built-in registration identifiers check. This hook makes a POST call whenever a user is trying to register to find the corresponding contact. The expected response to the call is:\n - 200 with contact id if exactly one contact is found\n - 404 if no contact is found or more than contact is found\n",
|
|
2159
2387
|
"type": "object",
|
|
2160
2388
|
"properties": {
|
|
2161
2389
|
"id": {
|
|
@@ -2165,13 +2393,7 @@
|
|
|
2165
2393
|
},
|
|
2166
2394
|
"name": {
|
|
2167
2395
|
"$ref": "#/components/schemas/TranslatedString"
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
},
|
|
2171
|
-
"PortalExtensionHookRegistrationIdentifiersCheck": {
|
|
2172
|
-
"description": "Hook that replaces the built-in registration identifiers check. This hook makes a POST call whenever a user is trying to register to find the corresponding contact. The expected response to the call is:\n - 200 with contact id if exactly one contact is found\n - 404 if no contact is found or more than contact is found\n",
|
|
2173
|
-
"type": "object",
|
|
2174
|
-
"properties": {
|
|
2396
|
+
},
|
|
2175
2397
|
"type": {
|
|
2176
2398
|
"type": "string",
|
|
2177
2399
|
"enum": [
|
|
@@ -2241,6 +2463,14 @@
|
|
|
2241
2463
|
"description": "Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).\nThe expected response http status code to the call is:\n - 200 if found\n - 404 if not found\n\nThe following assignment modes are supported:\n - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).\n - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.\n - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.\n\nDefaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.\n",
|
|
2242
2464
|
"type": "object",
|
|
2243
2465
|
"properties": {
|
|
2466
|
+
"id": {
|
|
2467
|
+
"type": "string",
|
|
2468
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2469
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2470
|
+
},
|
|
2471
|
+
"name": {
|
|
2472
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2473
|
+
},
|
|
2244
2474
|
"type": {
|
|
2245
2475
|
"type": "string",
|
|
2246
2476
|
"enum": [
|
|
@@ -2281,6 +2511,10 @@
|
|
|
2281
2511
|
"body": {
|
|
2282
2512
|
"type": "object",
|
|
2283
2513
|
"description": "Optional JSON body to use for the call. Defaults to object with all configured identifiers grouped by entity, e.g. `{\"contract\": {\"contract_name\": \"Name\"}}`. Supports variable interpolation."
|
|
2514
|
+
},
|
|
2515
|
+
"result": {
|
|
2516
|
+
"type": "string",
|
|
2517
|
+
"description": "Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation."
|
|
2284
2518
|
}
|
|
2285
2519
|
},
|
|
2286
2520
|
"required": [
|
|
@@ -2338,6 +2572,14 @@
|
|
|
2338
2572
|
"description": "Hook that checks the plausibility of meter readings before they are saved. This hook makes a POST call whenever a user is trying to save a meter reading. The expected response to the call is:\n - 200:\n If meter reading is plausible, the response should contain:\n - valid: true\n If meter reading is not plausible, the response should contain:\n - valid: false\n",
|
|
2339
2573
|
"type": "object",
|
|
2340
2574
|
"properties": {
|
|
2575
|
+
"id": {
|
|
2576
|
+
"type": "string",
|
|
2577
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2578
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2579
|
+
},
|
|
2580
|
+
"name": {
|
|
2581
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2582
|
+
},
|
|
2341
2583
|
"type": {
|
|
2342
2584
|
"type": "string",
|
|
2343
2585
|
"enum": [
|
|
@@ -2417,6 +2659,14 @@
|
|
|
2417
2659
|
"description": "Hook that will allow using the specified source as data for price visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n",
|
|
2418
2660
|
"type": "object",
|
|
2419
2661
|
"properties": {
|
|
2662
|
+
"id": {
|
|
2663
|
+
"type": "string",
|
|
2664
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2665
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2666
|
+
},
|
|
2667
|
+
"name": {
|
|
2668
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2669
|
+
},
|
|
2420
2670
|
"type": {
|
|
2421
2671
|
"type": "string",
|
|
2422
2672
|
"enum": [
|
|
@@ -2507,6 +2757,14 @@
|
|
|
2507
2757
|
"description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n",
|
|
2508
2758
|
"type": "object",
|
|
2509
2759
|
"properties": {
|
|
2760
|
+
"id": {
|
|
2761
|
+
"type": "string",
|
|
2762
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2763
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2764
|
+
},
|
|
2765
|
+
"name": {
|
|
2766
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2767
|
+
},
|
|
2510
2768
|
"type": {
|
|
2511
2769
|
"type": "string",
|
|
2512
2770
|
"enum": [
|
|
@@ -2597,6 +2855,14 @@
|
|
|
2597
2855
|
"description": "Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:\n - 200 with the time series data\n",
|
|
2598
2856
|
"type": "object",
|
|
2599
2857
|
"properties": {
|
|
2858
|
+
"id": {
|
|
2859
|
+
"type": "string",
|
|
2860
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2861
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
2862
|
+
},
|
|
2863
|
+
"name": {
|
|
2864
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2865
|
+
},
|
|
2600
2866
|
"type": {
|
|
2601
2867
|
"type": "string",
|
|
2602
2868
|
"enum": [
|
|
@@ -2800,6 +3066,48 @@
|
|
|
2800
3066
|
],
|
|
2801
3067
|
"additionalProperties": false
|
|
2802
3068
|
},
|
|
3069
|
+
"ExternalProductCatalogAuthBlock": {
|
|
3070
|
+
"type": "object",
|
|
3071
|
+
"properties": {
|
|
3072
|
+
"method": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"description": "HTTP method to use for authentication",
|
|
3075
|
+
"default": "GET"
|
|
3076
|
+
},
|
|
3077
|
+
"url": {
|
|
3078
|
+
"type": "string",
|
|
3079
|
+
"description": "URL to use for authentication. Supports variable interpolation."
|
|
3080
|
+
},
|
|
3081
|
+
"params": {
|
|
3082
|
+
"type": "object",
|
|
3083
|
+
"description": "Parameters to append to the URL. Supports variable interpolation.",
|
|
3084
|
+
"additionalProperties": {
|
|
3085
|
+
"type": "string"
|
|
3086
|
+
},
|
|
3087
|
+
"default": {}
|
|
3088
|
+
},
|
|
3089
|
+
"headers": {
|
|
3090
|
+
"type": "object",
|
|
3091
|
+
"description": "Headers to use for authentication. Supports variable interpolation.",
|
|
3092
|
+
"additionalProperties": {
|
|
3093
|
+
"type": "string"
|
|
3094
|
+
},
|
|
3095
|
+
"default": {}
|
|
3096
|
+
},
|
|
3097
|
+
"body": {
|
|
3098
|
+
"type": "object",
|
|
3099
|
+
"description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.",
|
|
3100
|
+
"additionalProperties": {
|
|
3101
|
+
"type": "string"
|
|
3102
|
+
},
|
|
3103
|
+
"default": {}
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
"required": [
|
|
3107
|
+
"url"
|
|
3108
|
+
],
|
|
3109
|
+
"additionalProperties": false
|
|
3110
|
+
},
|
|
2803
3111
|
"OverrideDevMode": {
|
|
2804
3112
|
"type": "object",
|
|
2805
3113
|
"description": "Override URL when app is in dev mode",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/app-client",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
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,6 +25,7 @@
|
|
|
25
25
|
"test": "jest",
|
|
26
26
|
"typescript": "tsc",
|
|
27
27
|
"bundle-definition": "webpack",
|
|
28
|
+
"openapi:local": "node ../../scripts/update-openapi.js ../../../app-api/openapi.yml",
|
|
28
29
|
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
|
|
29
30
|
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
30
31
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|