@integration-app/react 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/node_modules/@compwright/namecase/LICENSE +26 -0
- package/node_modules/@compwright/namecase/README.md +49 -0
- package/node_modules/@compwright/namecase/bin/namecase +28 -0
- package/node_modules/@compwright/namecase/dist/namecase.min.js +4 -0
- package/node_modules/@compwright/namecase/dist/namecase.min.js.map +1 -0
- package/node_modules/@compwright/namecase/package.json +46 -0
- package/node_modules/@compwright/namecase/src/index.js +146 -0
- package/node_modules/@integration-app/sdk/bundle.js +404 -262
- package/node_modules/@integration-app/sdk/bundle.js.map +1 -1
- package/node_modules/@integration-app/sdk/client.d.ts +3 -3
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.d.ts +3 -7
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.js +16 -32
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.js.map +1 -1
- package/node_modules/@integration-app/sdk/integrations/accessors.d.ts +0 -6
- package/node_modules/@integration-app/sdk/integrations/accessors.js +1 -87
- package/node_modules/@integration-app/sdk/integrations/accessors.js.map +1 -1
- package/node_modules/@integration-app/sdk/json-schema/index.d.ts +1 -1
- package/node_modules/@integration-app/sdk/src/client.ts +3 -3
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/case.test.ts +11 -113
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/case.ts +22 -46
- package/node_modules/@integration-app/sdk/src/integrations/accessors.ts +2 -122
- package/node_modules/@sinclair/typebox/package.json +40 -0
- package/node_modules/@sinclair/typebox/readme.md +740 -0
- package/node_modules/@sinclair/typebox/typebox.d.ts +351 -0
- package/node_modules/@sinclair/typebox/typebox.js +345 -0
- package/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/node/assert.d.ts +128 -0
- package/node_modules/@types/node/async_hooks.d.ts +229 -0
- package/node_modules/@types/node/buffer.d.ts +89 -0
- package/node_modules/@types/node/child_process.d.ts +514 -0
- package/node_modules/@types/node/cluster.d.ts +265 -0
- package/node_modules/@types/node/console.d.ts +142 -0
- package/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/node/crypto.d.ts +1283 -0
- package/node_modules/@types/node/dgram.d.ts +144 -0
- package/node_modules/@types/node/dns.d.ts +387 -0
- package/node_modules/@types/node/domain.d.ts +27 -0
- package/node_modules/@types/node/events.d.ts +82 -0
- package/node_modules/@types/node/fs/promises.d.ts +572 -0
- package/node_modules/@types/node/fs.d.ts +2281 -0
- package/node_modules/@types/node/globals.d.ts +747 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +580 -0
- package/node_modules/@types/node/http2.d.ts +962 -0
- package/node_modules/@types/node/https.d.ts +271 -0
- package/node_modules/@types/node/index.d.ts +98 -0
- package/node_modules/@types/node/inspector.d.ts +3051 -0
- package/node_modules/@types/node/module.d.ts +56 -0
- package/node_modules/@types/node/net.d.ts +308 -0
- package/node_modules/@types/node/os.d.ts +243 -0
- package/node_modules/@types/node/package.json +232 -0
- package/node_modules/@types/node/path.d.ts +168 -0
- package/node_modules/@types/node/perf_hooks.d.ts +274 -0
- package/node_modules/@types/node/process.d.ts +413 -0
- package/node_modules/@types/node/punycode.d.ts +78 -0
- package/node_modules/@types/node/querystring.d.ts +31 -0
- package/node_modules/@types/node/readline.d.ts +174 -0
- package/node_modules/@types/node/repl.d.ts +398 -0
- package/node_modules/@types/node/stream.d.ts +359 -0
- package/node_modules/@types/node/string_decoder.d.ts +10 -0
- package/node_modules/@types/node/timers.d.ts +19 -0
- package/node_modules/@types/node/tls.d.ts +784 -0
- package/node_modules/@types/node/trace_events.d.ts +64 -0
- package/node_modules/@types/node/ts4.8/assert.d.ts +128 -0
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +229 -0
- package/node_modules/@types/node/ts4.8/buffer.d.ts +89 -0
- package/node_modules/@types/node/ts4.8/child_process.d.ts +514 -0
- package/node_modules/@types/node/ts4.8/cluster.d.ts +265 -0
- package/node_modules/@types/node/ts4.8/console.d.ts +142 -0
- package/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/node_modules/@types/node/ts4.8/crypto.d.ts +1283 -0
- package/node_modules/@types/node/ts4.8/dgram.d.ts +144 -0
- package/node_modules/@types/node/ts4.8/dns.d.ts +387 -0
- package/node_modules/@types/node/ts4.8/domain.d.ts +27 -0
- package/node_modules/@types/node/ts4.8/events.d.ts +82 -0
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +572 -0
- package/node_modules/@types/node/ts4.8/fs.d.ts +2281 -0
- package/node_modules/@types/node/ts4.8/globals.d.ts +746 -0
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@types/node/ts4.8/http.d.ts +580 -0
- package/node_modules/@types/node/ts4.8/http2.d.ts +962 -0
- package/node_modules/@types/node/ts4.8/https.d.ts +271 -0
- package/node_modules/@types/node/ts4.8/index.d.ts +53 -0
- package/node_modules/@types/node/ts4.8/inspector.d.ts +3051 -0
- package/node_modules/@types/node/ts4.8/module.d.ts +56 -0
- package/node_modules/@types/node/ts4.8/net.d.ts +308 -0
- package/node_modules/@types/node/ts4.8/os.d.ts +243 -0
- package/node_modules/@types/node/ts4.8/path.d.ts +168 -0
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +274 -0
- package/node_modules/@types/node/ts4.8/process.d.ts +413 -0
- package/node_modules/@types/node/ts4.8/punycode.d.ts +78 -0
- package/node_modules/@types/node/ts4.8/querystring.d.ts +31 -0
- package/node_modules/@types/node/ts4.8/readline.d.ts +174 -0
- package/node_modules/@types/node/ts4.8/repl.d.ts +398 -0
- package/node_modules/@types/node/ts4.8/stream.d.ts +359 -0
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +10 -0
- package/node_modules/@types/node/ts4.8/timers.d.ts +19 -0
- package/node_modules/@types/node/ts4.8/tls.d.ts +784 -0
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +64 -0
- package/node_modules/@types/node/ts4.8/tty.d.ts +69 -0
- package/node_modules/@types/node/ts4.8/url.d.ts +149 -0
- package/node_modules/@types/node/ts4.8/util.d.ts +216 -0
- package/node_modules/@types/node/ts4.8/v8.d.ts +190 -0
- package/node_modules/@types/node/ts4.8/vm.d.ts +155 -0
- package/node_modules/@types/node/ts4.8/wasi.d.ts +89 -0
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +241 -0
- package/node_modules/@types/node/ts4.8/zlib.d.ts +364 -0
- package/node_modules/@types/node/tty.d.ts +69 -0
- package/node_modules/@types/node/url.d.ts +149 -0
- package/node_modules/@types/node/util.d.ts +216 -0
- package/node_modules/@types/node/v8.d.ts +190 -0
- package/node_modules/@types/node/vm.d.ts +155 -0
- package/node_modules/@types/node/wasi.d.ts +89 -0
- package/node_modules/@types/node/worker_threads.d.ts +241 -0
- package/node_modules/@types/node/zlib.d.ts +364 -0
- package/package.json +2 -5
- package/node_modules/@integration-app/sdk/.DS_Store +0 -0
- package/node_modules/@integration-app/sdk/.gitignore +0 -11
- package/node_modules/@integration-app/sdk/.npmignore +0 -0
- package/node_modules/@integration-app/sdk/app-data-collections/app-data-collections.d.ts +0 -23
- package/node_modules/@integration-app/sdk/app-data-collections/app-data-collections.js.map +0 -1
- package/node_modules/@integration-app/sdk/app-data-schemas/app-data-schemas.d.ts +0 -20
- package/node_modules/@integration-app/sdk/app-data-schemas/app-data-schemas.js.map +0 -1
- package/node_modules/@integration-app/sdk/app-events/app-events.d.ts +0 -44
- package/node_modules/@integration-app/sdk/app-events/app-events.js.map +0 -1
- package/node_modules/@integration-app/sdk/connection-client.d.ts +0 -12
- package/node_modules/@integration-app/sdk/connection-client.js +0 -31
- package/node_modules/@integration-app/sdk/connection-client.js.map +0 -1
- package/node_modules/@integration-app/sdk/connections/connections.d.ts +0 -46
- package/node_modules/@integration-app/sdk/connections/connections.js.map +0 -1
- package/node_modules/@integration-app/sdk/connector-api/connector-api.d.ts +0 -157
- package/node_modules/@integration-app/sdk/connector-api/connector-api.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/findExternalRecordId.d.ts +0 -0
- package/node_modules/@integration-app/sdk/data-builder/findExternalRecordId.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/first-name.test.d.ts +0 -0
- package/node_modules/@integration-app/sdk/data-builder/first-name.test.js +0 -2
- package/node_modules/@integration-app/sdk/data-builder/first-name.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/anyOfOption.d.ts +0 -10
- package/node_modules/@integration-app/sdk/data-builder/formulas/anyOfOption.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.test.js +0 -26
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.test.js +0 -246
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.test.js +0 -85
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.test.js +0 -64
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.test.js +0 -44
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.test.js +0 -44
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.test.js +0 -26
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.test.js +0 -26
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.test.js +0 -14
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.test.js +0 -63
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.test.js +0 -112
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.test.js +0 -18
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.test.js +0 -114
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.test.js +0 -49
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/formulas/types.d.ts +0 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/types.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/index.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/index.test.js +0 -295
- package/node_modules/@integration-app/sdk/data-builder/index.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-builder/locators.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-builder/locators.test.js +0 -775
- package/node_modules/@integration-app/sdk/data-builder/locators.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-filter/conditions.d.ts +0 -0
- package/node_modules/@integration-app/sdk/data-filter/conditions.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-filter/data-filter.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-filter/data-filter.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-filter/index.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-filter/index.test.js +0 -43
- package/node_modules/@integration-app/sdk/data-filter/index.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-filter/operators.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-filter/operators.test.js +0 -490
- package/node_modules/@integration-app/sdk/data-filter/operators.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-links/data-links.d.ts +0 -58
- package/node_modules/@integration-app/sdk/data-links/data-links.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-schema/index.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/data-schema/index.test.js +0 -86
- package/node_modules/@integration-app/sdk/data-schema/index.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/data-sources/data-sources.d.ts +0 -41
- package/node_modules/@integration-app/sdk/data-sources/data-sources.js.map +0 -1
- package/node_modules/@integration-app/sdk/endpoints/endpoint-spec.d.ts +0 -30
- package/node_modules/@integration-app/sdk/endpoints/endpoint-spec.js.map +0 -1
- package/node_modules/@integration-app/sdk/field-mappings/field-mappings.d.ts +0 -29
- package/node_modules/@integration-app/sdk/field-mappings/field-mappings.js.map +0 -1
- package/node_modules/@integration-app/sdk/flow-runs/flow-runs.d.ts +0 -51
- package/node_modules/@integration-app/sdk/flow-runs/flow-runs.js.map +0 -1
- package/node_modules/@integration-app/sdk/flows/flows.d.ts +0 -156
- package/node_modules/@integration-app/sdk/flows/flows.js.map +0 -1
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-delete-trigger.d.ts +0 -3
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-delete-trigger.js.map +0 -1
- package/node_modules/@integration-app/sdk/flows/nodes/nodes.d.ts +0 -25
- package/node_modules/@integration-app/sdk/flows/nodes/nodes.js.map +0 -1
- package/node_modules/@integration-app/sdk/flows/utils.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/flows/utils.test.js +0 -62
- package/node_modules/@integration-app/sdk/flows/utils.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/integration-elements/integration-elements.d.ts +0 -21
- package/node_modules/@integration-app/sdk/integration-elements/integration-elements.js.map +0 -1
- package/node_modules/@integration-app/sdk/integrations/integrations.d.ts +0 -48
- package/node_modules/@integration-app/sdk/integrations/integrations.js.map +0 -1
- package/node_modules/@integration-app/sdk/json-schema/json-schema.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/json-schema/json-schema.test.js +0 -194
- package/node_modules/@integration-app/sdk/json-schema/json-schema.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.test.js +0 -352
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/jwt.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/jwt.test.js +0 -9
- package/node_modules/@integration-app/sdk/jwt.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/package-lock.json +0 -3834
- package/node_modules/@integration-app/sdk/udm/activities.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/udm/activities.test.js +0 -40
- package/node_modules/@integration-app/sdk/udm/activities.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/campaign-members.d.ts +0 -45
- package/node_modules/@integration-app/sdk/udm/campaign-members.js +0 -99
- package/node_modules/@integration-app/sdk/udm/campaign-members.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/contacts.test.d.ts +0 -1
- package/node_modules/@integration-app/sdk/udm/contacts.test.js +0 -136
- package/node_modules/@integration-app/sdk/udm/contacts.test.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-activities.d.ts +0 -17
- package/node_modules/@integration-app/sdk/udm/crm-activities.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-activity.d.ts +0 -11
- package/node_modules/@integration-app/sdk/udm/crm-activity.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-companies.d.ts +0 -14
- package/node_modules/@integration-app/sdk/udm/crm-companies.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-contact.d.ts +0 -10
- package/node_modules/@integration-app/sdk/udm/crm-contact.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-contacts.d.ts +0 -16
- package/node_modules/@integration-app/sdk/udm/crm-contacts.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-deals.d.ts +0 -15
- package/node_modules/@integration-app/sdk/udm/crm-deals.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/crm-leads.d.ts +0 -16
- package/node_modules/@integration-app/sdk/udm/crm-leads.js.map +0 -1
- package/node_modules/@integration-app/sdk/udm/members.d.ts +0 -45
- package/node_modules/@integration-app/sdk/udm/members.js.map +0 -1
- package/node_modules/@integration-app/sdk/users/users.d.ts +0 -5
- package/node_modules/@integration-app/sdk/users/users.js.map +0 -1
@@ -20,9 +20,9 @@ import { SelfAccessor } from './auth/accessors';
|
|
20
20
|
import { DataLocationSelector } from './data-locations/api';
|
21
21
|
import { DataLocationAccessor } from './data-locations/accessors';
|
22
22
|
export declare class IntegrationAppClient {
|
23
|
-
apiUri
|
24
|
-
uiUri
|
25
|
-
token
|
23
|
+
private apiUri?;
|
24
|
+
private uiUri?;
|
25
|
+
private token;
|
26
26
|
private pusher;
|
27
27
|
private pusherChannels;
|
28
28
|
constructor(options: IntegrationAppClientOptions);
|
@@ -3,16 +3,12 @@ import { DataBuilderContext } from '../context';
|
|
3
3
|
import { DataBuilderFormulaBase } from './base';
|
4
4
|
export interface CaseFormulaValueItem {
|
5
5
|
filter?: DataFilter;
|
6
|
-
value
|
6
|
+
value: any;
|
7
7
|
}
|
8
|
-
export declare type CaseFormulaValue =
|
9
|
-
cases: CaseFormulaValueItem[];
|
10
|
-
default?: any;
|
11
|
-
};
|
8
|
+
export declare type CaseFormulaValue = CaseFormulaValueItem[];
|
12
9
|
export declare class DataBuilderFormulaCase extends DataBuilderFormulaBase {
|
13
10
|
value: CaseFormulaValue;
|
14
|
-
constructor(value:
|
11
|
+
constructor(value: CaseFormulaValue);
|
15
12
|
getValue(context: DataBuilderContext): any;
|
16
13
|
getSchema(variablesSchema: any): any;
|
17
|
-
isValueValid(): boolean;
|
18
14
|
}
|
@@ -9,52 +9,36 @@ const schema_builder_1 = require("../../json-schema/schema-builder");
|
|
9
9
|
class DataBuilderFormulaCase extends base_1.DataBuilderFormulaBase {
|
10
10
|
constructor(value) {
|
11
11
|
super();
|
12
|
+
this.value = value;
|
12
13
|
this.type = _1.DataBuilderFormulaType.CASE;
|
13
|
-
if (!
|
14
|
-
this.value =
|
15
|
-
cases: [],
|
16
|
-
default: undefined,
|
17
|
-
};
|
18
|
-
}
|
19
|
-
else if (Array.isArray(value)) {
|
20
|
-
this.value = {
|
21
|
-
cases: value,
|
22
|
-
default: undefined,
|
23
|
-
};
|
24
|
-
}
|
25
|
-
else if (typeof value === 'object' && Array.isArray(value.cases)) {
|
26
|
-
this.value = value;
|
14
|
+
if (!Array.isArray(value)) {
|
15
|
+
this.value = [];
|
27
16
|
}
|
28
17
|
}
|
29
18
|
getValue(context) {
|
30
|
-
|
31
|
-
if (!this.isValueValid())
|
19
|
+
if (!Array.isArray(this.value)) {
|
32
20
|
return undefined;
|
33
|
-
|
34
|
-
|
21
|
+
}
|
22
|
+
for (const item of this.value) {
|
23
|
+
if (!item || typeof item !== 'object') {
|
35
24
|
continue;
|
25
|
+
}
|
36
26
|
if ((0, data_filter_1.doesMatchFilter)(context.variables, item.filter)) {
|
37
27
|
return (0, _1.processValue)(item.value, context);
|
38
28
|
}
|
39
29
|
}
|
40
|
-
return (_a = (0, _1.processValue)(this.value.default, context)) !== null && _a !== void 0 ? _a : undefined;
|
41
30
|
}
|
42
31
|
getSchema(variablesSchema) {
|
43
|
-
if (
|
32
|
+
if (Array.isArray(this.value)) {
|
33
|
+
const values = this.value
|
34
|
+
.map((item) => item.value)
|
35
|
+
.filter((value) => value !== undefined);
|
36
|
+
const schemas = values.map((value) => (0, __1.buildDataSchema)(value, variablesSchema));
|
37
|
+
return (0, schema_builder_1.mergeSchemas)(schemas);
|
38
|
+
}
|
39
|
+
else {
|
44
40
|
return undefined;
|
45
|
-
const schemas = this.value.cases
|
46
|
-
.map((item) => item.value)
|
47
|
-
.filter((value) => value !== undefined)
|
48
|
-
.map((value) => (0, __1.buildDataSchema)(value, variablesSchema));
|
49
|
-
if (this.value.default) {
|
50
|
-
schemas.push((0, __1.buildDataSchema)(this.value.default, variablesSchema));
|
51
41
|
}
|
52
|
-
return (0, schema_builder_1.mergeSchemas)(schemas);
|
53
|
-
}
|
54
|
-
isValueValid() {
|
55
|
-
return (this.value &&
|
56
|
-
typeof this.value === 'object' &&
|
57
|
-
Array.isArray(this.value.cases));
|
58
42
|
}
|
59
43
|
}
|
60
44
|
exports.DataBuilderFormulaCase = DataBuilderFormulaCase;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/data-builder/formulas/case.ts"],"names":[],"mappings":";;;AAAA,mDAA+D;AAC/D,wBAAwD;AACxD,0BAAoC;AAEpC,iCAA+C;AAC/C,qEAA+D;
|
1
|
+
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/data-builder/formulas/case.ts"],"names":[],"mappings":";;;AAAA,mDAA+D;AAC/D,wBAAwD;AACxD,0BAAoC;AAEpC,iCAA+C;AAC/C,qEAA+D;AAS/D,MAAa,sBAAuB,SAAQ,6BAAsB;IAChE,YAAmB,KAAuB;QACxC,KAAK,EAAE,CAAA;QADU,UAAK,GAAL,KAAK,CAAkB;QAGxC,IAAI,CAAC,IAAI,GAAG,yBAAsB,CAAC,IAAI,CAAA;QAEvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;SAChB;IACH,CAAC;IAED,QAAQ,CAAC,OAA2B;QAClC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,SAAS,CAAA;SACjB;QACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC7B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBACrC,SAAQ;aACT;YACD,IAAI,IAAA,6BAAe,EAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;gBACnD,OAAO,IAAA,eAAY,EAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;aACzC;SACF;IACH,CAAC;IAED,SAAS,CAAC,eAAe;QACvB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK;iBACtB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;iBACzB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAA;YACzC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACnC,IAAA,mBAAe,EAAC,KAAK,EAAE,eAAe,CAAC,CACxC,CAAA;YACD,OAAO,IAAA,6BAAY,EAAC,OAAO,CAAC,CAAA;SAC7B;aAAM;YACL,OAAO,SAAS,CAAA;SACjB;IACH,CAAC;CACF;AAtCD,wDAsCC"}
|
@@ -3,7 +3,6 @@ import { FindIntegrationsQuery, FindIntegrationsResponse, Integration } from '.'
|
|
3
3
|
import { IntegrationAppClient } from '..';
|
4
4
|
import { ElementAccessor } from '../accessors';
|
5
5
|
import { CreateIntegrationRequest, UpdateIntegrationRequest } from './api';
|
6
|
-
import { ConnectorSpec } from '../connector-api';
|
7
6
|
export declare class IntegrationsAccessor {
|
8
7
|
private client;
|
9
8
|
constructor(client: IntegrationAppClient);
|
@@ -14,10 +13,5 @@ export declare class IntegrationAccessor extends ElementAccessor<Integration, Cr
|
|
14
13
|
private idOrKey;
|
15
14
|
baseUri: string;
|
16
15
|
constructor(client: IntegrationAppClient, idOrKey: string);
|
17
|
-
getConnectorSpec(): Promise<ConnectorSpec>;
|
18
|
-
createConnection({ parameters }: {
|
19
|
-
parameters: any;
|
20
|
-
}): Promise<Connection>;
|
21
|
-
openNewConnection(): Promise<Connection>;
|
22
16
|
connect(): Promise<Connection>;
|
23
17
|
}
|
@@ -1,11 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.IntegrationAccessor = exports.IntegrationsAccessor = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
|
-
const _1 = require(".");
|
6
4
|
const iframe_1 = require("../iframe");
|
7
5
|
const accessors_1 = require("../accessors");
|
8
|
-
const url_join_1 = (0, tslib_1.__importDefault)(require("url-join"));
|
9
6
|
class IntegrationsAccessor {
|
10
7
|
constructor(client) {
|
11
8
|
this.client = client;
|
@@ -25,75 +22,7 @@ class IntegrationAccessor extends accessors_1.ElementAccessor {
|
|
25
22
|
this.client = client;
|
26
23
|
this.idOrKey = idOrKey;
|
27
24
|
}
|
28
|
-
async
|
29
|
-
return this.client.get(`/integrations/${this.idOrKey}/connector-spec`);
|
30
|
-
}
|
31
|
-
async createConnection({ parameters }) {
|
32
|
-
const spec = await this.getConnectorSpec();
|
33
|
-
let iframeElement;
|
34
|
-
if (spec.connectionMode === _1.ConnectionMode.IFRAME) {
|
35
|
-
iframeElement = createIframeElement();
|
36
|
-
}
|
37
|
-
return new Promise((resolve, reject) => {
|
38
|
-
const connectionUrl = (0, url_join_1.default)(this.client.apiUri, `oauth/new/${this.idOrKey}`, `?token=${this.client.token}&connectionParameters=${JSON.stringify(parameters)}`);
|
39
|
-
const urlObj = new URL(connectionUrl);
|
40
|
-
const requestId = (Math.random() + 1).toString(36).substring(0, 12);
|
41
|
-
const listenerFunc = async (event) => {
|
42
|
-
const message = event.data || {};
|
43
|
-
if (message.source == 'integration.app' &&
|
44
|
-
message.requestId == requestId) {
|
45
|
-
cleanup();
|
46
|
-
if (message.type == 'newConnectionCreated') {
|
47
|
-
resolve(message.connection);
|
48
|
-
}
|
49
|
-
else if (message.type == 'newConnectionCancel') {
|
50
|
-
resolve(null);
|
51
|
-
}
|
52
|
-
else if (message.type == 'newConnectionFailure') {
|
53
|
-
reject(new Error(message.error));
|
54
|
-
}
|
55
|
-
}
|
56
|
-
};
|
57
|
-
let cancelCheckInterval;
|
58
|
-
function cleanup() {
|
59
|
-
clearInterval(cancelCheckInterval);
|
60
|
-
window.removeEventListener('message', listenerFunc);
|
61
|
-
}
|
62
|
-
try {
|
63
|
-
window.addEventListener('message', listenerFunc);
|
64
|
-
urlObj.searchParams.append('requestId', requestId);
|
65
|
-
if (iframeElement) {
|
66
|
-
urlObj.searchParams.append('iframe', '1');
|
67
|
-
iframeElement.src = urlObj.toString();
|
68
|
-
}
|
69
|
-
else {
|
70
|
-
const height = Math.round(screen.height * 0.6);
|
71
|
-
const width = Math.round(screen.width * 0.7);
|
72
|
-
const top = Math.round(screen.height * 0.2);
|
73
|
-
const left = Math.round(screen.height * 0.15);
|
74
|
-
const popup = window.open(urlObj.toString(), null, `popup,width=${width},height=${height},left=${left},top=${top}`);
|
75
|
-
setTimeout(() => {
|
76
|
-
if (!popup) {
|
77
|
-
cleanup();
|
78
|
-
reject({
|
79
|
-
message: 'Popup has been blocked',
|
80
|
-
});
|
81
|
-
}
|
82
|
-
}, 1000);
|
83
|
-
cancelCheckInterval = setInterval(() => {
|
84
|
-
if (popup === null || popup === void 0 ? void 0 : popup.closed) {
|
85
|
-
cleanup();
|
86
|
-
resolve(null);
|
87
|
-
}
|
88
|
-
}, 1000);
|
89
|
-
}
|
90
|
-
}
|
91
|
-
catch (e) {
|
92
|
-
reject(e);
|
93
|
-
}
|
94
|
-
});
|
95
|
-
}
|
96
|
-
async openNewConnection() {
|
25
|
+
async connect() {
|
97
26
|
const uri = this.client.getEmbedUri(`/integrations/${this.idOrKey}/connection/connect`);
|
98
27
|
return new Promise((resolve) => {
|
99
28
|
(0, iframe_1.openIframe)(uri, {
|
@@ -102,21 +31,6 @@ class IntegrationAccessor extends accessors_1.ElementAccessor {
|
|
102
31
|
});
|
103
32
|
});
|
104
33
|
}
|
105
|
-
async connect() {
|
106
|
-
return this.openNewConnection();
|
107
|
-
}
|
108
34
|
}
|
109
35
|
exports.IntegrationAccessor = IntegrationAccessor;
|
110
|
-
function createIframeElement() {
|
111
|
-
const iframeElement = document.createElement('iframe');
|
112
|
-
iframeElement.style.position = 'absolute';
|
113
|
-
iframeElement.style.top = '-100';
|
114
|
-
iframeElement.style.left = '-100';
|
115
|
-
iframeElement.style.width = '1';
|
116
|
-
iframeElement.style.height = '1';
|
117
|
-
iframeElement.style.border = 'none';
|
118
|
-
iframeElement.style.backgroundColor = 'transparent';
|
119
|
-
document.body.appendChild(iframeElement);
|
120
|
-
return iframeElement;
|
121
|
-
}
|
122
36
|
//# sourceMappingURL=accessors.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"accessors.js","sourceRoot":"","sources":["../src/integrations/accessors.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"accessors.js","sourceRoot":"","sources":["../src/integrations/accessors.ts"],"names":[],"mappings":";;;AAGA,sCAAsC;AACtC,4CAA8C;AAG9C,MAAa,oBAAoB;IAC/B,YAAoB,MAA4B;QAA5B,WAAM,GAAN,MAAM,CAAsB;IAAG,CAAC;IAEpD,KAAK,CAAC,IAAI,CAAC,KAA4B;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AAND,oDAMC;AAED,MAAa,mBAAoB,SAAQ,2BAIxC;IAGC,YAAoB,MAA4B,EAAU,OAAe;QACvE,KAAK,CAAC;YACJ,MAAM;YACN,IAAI,EAAE,cAAc;YACpB,OAAO;SACR,CAAC,CAAA;QALgB,WAAM,GAAN,MAAM,CAAsB;QAAU,YAAO,GAAP,OAAO,CAAQ;IAMzE,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CACjC,iBAAiB,IAAI,CAAC,OAAO,qBAAqB,CACnD,CAAA;QACD,OAAO,IAAI,OAAO,CAAa,CAAC,OAAO,EAAE,EAAE;YACzC,IAAA,mBAAU,EAAC,GAAG,EAAE;gBACd,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC5B,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;aAC/C,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA1BD,kDA0BC"}
|
@@ -26,7 +26,7 @@ export declare type SchemaComparisonOptions = {
|
|
26
26
|
};
|
27
27
|
export declare function schemaDiff(first: JSONSchema, second: JSONSchema): JSONSchema;
|
28
28
|
export declare function isScalar(schema: any): boolean;
|
29
|
-
export declare function schemaTypeFromValue(value: any): "object" | "string" | "
|
29
|
+
export declare function schemaTypeFromValue(value: any): "object" | "string" | "number" | "null" | "boolean" | "array";
|
30
30
|
export declare function getUserVisibleSchema(schema: any): any;
|
31
31
|
export declare function getDefaultsFromSchema(schema: any): any;
|
32
32
|
export declare function valueToSchema(value: any, schema: any, field?: string): any;
|
@@ -68,9 +68,9 @@ const DEFAULT_API_URI = 'https://engine-api.integration.app'
|
|
68
68
|
const DEFAULT_UI_URI = 'https://ui.integration.app'
|
69
69
|
|
70
70
|
export class IntegrationAppClient {
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
private apiUri?: string
|
72
|
+
private uiUri?: string
|
73
|
+
private token: string
|
74
74
|
private pusher: Pusher | undefined
|
75
75
|
private pusherChannels: Record<string, Channel> = {}
|
76
76
|
|
@@ -11,33 +11,7 @@ describe('data-builder/formulas/case', () => {
|
|
11
11
|
})
|
12
12
|
|
13
13
|
it('should find case formula in value', () => {
|
14
|
-
// argument as object
|
15
14
|
const formula = getFormula({
|
16
|
-
$case: {
|
17
|
-
cases: [
|
18
|
-
{
|
19
|
-
filter: null,
|
20
|
-
value: 'foo',
|
21
|
-
},
|
22
|
-
],
|
23
|
-
default: 'bar',
|
24
|
-
},
|
25
|
-
})
|
26
|
-
expect(formula).toBeDefined()
|
27
|
-
expect(formula).not.toBeNull()
|
28
|
-
expect(formula.type).toEqual(DataBuilderFormulaType.CASE)
|
29
|
-
expect((formula as DataBuilderFormulaCase).value).toEqual({
|
30
|
-
cases: [
|
31
|
-
{
|
32
|
-
filter: null,
|
33
|
-
value: 'foo',
|
34
|
-
},
|
35
|
-
],
|
36
|
-
default: 'bar',
|
37
|
-
})
|
38
|
-
|
39
|
-
// argument as array
|
40
|
-
const formula2 = getFormula({
|
41
15
|
$case: [
|
42
16
|
{
|
43
17
|
filter: null,
|
@@ -45,18 +19,15 @@ describe('data-builder/formulas/case', () => {
|
|
45
19
|
},
|
46
20
|
],
|
47
21
|
})
|
48
|
-
expect(
|
49
|
-
expect(
|
50
|
-
expect(
|
51
|
-
expect((
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
],
|
58
|
-
default: undefined,
|
59
|
-
})
|
22
|
+
expect(formula).toBeDefined()
|
23
|
+
expect(formula).not.toBeNull()
|
24
|
+
expect(formula.type).toEqual(DataBuilderFormulaType.CASE)
|
25
|
+
expect((formula as DataBuilderFormulaCase).value).toEqual([
|
26
|
+
{
|
27
|
+
filter: null,
|
28
|
+
value: 'foo',
|
29
|
+
},
|
30
|
+
])
|
60
31
|
})
|
61
32
|
|
62
33
|
it('should work with undefined value', () => {
|
@@ -87,14 +58,6 @@ describe('data-builder/formulas/case', () => {
|
|
87
58
|
},
|
88
59
|
])
|
89
60
|
expect(formula.getValue(context)).toEqual('objValue')
|
90
|
-
|
91
|
-
const formula2 = new DataBuilderFormulaCase({
|
92
|
-
cases: [],
|
93
|
-
default: {
|
94
|
-
$var: '$.obj.objKey',
|
95
|
-
},
|
96
|
-
})
|
97
|
-
expect(formula2.getValue(context)).toEqual('objValue')
|
98
61
|
})
|
99
62
|
|
100
63
|
it('should take filter in account', () => {
|
@@ -152,35 +115,6 @@ describe('data-builder/formulas/case', () => {
|
|
152
115
|
expect(formula.getValue(context)).toEqual('elseValue')
|
153
116
|
})
|
154
117
|
|
155
|
-
it('should use default value correctly', () => {
|
156
|
-
const formula = new DataBuilderFormulaCase({
|
157
|
-
default: 'defaultValue',
|
158
|
-
cases: [
|
159
|
-
{
|
160
|
-
filter: [
|
161
|
-
{
|
162
|
-
field: 'key',
|
163
|
-
operator: 'is',
|
164
|
-
value: 'notValue',
|
165
|
-
},
|
166
|
-
],
|
167
|
-
value: 'incorrectValue',
|
168
|
-
},
|
169
|
-
{
|
170
|
-
filter: [
|
171
|
-
{
|
172
|
-
field: 'key',
|
173
|
-
operator: 'is',
|
174
|
-
value: 'anotherNotValue',
|
175
|
-
},
|
176
|
-
],
|
177
|
-
value: 'anotherIncorrectValue',
|
178
|
-
},
|
179
|
-
],
|
180
|
-
})
|
181
|
-
expect(formula.getValue(context)).toEqual('defaultValue')
|
182
|
-
})
|
183
|
-
|
184
118
|
it('should combine schemas of all option', () => {
|
185
119
|
const variablesSchema = {
|
186
120
|
type: 'object',
|
@@ -197,45 +131,9 @@ describe('data-builder/formulas/case', () => {
|
|
197
131
|
obj2Key: { type: 'string' },
|
198
132
|
},
|
199
133
|
},
|
200
|
-
obj3: {
|
201
|
-
type: 'object',
|
202
|
-
properties: {
|
203
|
-
obj3Key: { type: 'string' },
|
204
|
-
},
|
205
|
-
},
|
206
134
|
},
|
207
135
|
}
|
208
|
-
|
209
|
-
const formula = new DataBuilderFormulaCase({
|
210
|
-
cases: [
|
211
|
-
{
|
212
|
-
value: {
|
213
|
-
$var: '$.obj',
|
214
|
-
},
|
215
|
-
filter: [],
|
216
|
-
},
|
217
|
-
{
|
218
|
-
value: {
|
219
|
-
$var: '$.obj2',
|
220
|
-
},
|
221
|
-
filter: [],
|
222
|
-
},
|
223
|
-
],
|
224
|
-
default: {
|
225
|
-
$var: '$.obj3',
|
226
|
-
},
|
227
|
-
})
|
228
|
-
expect(formula.getSchema(variablesSchema)).toEqual({
|
229
|
-
type: 'object',
|
230
|
-
properties: {
|
231
|
-
objKey: { type: 'string' },
|
232
|
-
obj2Key: { type: 'string' },
|
233
|
-
obj3Key: { type: 'string' },
|
234
|
-
},
|
235
|
-
})
|
236
|
-
|
237
|
-
// without default value
|
238
|
-
const formula2 = new DataBuilderFormulaCase([
|
136
|
+
const formula = new DataBuilderFormulaCase([
|
239
137
|
{
|
240
138
|
value: {
|
241
139
|
$var: '$.obj',
|
@@ -249,7 +147,7 @@ describe('data-builder/formulas/case', () => {
|
|
249
147
|
filter: [],
|
250
148
|
},
|
251
149
|
])
|
252
|
-
expect(
|
150
|
+
expect(formula.getSchema(variablesSchema)).toEqual({
|
253
151
|
type: 'object',
|
254
152
|
properties: {
|
255
153
|
objKey: { type: 'string' },
|
@@ -7,71 +7,47 @@ import { mergeSchemas } from '../../json-schema/schema-builder'
|
|
7
7
|
|
8
8
|
export interface CaseFormulaValueItem {
|
9
9
|
filter?: DataFilter
|
10
|
-
value
|
10
|
+
value: any
|
11
11
|
}
|
12
12
|
|
13
|
-
export type CaseFormulaValue =
|
14
|
-
cases: CaseFormulaValueItem[]
|
15
|
-
default?: any
|
16
|
-
}
|
13
|
+
export type CaseFormulaValue = CaseFormulaValueItem[]
|
17
14
|
|
18
15
|
export class DataBuilderFormulaCase extends DataBuilderFormulaBase {
|
19
|
-
public value: CaseFormulaValue
|
20
|
-
|
21
|
-
constructor(value: CaseFormulaValueItem[] | CaseFormulaValue) {
|
16
|
+
constructor(public value: CaseFormulaValue) {
|
22
17
|
super()
|
23
18
|
|
24
19
|
this.type = DataBuilderFormulaType.CASE
|
25
20
|
|
26
|
-
if (!
|
27
|
-
this.value =
|
28
|
-
cases: [],
|
29
|
-
default: undefined,
|
30
|
-
}
|
31
|
-
} else if (Array.isArray(value)) {
|
32
|
-
this.value = {
|
33
|
-
cases: value,
|
34
|
-
default: undefined,
|
35
|
-
}
|
36
|
-
} else if (typeof value === 'object' && Array.isArray(value.cases)) {
|
37
|
-
this.value = value
|
21
|
+
if (!Array.isArray(value)) {
|
22
|
+
this.value = []
|
38
23
|
}
|
39
24
|
}
|
40
25
|
|
41
26
|
getValue(context: DataBuilderContext) {
|
42
|
-
if (!this.
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
27
|
+
if (!Array.isArray(this.value)) {
|
28
|
+
return undefined
|
29
|
+
}
|
30
|
+
for (const item of this.value) {
|
31
|
+
if (!item || typeof item !== 'object') {
|
32
|
+
continue
|
33
|
+
}
|
47
34
|
if (doesMatchFilter(context.variables, item.filter)) {
|
48
35
|
return processValue(item.value, context)
|
49
36
|
}
|
50
37
|
}
|
51
|
-
|
52
|
-
return processValue(this.value.default, context) ?? undefined
|
53
38
|
}
|
54
39
|
|
55
40
|
getSchema(variablesSchema) {
|
56
|
-
if (
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
41
|
+
if (Array.isArray(this.value)) {
|
42
|
+
const values = this.value
|
43
|
+
.map((item) => item.value)
|
44
|
+
.filter((value) => value !== undefined)
|
45
|
+
const schemas = values.map((value) =>
|
46
|
+
buildDataSchema(value, variablesSchema),
|
47
|
+
)
|
48
|
+
return mergeSchemas(schemas)
|
49
|
+
} else {
|
50
|
+
return undefined
|
65
51
|
}
|
66
|
-
|
67
|
-
return mergeSchemas(schemas)
|
68
|
-
}
|
69
|
-
|
70
|
-
isValueValid() {
|
71
|
-
return (
|
72
|
-
this.value &&
|
73
|
-
typeof this.value === 'object' &&
|
74
|
-
Array.isArray(this.value.cases)
|
75
|
-
)
|
76
52
|
}
|
77
53
|
}
|