@epilot/app-client 0.12.0 → 0.12.1
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/client.d.ts +1 -1
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +20 -2
- package/dist/openapi.json +38 -0
- package/package.json +4 -7
package/dist/client.d.ts
CHANGED
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={330(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":{"get":{"operationId":"listPublicConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"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}(330),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
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
1
|
import type {
|
|
4
2
|
OpenAPIClient,
|
|
5
3
|
Parameters,
|
|
@@ -1541,6 +1539,7 @@ declare namespace Components {
|
|
|
1541
1539
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1542
1540
|
*/
|
|
1543
1541
|
use_static_ips?: boolean;
|
|
1542
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1544
1543
|
}
|
|
1545
1544
|
/**
|
|
1546
1545
|
* 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).
|
|
@@ -1622,6 +1621,7 @@ declare namespace Components {
|
|
|
1622
1621
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1623
1622
|
*/
|
|
1624
1623
|
use_static_ips?: boolean;
|
|
1624
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1625
1625
|
}
|
|
1626
1626
|
/**
|
|
1627
1627
|
* 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:
|
|
@@ -1678,6 +1678,7 @@ declare namespace Components {
|
|
|
1678
1678
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1679
1679
|
*/
|
|
1680
1680
|
use_static_ips?: boolean;
|
|
1681
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1681
1682
|
}
|
|
1682
1683
|
/**
|
|
1683
1684
|
* 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:
|
|
@@ -1771,6 +1772,7 @@ declare namespace Components {
|
|
|
1771
1772
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1772
1773
|
*/
|
|
1773
1774
|
use_static_ips?: boolean;
|
|
1775
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1774
1776
|
}
|
|
1775
1777
|
/**
|
|
1776
1778
|
* 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:
|
|
@@ -1827,6 +1829,7 @@ declare namespace Components {
|
|
|
1827
1829
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1828
1830
|
*/
|
|
1829
1831
|
use_static_ips?: boolean;
|
|
1832
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1830
1833
|
}
|
|
1831
1834
|
/**
|
|
1832
1835
|
* 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:
|
|
@@ -1878,6 +1881,7 @@ declare namespace Components {
|
|
|
1878
1881
|
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1879
1882
|
*/
|
|
1880
1883
|
use_static_ips?: boolean;
|
|
1884
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1881
1885
|
}
|
|
1882
1886
|
export interface PortalExtensionSeamlessLink {
|
|
1883
1887
|
/**
|
|
@@ -1907,6 +1911,19 @@ declare namespace Components {
|
|
|
1907
1911
|
};
|
|
1908
1912
|
};
|
|
1909
1913
|
}
|
|
1914
|
+
/**
|
|
1915
|
+
* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips.
|
|
1916
|
+
*/
|
|
1917
|
+
export interface PortalExtensionSecureProxy {
|
|
1918
|
+
/**
|
|
1919
|
+
* Integration ID that owns the secure_proxy use case.
|
|
1920
|
+
*/
|
|
1921
|
+
integration_id: string; // uuid
|
|
1922
|
+
/**
|
|
1923
|
+
* Use case slug for the secure proxy use case.
|
|
1924
|
+
*/
|
|
1925
|
+
use_case_slug: string;
|
|
1926
|
+
}
|
|
1910
1927
|
export interface Pricing {
|
|
1911
1928
|
pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
|
|
1912
1929
|
billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
|
|
@@ -3359,6 +3376,7 @@ export type PortalExtensionHookMeterReadingPlausibilityCheck = Components.Schema
|
|
|
3359
3376
|
export type PortalExtensionHookPriceDataRetrieval = Components.Schemas.PortalExtensionHookPriceDataRetrieval;
|
|
3360
3377
|
export type PortalExtensionHookRegistrationIdentifiersCheck = Components.Schemas.PortalExtensionHookRegistrationIdentifiersCheck;
|
|
3361
3378
|
export type PortalExtensionSeamlessLink = Components.Schemas.PortalExtensionSeamlessLink;
|
|
3379
|
+
export type PortalExtensionSecureProxy = Components.Schemas.PortalExtensionSecureProxy;
|
|
3362
3380
|
export type Pricing = Components.Schemas.Pricing;
|
|
3363
3381
|
export type PublicConfiguration = Components.Schemas.PublicConfiguration;
|
|
3364
3382
|
export type RawEvents = Components.Schemas.RawEvents;
|
package/dist/openapi.json
CHANGED
|
@@ -2596,6 +2596,9 @@
|
|
|
2596
2596
|
"type": "boolean",
|
|
2597
2597
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
2598
2598
|
"default": false
|
|
2599
|
+
},
|
|
2600
|
+
"secure_proxy": {
|
|
2601
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
2599
2602
|
}
|
|
2600
2603
|
},
|
|
2601
2604
|
"required": [
|
|
@@ -2706,6 +2709,9 @@
|
|
|
2706
2709
|
"type": "boolean",
|
|
2707
2710
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
2708
2711
|
"default": false
|
|
2712
|
+
},
|
|
2713
|
+
"secure_proxy": {
|
|
2714
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
2709
2715
|
}
|
|
2710
2716
|
},
|
|
2711
2717
|
"required": [
|
|
@@ -2814,6 +2820,9 @@
|
|
|
2814
2820
|
"type": "boolean",
|
|
2815
2821
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
2816
2822
|
"default": false
|
|
2823
|
+
},
|
|
2824
|
+
"secure_proxy": {
|
|
2825
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
2817
2826
|
}
|
|
2818
2827
|
},
|
|
2819
2828
|
"required": [
|
|
@@ -2911,6 +2920,9 @@
|
|
|
2911
2920
|
"type": "boolean",
|
|
2912
2921
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
2913
2922
|
"default": false
|
|
2923
|
+
},
|
|
2924
|
+
"secure_proxy": {
|
|
2925
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
2914
2926
|
}
|
|
2915
2927
|
},
|
|
2916
2928
|
"required": [
|
|
@@ -3007,6 +3019,9 @@
|
|
|
3007
3019
|
"type": "boolean",
|
|
3008
3020
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
3009
3021
|
"default": false
|
|
3022
|
+
},
|
|
3023
|
+
"secure_proxy": {
|
|
3024
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
3010
3025
|
}
|
|
3011
3026
|
},
|
|
3012
3027
|
"required": [
|
|
@@ -3103,6 +3118,9 @@
|
|
|
3103
3118
|
"type": "boolean",
|
|
3104
3119
|
"description": "If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.",
|
|
3105
3120
|
"default": false
|
|
3121
|
+
},
|
|
3122
|
+
"secure_proxy": {
|
|
3123
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
3106
3124
|
}
|
|
3107
3125
|
},
|
|
3108
3126
|
"required": [
|
|
@@ -3226,6 +3244,26 @@
|
|
|
3226
3244
|
],
|
|
3227
3245
|
"additionalProperties": false
|
|
3228
3246
|
},
|
|
3247
|
+
"PortalExtensionSecureProxy": {
|
|
3248
|
+
"type": "object",
|
|
3249
|
+
"description": "If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips.",
|
|
3250
|
+
"properties": {
|
|
3251
|
+
"integration_id": {
|
|
3252
|
+
"type": "string",
|
|
3253
|
+
"format": "uuid",
|
|
3254
|
+
"description": "Integration ID that owns the secure_proxy use case."
|
|
3255
|
+
},
|
|
3256
|
+
"use_case_slug": {
|
|
3257
|
+
"type": "string",
|
|
3258
|
+
"description": "Use case slug for the secure proxy use case."
|
|
3259
|
+
}
|
|
3260
|
+
},
|
|
3261
|
+
"required": [
|
|
3262
|
+
"integration_id",
|
|
3263
|
+
"use_case_slug"
|
|
3264
|
+
],
|
|
3265
|
+
"additionalProperties": false
|
|
3266
|
+
},
|
|
3229
3267
|
"ExternalProductCatalogAuthBlock": {
|
|
3230
3268
|
"type": "object",
|
|
3231
3269
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/app-client",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "JavaScript client library for the epilot App API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"app"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"test": "
|
|
25
|
+
"test": "vitest",
|
|
26
26
|
"typescript": "tsc",
|
|
27
27
|
"bundle-definition": "webpack",
|
|
28
28
|
"openapi:local": "node ../../scripts/update-openapi.js ../../../app-api/openapi.yml",
|
|
29
29
|
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
|
|
30
|
-
"typegen": "openapi typegen src/openapi.json --client
|
|
30
|
+
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
31
31
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
32
32
|
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
33
33
|
"build:watch": "npm run build && tsc -w",
|
|
34
34
|
"release-alpha": "npm version prerelease --preid alpha",
|
|
35
35
|
"prepublishOnly": "npm run typegen && npm run build",
|
|
36
|
-
"lint": "
|
|
36
|
+
"lint": "biome check src"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"*.js",
|
|
@@ -61,13 +61,10 @@
|
|
|
61
61
|
"util": "^0.12.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@types/jest": "^26.0.20",
|
|
65
64
|
"axios": "^1.11.0",
|
|
66
65
|
"copy-webpack-plugin": "^7.0.0",
|
|
67
|
-
"jest": "^29.6.2",
|
|
68
66
|
"json-loader": "^0.5.7",
|
|
69
67
|
"openapicmd": "^2.7.0",
|
|
70
|
-
"ts-jest": "^29.4.1",
|
|
71
68
|
"ts-loader": "^8.0.14",
|
|
72
69
|
"ts-node": "^10.9.1",
|
|
73
70
|
"typescript": "^4.1.3",
|