@betterview/integration-toolkit 1.3.2 → 1.3.3-rc.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.
Files changed (41) hide show
  1. package/package.json +1 -3
  2. package/lib/Deployment/index.d.ts +0 -11
  3. package/lib/Deployment/index.d.ts.map +0 -1
  4. package/lib/Deployment/index.js +0 -63
  5. package/lib/Deployment/index.js.map +0 -1
  6. package/lib/Network/axios-error-handling.d.ts +0 -26
  7. package/lib/Network/axios-error-handling.d.ts.map +0 -1
  8. package/lib/Network/axios-error-handling.js +0 -52
  9. package/lib/Network/axios-error-handling.js.map +0 -1
  10. package/lib/Network/index.d.ts +0 -11
  11. package/lib/Network/index.d.ts.map +0 -1
  12. package/lib/Network/index.js +0 -19
  13. package/lib/Network/index.js.map +0 -1
  14. package/lib/TestHarness/index.d.ts +0 -9
  15. package/lib/TestHarness/index.d.ts.map +0 -1
  16. package/lib/TestHarness/index.js +0 -35
  17. package/lib/TestHarness/index.js.map +0 -1
  18. package/lib/types/EnrichmentComponentArgs.d.ts +0 -5
  19. package/lib/types/EnrichmentComponentArgs.d.ts.map +0 -1
  20. package/lib/types/EnrichmentComponentArgs.js +0 -3
  21. package/lib/types/EnrichmentComponentArgs.js.map +0 -1
  22. package/lib/types/IEnrichmentIntegration.d.ts +0 -27
  23. package/lib/types/IEnrichmentIntegration.d.ts.map +0 -1
  24. package/lib/types/IEnrichmentIntegration.js +0 -3
  25. package/lib/types/IEnrichmentIntegration.js.map +0 -1
  26. package/lib/types/IPartnerDataSchema.d.ts +0 -25
  27. package/lib/types/IPartnerDataSchema.d.ts.map +0 -1
  28. package/lib/types/IPartnerDataSchema.js +0 -13
  29. package/lib/types/IPartnerDataSchema.js.map +0 -1
  30. package/lib/types/IntegrationManifest.d.ts +0 -18
  31. package/lib/types/IntegrationManifest.d.ts.map +0 -1
  32. package/lib/types/IntegrationManifest.js +0 -3
  33. package/lib/types/IntegrationManifest.js.map +0 -1
  34. package/lib/types/index.d.ts +0 -5
  35. package/lib/types/index.d.ts.map +0 -1
  36. package/lib/types/index.js +0 -17
  37. package/lib/types/index.js.map +0 -1
  38. package/lib/utils/index.d.ts +0 -2
  39. package/lib/utils/index.d.ts.map +0 -1
  40. package/lib/utils/index.js +0 -12
  41. package/lib/utils/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterview/integration-toolkit",
3
- "version": "1.3.2",
3
+ "version": "1.3.3-rc.1",
4
4
  "description": "Supports integration packages. This should be the only import from our integrations",
