@epilot/app-client 0.11.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 CHANGED
@@ -1,3 +1,3 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
3
  export declare const createClient: () => Client;
package/dist/openapi.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -247,7 +245,7 @@ declare namespace Components {
247
245
  surfaces?: {
248
246
  [key: string]: any;
249
247
  };
250
- } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent);
248
+ } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent | CustomPageComponent);
251
249
  export interface BaseComponentCommon {
252
250
  /**
253
251
  * Unique identifier for the component
@@ -451,7 +449,7 @@ declare namespace Components {
451
449
  /**
452
450
  * Type of app component
453
451
  */
454
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG";
452
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE";
455
453
  /**
456
454
  * Configuration of the published app
457
455
  */
@@ -822,6 +820,37 @@ declare namespace Components {
822
820
  };
823
821
  }
824
822
  export type CustomFlowConfig = ExternalIntegrationCustomActionConfig | SandboxCustomActionConfig;
823
+ export interface CustomPageComponent {
824
+ component_type: "CUSTOM_PAGE";
825
+ configuration: CustomPageConfig;
826
+ surfaces?: {
827
+ page?: AppBridgeSurfaceConfig;
828
+ };
829
+ }
830
+ export interface CustomPageConfig {
831
+ /**
832
+ * URL slug for the page route. Must be unique per organization.
833
+ * example:
834
+ * zapier
835
+ */
836
+ slug: string; // ^[a-z0-9][a-z0-9-]*[a-z0-9]$
837
+ /**
838
+ * Display label in the navigation sidebar.
839
+ * example:
840
+ * Zapier
841
+ */
842
+ nav_label?: string;
843
+ /**
844
+ * Icon identifier for the navigation item.
845
+ * example:
846
+ * zap
847
+ */
848
+ nav_icon?: string;
849
+ /**
850
+ * Optional tooltip or description for the navigation item.
851
+ */
852
+ nav_description?: string;
853
+ }
825
854
  export interface EnumArg {
826
855
  type?: "enum";
827
856
  /**
@@ -1510,6 +1539,7 @@ declare namespace Components {
1510
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.
1511
1540
  */
1512
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;
1513
1543
  }
1514
1544
  /**
1515
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).
@@ -1591,6 +1621,7 @@ declare namespace Components {
1591
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.
1592
1622
  */
1593
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;
1594
1625
  }
1595
1626
  /**
1596
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:
@@ -1647,6 +1678,7 @@ declare namespace Components {
1647
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.
1648
1679
  */
1649
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;
1650
1682
  }
1651
1683
  /**
1652
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:
@@ -1740,6 +1772,7 @@ declare namespace Components {
1740
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.
1741
1773
  */
1742
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;
1743
1776
  }
1744
1777
  /**
1745
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:
@@ -1796,6 +1829,7 @@ declare namespace Components {
1796
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.
1797
1830
  */
1798
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;
1799
1833
  }
1800
1834
  /**
1801
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:
@@ -1847,6 +1881,7 @@ declare namespace Components {
1847
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.
1848
1882
  */
1849
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;
1850
1885
  }
1851
1886
  export interface PortalExtensionSeamlessLink {
1852
1887
  /**
@@ -1876,6 +1911,19 @@ declare namespace Components {
1876
1911
  };
1877
1912
  };
1878
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
+ }
1879
1927
  export interface Pricing {
1880
1928
  pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
1881
1929
  billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
@@ -3292,6 +3340,8 @@ export type ConfigurationVersion = Components.Schemas.ConfigurationVersion;
3292
3340
  export type CustomCapabilityComponent = Components.Schemas.CustomCapabilityComponent;
3293
3341
  export type CustomFlowActionComponent = Components.Schemas.CustomFlowActionComponent;
3294
3342
  export type CustomFlowConfig = Components.Schemas.CustomFlowConfig;
3343
+ export type CustomPageComponent = Components.Schemas.CustomPageComponent;
3344
+ export type CustomPageConfig = Components.Schemas.CustomPageConfig;
3295
3345
  export type EnumArg = Components.Schemas.EnumArg;
3296
3346
  export type ErpInformToolkitComponent = Components.Schemas.ErpInformToolkitComponent;
3297
3347
  export type EventsQuery = Components.Schemas.EventsQuery;
@@ -3326,6 +3376,7 @@ export type PortalExtensionHookMeterReadingPlausibilityCheck = Components.Schema
3326
3376
  export type PortalExtensionHookPriceDataRetrieval = Components.Schemas.PortalExtensionHookPriceDataRetrieval;
3327
3377
  export type PortalExtensionHookRegistrationIdentifiersCheck = Components.Schemas.PortalExtensionHookRegistrationIdentifiersCheck;
3328
3378
  export type PortalExtensionSeamlessLink = Components.Schemas.PortalExtensionSeamlessLink;
3379
+ export type PortalExtensionSecureProxy = Components.Schemas.PortalExtensionSecureProxy;
3329
3380
  export type Pricing = Components.Schemas.Pricing;
3330
3381
  export type PublicConfiguration = Components.Schemas.PublicConfiguration;
3331
3382
  export type RawEvents = Components.Schemas.RawEvents;
package/dist/openapi.json CHANGED
@@ -1831,7 +1831,8 @@
1831
1831
  "CUSTOM_FLOW_ACTION",
1832
1832
  "ERP_INFORM_TOOLKIT",
1833
1833
  "CUSTOM_CAPABILITY",
1834
- "EXTERNAL_PRODUCT_CATALOG"
1834
+ "EXTERNAL_PRODUCT_CATALOG",
1835
+ "CUSTOM_PAGE"
1835
1836
  ],
1836
1837
  "description": "Type of app component"
1837
1838
  },
@@ -1942,7 +1943,8 @@
1942
1943
  "CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent",
1943
1944
  "ERP_INFORM_TOOLKIT": "#/components/schemas/ErpInformToolkitComponent",
1944
1945
  "CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
1945
- "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent"
1946
+ "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent",
1947
+ "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent"
1946
1948
  }
1947
1949
  },
1948
1950
  "oneOf": [
@@ -1966,6 +1968,9 @@
1966
1968
  },
1967
1969
  {
1968
1970
  "$ref": "#/components/schemas/ExternalProductCatalogComponent"
1971
+ },
1972
+ {
1973
+ "$ref": "#/components/schemas/CustomPageComponent"
1969
1974
  }
1970
1975
  ]
1971
1976
  }
@@ -2016,6 +2021,60 @@
2016
2021
  }
2017
2022
  }
2018
2023
  },
2024
+ "CustomPageComponent": {
2025
+ "type": "object",
2026
+ "required": [
2027
+ "component_type",
2028
+ "configuration"
2029
+ ],
2030
+ "properties": {
2031
+ "component_type": {
2032
+ "type": "string",
2033
+ "enum": [
2034
+ "CUSTOM_PAGE"
2035
+ ]
2036
+ },
2037
+ "configuration": {
2038
+ "$ref": "#/components/schemas/CustomPageConfig"
2039
+ },
2040
+ "surfaces": {
2041
+ "type": "object",
2042
+ "properties": {
2043
+ "page": {
2044
+ "$ref": "#/components/schemas/AppBridgeSurfaceConfig"
2045
+ }
2046
+ }
2047
+ }
2048
+ }
2049
+ },
2050
+ "CustomPageConfig": {
2051
+ "type": "object",
2052
+ "required": [
2053
+ "slug"
2054
+ ],
2055
+ "properties": {
2056
+ "slug": {
2057
+ "type": "string",
2058
+ "description": "URL slug for the page route. Must be unique per organization.",
2059
+ "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
2060
+ "example": "zapier"
2061
+ },
2062
+ "nav_label": {
2063
+ "type": "string",
2064
+ "description": "Display label in the navigation sidebar.",
2065
+ "example": "Zapier"
2066
+ },
2067
+ "nav_icon": {
2068
+ "type": "string",
2069
+ "description": "Icon identifier for the navigation item.",
2070
+ "example": "zap"
2071
+ },
2072
+ "nav_description": {
2073
+ "type": "string",
2074
+ "description": "Optional tooltip or description for the navigation item."
2075
+ }
2076
+ }
2077
+ },
2019
2078
  "JourneyBlockComponent": {
2020
2079
  "type": "object",
2021
2080
  "required": [
@@ -2537,6 +2596,9 @@
2537
2596
  "type": "boolean",
2538
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.",
2539
2598
  "default": false
2599
+ },
2600
+ "secure_proxy": {
2601
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
2540
2602
  }
2541
2603
  },
2542
2604
  "required": [
@@ -2647,6 +2709,9 @@
2647
2709
  "type": "boolean",
2648
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.",
2649
2711
  "default": false
2712
+ },
2713
+ "secure_proxy": {
2714
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
2650
2715
  }
2651
2716
  },
2652
2717
  "required": [
@@ -2755,6 +2820,9 @@
2755
2820
  "type": "boolean",
2756
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.",
2757
2822
  "default": false
2823
+ },
2824
+ "secure_proxy": {
2825
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
2758
2826
  }
2759
2827
  },
2760
2828
  "required": [
@@ -2852,6 +2920,9 @@
2852
2920
  "type": "boolean",
2853
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.",
2854
2922
  "default": false
2923
+ },
2924
+ "secure_proxy": {
2925
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
2855
2926
  }
2856
2927
  },
2857
2928
  "required": [
@@ -2948,6 +3019,9 @@
2948
3019
  "type": "boolean",
2949
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.",
2950
3021
  "default": false
3022
+ },
3023
+ "secure_proxy": {
3024
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
2951
3025
  }
2952
3026
  },
2953
3027
  "required": [
@@ -3044,6 +3118,9 @@
3044
3118
  "type": "boolean",
3045
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.",
3046
3120
  "default": false
3121
+ },
3122
+ "secure_proxy": {
3123
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
3047
3124
  }
3048
3125
  },
3049
3126
  "required": [
@@ -3167,6 +3244,26 @@
3167
3244
  ],
3168
3245
  "additionalProperties": false
3169
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
+ },
3170
3267
  "ExternalProductCatalogAuthBlock": {
3171
3268
  "type": "object",
3172
3269
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.11.0",
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": "jest",
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 -b '/* eslint-disable */' > src/openapi.d.ts",
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": "pnpm exec eslint src"
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",