5
5
  "scripts": {
6
6
  "prebuild": "rm -rf ./lib",
@@ -16,9 +16,7 @@
16
16
  "author": "",
17
17
  "license": "UNLICENSED",
18
18
  "dependencies": {
19
- "async": "^3.2.1",
20
19
  "axios": "0.21.1",
21
- "fs-extra": "^10.0.0",
22
20
  "json-colorizer": "2.2.2"
23
21
  },
24
22
  "devDependencies": {
@@ -1,11 +0,0 @@
1
- import { IntegrationManifest } from '../types';
2
- export declare type DatabaseScript = {
3
- run: string;
4
- rollback: string;
5
- };
6
- export declare type PartnerHubInstallScripts = {
7
- install_partner: DatabaseScript;
8
- install_flags: DatabaseScript;
9
- };
10
- export declare function generateDatabaseScripts(integration: IntegrationManifest): PartnerHubInstallScripts;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Deployment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,oBAAY,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,eAAe,EAAE,cAAc,CAAC;IAChC,aAAa,EAAE,cAAc,CAAC;CAC/B,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,mBAAmB,GAAG,wBAAwB,CA8DlG"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateDatabaseScripts = void 0;
4
- function generateDatabaseScripts(integration) {
5
- const { partner, offering, description, abstract, contact_email, contact_name, website_url } = integration;
6
- const intName = `${partner.toLowerCase()}_${offering.toLowerCase()}`;
7
- const ph_create = `
8
- do $$
9
- declare offering_id bigint;
10
- begin
11
- create table if not exists ph.${intName} (
12
- id bigint not null primary key default id_generator(1),
13
- property_id int not null,
14
- request_url text,
15
- response jsonb,
16
- added timestamptz not null default now()
17
- );
18
-
19
- insert into ph.partner_offering (partner, offering, table_name, matrix_option, credentials_schema) values ('${partner}', '${offering}', '${intName}', 'include_${intName}', '{}') returning id into offering_id;
20
- insert into ph.offering_detail (partner_offering_id, title, subtitle, description, contact_name, contact_email, website_url, abstract) values (offering_id, '${partner}', '${offering}', '${description}', '${contact_name}', '${contact_email}', '${website_url}', '${abstract}');
21
- insert into ph.offering_card (partner_offering_id, config) values (offering_id, '{"name": "${partner} - ${offering}", "type": 2, "data_path": "${intName}" }');
22
- insert into ph.client_org_offering (partner_offering_id, client_org_id, credentials) values (offering_id, -1, '<encrypted credentials here>');
23
- end$$
24
- `;
25
- const ph_rollback = `
26
- drop table ph.${intName};
27
- delete from ph.offering_detail where partner_offering_id = <partner_offering_id>
28
- delete from ph.offering_card where partner_offering_id = <partner_offering_id>
29
- `;
30
- const flag_create = `
31
- do $$
32
- declare
33
- sectionid bigint;
34
- subsectionid bigint;
35
- begin
36
- insert into flags.options_section (display, position, color) values ('${partner}', 999, '#000000') returning id into sectionid;
37
-
38
- insert into flags.options_subsection(options_section_id, display)
39
- values (sectionid, '${partner} ${offering}')
40
- returning id into subsectionid;
41
-
42
- insert into flags.option(options_subsection_id, display, type, source, key, placeholder)
43
- values (subsectionid, 'Match Value(s)', 'value', '${intName}', 'custom', 'Case-insesitive, comma separated');
44
- end $$;
45
- `;
46
- const flag_rollback = `
47
- delete from flags.option where source = '${intName}' and key = 'custom';
48
- delete from flags.options_subsection where display = '${partner} ${offering}';
49
- delete from flags.options_section where display = '${partner}' and position = 999;
50
- `;
51
- return {
52
- install_partner: {
53
- run: ph_create,
54
- rollback: ph_rollback
55
- },
56
- install_flags: {
57
- run: flag_create,
58
- rollback: flag_rollback
59
- }
60
- };
61
- }
62
- exports.generateDatabaseScripts = generateDatabaseScripts;
63
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Deployment/index.ts"],"names":[],"mappings":";;;AAYA,SAAgB,uBAAuB,CAAC,WAAgC;IACtE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IAC3G,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;IAErE,MAAM,SAAS,GAAG;;;;oCAIgB,OAAO;;;;;;;;kHAQuE,OAAO,OAAO,QAAQ,OAAO,OAAO,eAAe,OAAO;mKACT,OAAO,OAAO,QAAQ,OAAO,WAAW,OAAO,YAAY,OAAO,aAAa,OAAO,WAAW,OAAO,QAAQ;iGAClL,OAAO,MAAM,QAAQ,+BAA+B,OAAO;;;GAGzJ,CAAC;IAEF,MAAM,WAAW,GAAG;oBACF,OAAO;;;GAGxB,CAAC;IAEF,MAAM,WAAW,GAAG;;;;;;gFAM0D,OAAO;;;8BAGzD,OAAO,IAAI,QAAQ;;;;4DAIW,OAAO;;KAE9D,CAAC;IAEJ,MAAM,aAAa,GAAG;+CACuB,OAAO;4DACM,OAAO,IAAI,QAAQ;yDACtB,OAAO;GAC7D,CAAC;IAEF,OAAO;QACL,eAAe,EAAE;YACf,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,WAAW;SACtB;QACD,aAAa,EAAE;YACb,GAAG,EAAE,WAAW;YAChB,QAAQ,EAAE,aAAa;SACxB;KACF,CAAC;AACJ,CAAC;AA9DD,0DA8DC"}
@@ -1,26 +0,0 @@
1
- import { AxiosError, AxiosResponse } from 'axios';
2
- export declare type FriendlyName = 'server error' | 'no response' | 'request init failure' | 'auth error' | 'endpoint not found';
3
- export interface SimplifiedError {
4
- /** the status code number (e.g. 500) */
5
- statusCode?: number;
6
- data?: any;
7
- /** the status code name (e.g. ETIMEDOUT) */
8
- code?: string;
9
- responseHeaders?: Record<string, string>;
10
- /**
11
- * server error: the server responded with an error
12
- * no repsonse: no response was received from the server
13
- * request init failure: axios failed to create the request to send
14
- */
15
- friendly: FriendlyName;
16
- }
17
- /** simplifies an axios error, exposing the properties that are commonly used and friendly name to help decision trees */
18
- export declare function simplifyError(err: AxiosError): SimplifiedError;
19
- export interface IWrapResult<T> {
20
- data?: T;
21
- headers?: Record<string, string>;
22
- err?: SimplifiedError;
23
- }
24
- /** wraps an axios api call, resulting in a successful promise containing either the requested data or a simplfied error */
25
- export declare function wrap<T>(axiosApiCall: Promise<AxiosResponse<T> | AxiosError<T>>): Promise<IWrapResult<T>>;
26
- //# sourceMappingURL=axios-error-handling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"axios-error-handling.d.ts","sourceRoot":"","sources":["../../src/Network/axios-error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,oBAAY,YAAY,GACpB,cAAc,GACd,aAAa,GACb,sBAAsB,GACtB,YAAY,GACZ,oBAAoB,CAAC;AAEzB,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC;;;;OAIG;IACH,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,yHAAyH;AACzH,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,eAAe,CAa9D;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB;AAeD,2HAA2H;AAC3H,wBAAsB,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAe9G"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wrap = exports.simplifyError = void 0;
4
- /** simplifies an axios error, exposing the properties that are commonly used and friendly name to help decision trees */
5
- function simplifyError(err) {
6
- let friendly = 'request init failure';
7
- const statusCode = `${err.code ?? err.response?.status}`;
8
- if (err.response)
9
- friendly = convertStatusCode(statusCode);
10
- else if (err.request)
11
- friendly = 'no response';
12
- return {
13
- statusCode: err.response?.status,
14
- data: err.response?.data,
15
- code: statusCode,
16
- responseHeaders: err.response?.headers,
17
- friendly
18
- };
19
- }
20
- exports.simplifyError = simplifyError;
21
- function convertStatusCode(code) {
22
- switch (code) {
23
- case '401':
24
- return 'auth error';
25
- case '500':
26
- return 'server error';
27
- case '404':
28
- return 'endpoint not found';
29
- default:
30
- return 'no response';
31
- }
32
- }
33
- /** wraps an axios api call, resulting in a successful promise containing either the requested data or a simplfied error */
34
- async function wrap(axiosApiCall) {
35
- const result = {};
36
- try {
37
- let r = await axiosApiCall;
38
- if (r.isAxiosError !== undefined) {
39
- throw r;
40
- }
41
- r = r;
42
- result.headers = r.headers;
43
- result.data = r.data;
44
- }
45
- catch (err) {
46
- const simple = simplifyError(err);
47
- result.err = simple;
48
- }
49
- return result;
50
- }
51
- exports.wrap = wrap;
52
- //# sourceMappingURL=axios-error-handling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"axios-error-handling.js","sourceRoot":"","sources":["../../src/Network/axios-error-handling.ts"],"names":[],"mappings":";;;AAwBA,yHAAyH;AACzH,SAAgB,aAAa,CAAC,GAAe;IAC3C,IAAI,QAAQ,GAAiB,sBAAsB,CAAC;IACpD,MAAM,UAAU,GAAG,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACzD,IAAI,GAAG,CAAC,QAAQ;QAAE,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;SACtD,IAAI,GAAG,CAAC,OAAO;QAAE,QAAQ,GAAG,aAAa,CAAC;IAE/C,OAAO;QACL,UAAU,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM;QAChC,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI;QACxB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO;QACtC,QAAQ;KACT,CAAC;AACJ,CAAC;AAbD,sCAaC;AAQD,SAAS,iBAAiB,CAAC,IAAY;IACrC,QAAQ,IAAI,EAAE;QACZ,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,cAAc,CAAC;QACxB,KAAK,KAAK;YACR,OAAO,oBAAoB,CAAC;QAC9B;YACE,OAAO,aAAa,CAAC;KACxB;AACH,CAAC;AAED,2HAA2H;AACpH,KAAK,UAAU,IAAI,CAAI,YAAuD;IACnF,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,IAAI;QACF,IAAI,CAAC,GAAG,MAAM,YAAY,CAAC;QAC3B,IAAK,CAAgB,CAAC,YAAY,KAAK,SAAS,EAAE;YAChD,MAAM,CAAC,CAAC;SACT;QACD,CAAC,GAAG,CAAqB,CAAC;QAC1B,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;QAC3B,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;KACtB;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,MAAM,GAAG,aAAa,CAAC,GAAsB,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC;KACrB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAfD,oBAeC"}
@@ -1,11 +0,0 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- import { IWrapResult } from './axios-error-handling';
3
- export declare function get(url: string, config: AxiosRequestConfig): Promise<{
4
- request_url: string;
5
- result: IWrapResult<Record<string, any>>;
6
- }>;
7
- export declare function post(url: string, data: any, config: AxiosRequestConfig): Promise<{
8
- request_url: string;
9
- result: IWrapResult<Record<string, any>>;
10
- }>;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Network/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,WAAW,EAAQ,MAAM,wBAAwB,CAAC;AAE3D,wBAAsB,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;CAAE,CAAC,CAG5E;AAED,wBAAsB,IAAI,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;CAAE,CAAC,CAG5E"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.post = exports.get = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const axios_error_handling_1 = require("./axios-error-handling");
9
- async function get(url, config) {
10
- const result = await axios_error_handling_1.wrap(axios_1.default.get(url, config));
11
- return { request_url: url, result };
12
- }
13
- exports.get = get;
14
- async function post(url, data, config) {
15
- const result = await axios_error_handling_1.wrap(axios_1.default.post(url, data, config));
16
- return { request_url: url, result };
17
- }
18
- exports.post = post;
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Network/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD;AAClD,iEAA2D;AAEpD,KAAK,UAAU,GAAG,CACvB,GAAW,EACX,MAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,2BAAI,CAAC,eAAK,CAAC,GAAG,CAAsB,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;IACvE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC;AAND,kBAMC;AAEM,KAAK,UAAU,IAAI,CACxB,GAAW,EACX,IAAS,EACT,MAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,2BAAI,CAAC,eAAK,CAAC,IAAI,CAAsB,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9E,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC;AAPD,oBAOC"}
@@ -1,9 +0,0 @@
1
- import { IEnrichmentIntegration, IEnrichmentIntegrationRequestData } from '../types';
2
- export default class TestHarness {
3
- integration: IEnrichmentIntegration;
4
- requestData: IEnrichmentIntegrationRequestData | undefined;
5
- constructor(integration: IEnrichmentIntegration, requestData?: IEnrichmentIntegrationRequestData);
6
- runGetData(): Promise<Record<string, any> | undefined>;
7
- setMockRequestData(): void;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TestHarness/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;AAGrF,MAAM,CAAC,OAAO,OAAO,WAAW;IACvB,WAAW,EAAE,sBAAsB,CAAC;IACpC,WAAW,EAAE,iCAAiC,GAAG,SAAS,CAAC;gBAEtD,WAAW,EAAE,sBAAsB,EAAE,WAAW,CAAC,EAAE,iCAAiC;IAKnF,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAU5D,kBAAkB;CAe1B"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- class TestHarness {
5
- constructor(integration, requestData) {
6
- this.integration = integration;
7
- this.requestData = requestData;
8
- }
9
- async runGetData() {
10
- if (!this.requestData) {
11
- this.setMockRequestData();
12
- }
13
- console.log('Request data set to: ', utils_1.jsonLog(this.requestData));
14
- const result = await this.integration.getData?.(this.requestData);
15
- console.log(`Result:`, utils_1.jsonLog(result));
16
- return result;
17
- }
18
- setMockRequestData() {
19
- this.requestData = {
20
- full_address: '100 Pringle Ave. Walnut Creek, CA 94596',
21
- street: '100 Pringle Ave.',
22
- city: 'Walnut Creek',
23
- zip: '94596',
24
- state: 'CA',
25
- // fill this w/the true credentials from the offering
26
- credentials: { username: 'test', password: 'test' },
27
- externalId: 'external1',
28
- insuredName: 'Jane Doe',
29
- latitude: 37.90820797421544,
30
- longitude: -122.067761097756
31
- };
32
- }
33
- }
34
- exports.default = TestHarness;
35
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/TestHarness/index.ts"],"names":[],"mappings":";;AACA,oCAAmC;AAEnC,MAAqB,WAAW;IAI9B,YAAY,WAAmC,EAAE,WAA+C;QAC9F,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAC3B;QACD,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,eAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,WAAY,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,eAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,kBAAkB;QACvB,IAAI,CAAC,WAAW,GAAG;YACjB,YAAY,EAAE,yCAAyC;YACvD,MAAM,EAAE,kBAAkB;YAC1B,IAAI,EAAE,cAAc;YACpB,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,IAAI;YACX,qDAAqD;YACrD,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;YACnD,UAAU,EAAE,WAAW;YACvB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,iBAAiB;YAC3B,SAAS,EAAE,CAAC,gBAAgB;SAC7B,CAAC;IACJ,CAAC;CACF;AAlCD,8BAkCC"}
@@ -1,5 +0,0 @@
1
- export declare type EnrichmentComponentArgs = {
2
- partnerHubData?: Record<string, any>;
3
- previewMode?: boolean;
4
- };
5
- //# sourceMappingURL=EnrichmentComponentArgs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnrichmentComponentArgs.d.ts","sourceRoot":"","sources":["../../src/types/EnrichmentComponentArgs.ts"],"names":[],"mappings":"AAAA,oBAAY,uBAAuB,GAAG;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=EnrichmentComponentArgs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnrichmentComponentArgs.js","sourceRoot":"","sources":["../../src/types/EnrichmentComponentArgs.ts"],"names":[],"mappings":""}
@@ -1,27 +0,0 @@
1
- export interface IEnrichmentIntegration {
2
- /**
3
- * Pulls data from the vendor and returns the data graph in JSON format.
4
- */
5
- getData(requestData: IEnrichmentIntegrationRequestData): Promise<EnrichmentIntegrationResult>;
6
- }
7
- export interface IEnrichmentIntegrationRequestData {
8
- credentials: Record<any, string>;
9
- full_address?: string;
10
- street?: string;
11
- city?: string;
12
- state?: string;
13
- zip?: string;
14
- externalId?: string | null;
15
- latitude?: number;
16
- longitude?: number;
17
- insuredName?: string | null;
18
- clientOrgId?: number;
19
- }
20
- export declare type EnrichmentIntegrationResult = {
21
- request_url: string;
22
- result: {
23
- data?: Record<string, any>;
24
- err?: Record<string, any>;
25
- };
26
- };
27
- //# sourceMappingURL=IEnrichmentIntegration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IEnrichmentIntegration.d.ts","sourceRoot":"","sources":["../../src/types/IEnrichmentIntegration.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,WAAW,EAAE,iCAAiC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC/F;AAED,MAAM,WAAW,iCAAiC;IAChD,WAAW,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,oBAAY,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC3B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC3B,CAAC;CACH,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IEnrichmentIntegration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IEnrichmentIntegration.js","sourceRoot":"","sources":["../../src/types/IEnrichmentIntegration.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- export interface IDataSchemaField {
2
- description: string;
3
- formatter?: Formatters;
4
- jsonPath: string;
5
- required?: boolean;
6
- sample?: string | number | boolean;
7
- title: string;
8
- data_type: 'string' | 'number' | 'date' | 'stringArray' | 'objectArray' | 'boolean' | 'wkt' | 'geojson' | 'imgSrc' | 'downloadSrc' | 'coordinates' | 'coordinatesLatLngCSV' | 'coordinatesLngLatCSV';
9
- fields?: IDataSchemaField[];
10
- }
11
- export interface IPartnerDataSchema {
12
- fields: IDataSchemaField[];
13
- }
14
- export interface IPartnerDataSchemas {
15
- [name: string]: IPartnerDataSchema;
16
- }
17
- export declare enum Formatters {
18
- numberWithCommas = "numberWithCommas",
19
- currencyWithCommas = "currencyWithCommas",
20
- scoreLetterToLowMedHigh = "scoreLetterToLowMedHigh",
21
- roundTwoDecimalPlaces = "roundTwoDecimalPlaces",
22
- decimalToPercentage = "decimalToPercentage",
23
- roundAndFormatWithCommas = "roundAndFormatWithCommasFn"
24
- }
25
- //# sourceMappingURL=IPartnerDataSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPartnerDataSchema.d.ts","sourceRoot":"","sources":["../../src/types/IPartnerDataSchema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,aAAa,GACb,aAAa,GACb,SAAS,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,aAAa,GACb,aAAa,GACb,sBAAsB,GACtB,sBAAsB,CAAC;IAC3B,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AACD,MAAM,WAAW,mBAAmB;IAClC,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACpC;AAED,oBAAY,UAAU;IACpB,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;IACnD,qBAAqB,0BAA0B;IAC/C,mBAAmB,wBAAwB;IAC3C,wBAAwB,+BAA+B;CACxD"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Formatters = void 0;
4
- var Formatters;
5
- (function (Formatters) {
6
- Formatters["numberWithCommas"] = "numberWithCommas";
7
- Formatters["currencyWithCommas"] = "currencyWithCommas";
8
- Formatters["scoreLetterToLowMedHigh"] = "scoreLetterToLowMedHigh";
9
- Formatters["roundTwoDecimalPlaces"] = "roundTwoDecimalPlaces";
10
- Formatters["decimalToPercentage"] = "decimalToPercentage";
11
- Formatters["roundAndFormatWithCommas"] = "roundAndFormatWithCommasFn";
12
- })(Formatters = exports.Formatters || (exports.Formatters = {}));
13
- //# sourceMappingURL=IPartnerDataSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPartnerDataSchema.js","sourceRoot":"","sources":["../../src/types/IPartnerDataSchema.ts"],"names":[],"mappings":";;;AA+BA,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,mDAAqC,CAAA;IACrC,uDAAyC,CAAA;IACzC,iEAAmD,CAAA;IACnD,6DAA+C,CAAA;IAC/C,yDAA2C,CAAA;IAC3C,qEAAuD,CAAA;AACzD,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB"}
@@ -1,18 +0,0 @@
1
- export declare type IntegrationManifest = {
2
- partner: string;
3
- offering: string;
4
- description: string;
5
- abstract?: string;
6
- contact_name?: string;
7
- contact_email?: string;
8
- website_url?: string;
9
- capabilities: {
10
- matrix_key: string;
11
- requires?: string[];
12
- };
13
- settings?: {
14
- credentials_config?: Record<string, any>;
15
- credentials?: Record<string, any>;
16
- };
17
- };
18
- //# sourceMappingURL=IntegrationManifest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntegrationManifest.d.ts","sourceRoot":"","sources":["../../src/types/IntegrationManifest.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1D,QAAQ,CAAC,EAAE;QACT,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACzC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACnC,CAAC;CACH,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IntegrationManifest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntegrationManifest.js","sourceRoot":"","sources":["../../src/types/IntegrationManifest.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export * from './IEnrichmentIntegration';
2
- export * from './IPartnerDataSchema';
3
- export * from './EnrichmentComponentArgs';
4
- export * from './IntegrationManifest';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./IEnrichmentIntegration"), exports);
14
- __exportStar(require("./IPartnerDataSchema"), exports);
15
- __exportStar(require("./EnrichmentComponentArgs"), exports);
16
- __exportStar(require("./IntegrationManifest"), exports);
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAyC;AACzC,uDAAqC;AACrC,4DAA0C;AAC1C,wDAAsC"}
@@ -1,2 +0,0 @@
1
- export declare function jsonLog(obj: Record<string, any> | undefined): string;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,UAE3D"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.jsonLog = void 0;
7
- const json_colorizer_1 = __importDefault(require("json-colorizer"));
8
- function jsonLog(obj) {
9
- return json_colorizer_1.default(JSON.stringify(obj, null, 2));
10
- }
11
- exports.jsonLog = jsonLog;
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;AAAA,oEAAsC;AAEtC,SAAgB,OAAO,CAAC,GAAoC;IAC1D,OAAO,wBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC;AAFD,0BAEC"}