@integration-app/react 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/{dist/contexts → contexts}/integration-app-context.d.ts +0 -0
- package/{dist/contexts → contexts}/integration-app-context.js +0 -0
- package/{dist/contexts → contexts}/integration-app-context.js.map +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/{dist/index.js.map → index.js.map} +0 -0
- package/{dist/integrations → integrations}/index.d.ts +0 -0
- package/{dist/integrations → integrations}/index.js +0 -0
- package/{dist/integrations → integrations}/index.js.map +0 -0
- package/{dist/node_modules/scheduler → node_modules/@compwright/namecase}/LICENSE +8 -3
- 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/accessors.d.ts +56 -0
- package/node_modules/@integration-app/sdk/accessors.js +104 -0
- package/node_modules/@integration-app/sdk/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-collections/accessors.d.ts +16 -0
- package/node_modules/@integration-app/sdk/app-data-collections/accessors.js +38 -0
- package/node_modules/@integration-app/sdk/app-data-collections/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-collections/api.d.ts +18 -0
- package/node_modules/@integration-app/sdk/app-data-collections/api.js +3 -0
- package/node_modules/@integration-app/sdk/app-data-collections/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-collections/index.d.ts +26 -0
- package/node_modules/@integration-app/sdk/app-data-collections/index.js +3 -0
- package/node_modules/@integration-app/sdk/app-data-collections/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/accessors.d.ts +16 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/accessors.js +38 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/api.d.ts +18 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/api.js +3 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/index.d.ts +21 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/index.js +3 -0
- package/node_modules/@integration-app/sdk/app-data-schemas/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-events/accessors.d.ts +16 -0
- package/node_modules/@integration-app/sdk/app-events/accessors.js +38 -0
- package/node_modules/@integration-app/sdk/app-events/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-events/api.d.ts +18 -0
- package/node_modules/@integration-app/sdk/app-events/api.js +3 -0
- package/node_modules/@integration-app/sdk/app-events/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/app-events/index.d.ts +46 -0
- package/node_modules/@integration-app/sdk/app-events/index.js +3 -0
- package/node_modules/@integration-app/sdk/app-events/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/auth/accessors.d.ts +7 -0
- package/node_modules/@integration-app/sdk/auth/accessors.js +13 -0
- package/node_modules/@integration-app/sdk/auth/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/auth/index.d.ts +6 -0
- package/node_modules/@integration-app/sdk/auth/index.js +3 -0
- package/node_modules/@integration-app/sdk/auth/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/bundle-index.d.ts +1 -0
- package/node_modules/@integration-app/sdk/bundle-index.js +5 -0
- package/node_modules/@integration-app/sdk/bundle-index.js.map +1 -0
- package/node_modules/@integration-app/sdk/bundle.js +30163 -0
- package/node_modules/@integration-app/sdk/bundle.js.map +1 -0
- package/node_modules/@integration-app/sdk/client.d.ts +108 -0
- package/node_modules/@integration-app/sdk/client.js +248 -0
- package/node_modules/@integration-app/sdk/client.js.map +1 -0
- package/node_modules/@integration-app/sdk/connections/accessors.d.ts +13 -0
- package/node_modules/@integration-app/sdk/connections/accessors.js +39 -0
- package/node_modules/@integration-app/sdk/connections/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/connections/api.d.ts +20 -0
- package/node_modules/@integration-app/sdk/connections/api.js +17 -0
- package/node_modules/@integration-app/sdk/connections/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/connections/index.d.ts +39 -0
- package/node_modules/@integration-app/sdk/connections/index.js +13 -0
- package/node_modules/@integration-app/sdk/connections/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/connector-api/index.d.ts +2 -0
- package/node_modules/@integration-app/sdk/connector-api/index.js +9 -0
- package/node_modules/@integration-app/sdk/connector-api/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/context.d.ts +9 -0
- package/node_modules/@integration-app/sdk/data-builder/context.js +32 -0
- package/node_modules/@integration-app/sdk/data-builder/context.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.d.ts +9 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.js +59 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/base.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.d.ts +14 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.js +45 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/case.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.d.ts +18 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.js +36 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/concat.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.d.ts +10 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.js +22 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/copy.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.d.ts +11 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.js +31 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractDate.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.d.ts +11 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.js +31 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/extractTime.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.d.ts +17 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.js +24 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findAppRecordId.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.d.ts +17 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.js +24 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/findExternalRecordId.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.d.ts +10 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.js +25 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/first-name.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.d.ts +28 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.js +177 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.d.ts +15 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.js +41 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/iterate.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/last-name.d.ts +10 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/last-name.js +25 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/last-name.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.d.ts +20 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.js +24 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/lookup.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.d.ts +17 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.js +34 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/map.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/plain.d.ts +7 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/plain.js +20 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/plain.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/record.d.ts +10 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/record.js +23 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/record.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/schemaOption.d.ts +12 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/schemaOption.js +22 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/schemaOption.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.d.ts +15 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.js +31 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/tpl.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/var.d.ts +8 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/var.js +21 -0
- package/node_modules/@integration-app/sdk/data-builder/formulas/var.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/index.d.ts +2 -0
- package/node_modules/@integration-app/sdk/data-builder/index.js +17 -0
- package/node_modules/@integration-app/sdk/data-builder/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-builder/locators.d.ts +56 -0
- package/node_modules/@integration-app/sdk/data-builder/locators.js +560 -0
- package/node_modules/@integration-app/sdk/data-builder/locators.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-collections.d.ts +36 -0
- package/node_modules/@integration-app/sdk/data-collections.js +16 -0
- package/node_modules/@integration-app/sdk/data-collections.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-filter/index.d.ts +12 -0
- package/node_modules/@integration-app/sdk/data-filter/index.js +104 -0
- package/node_modules/@integration-app/sdk/data-filter/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-filter/operators.d.ts +13 -0
- package/node_modules/@integration-app/sdk/data-filter/operators.js +140 -0
- package/node_modules/@integration-app/sdk/data-filter/operators.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-links/accessors.d.ts +20 -0
- package/node_modules/@integration-app/sdk/data-links/accessors.js +65 -0
- package/node_modules/@integration-app/sdk/data-links/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-links/api.d.ts +49 -0
- package/node_modules/@integration-app/sdk/data-links/api.js +3 -0
- package/node_modules/@integration-app/sdk/data-links/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-links/index.d.ts +35 -0
- package/node_modules/@integration-app/sdk/data-links/index.js +10 -0
- package/node_modules/@integration-app/sdk/data-links/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-locations/accessors.d.ts +10 -0
- package/node_modules/@integration-app/sdk/data-locations/accessors.js +22 -0
- package/node_modules/@integration-app/sdk/data-locations/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-locations/api.d.ts +4 -0
- package/node_modules/@integration-app/sdk/data-locations/api.js +3 -0
- package/node_modules/@integration-app/sdk/data-locations/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-locations/index.d.ts +138 -0
- package/node_modules/@integration-app/sdk/data-locations/index.js +17 -0
- package/node_modules/@integration-app/sdk/data-locations/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-schema/index.d.ts +49 -0
- package/node_modules/@integration-app/sdk/data-schema/index.js +88 -0
- package/node_modules/@integration-app/sdk/data-schema/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-sources/accessors.d.ts +29 -0
- package/node_modules/@integration-app/sdk/data-sources/accessors.js +71 -0
- package/node_modules/@integration-app/sdk/data-sources/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-sources/api.d.ts +37 -0
- package/node_modules/@integration-app/sdk/data-sources/api.js +3 -0
- package/node_modules/@integration-app/sdk/data-sources/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/data-sources/index.d.ts +55 -0
- package/node_modules/@integration-app/sdk/data-sources/index.js +3 -0
- package/node_modules/@integration-app/sdk/data-sources/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/datetime.d.ts +1 -0
- package/node_modules/@integration-app/sdk/datetime.js +15 -0
- package/node_modules/@integration-app/sdk/datetime.js.map +1 -0
- package/node_modules/@integration-app/sdk/entity-repository.d.ts +11 -0
- package/node_modules/@integration-app/sdk/entity-repository.js +10 -0
- package/node_modules/@integration-app/sdk/entity-repository.js.map +1 -0
- package/node_modules/@integration-app/sdk/errors.d.ts +64 -0
- package/node_modules/@integration-app/sdk/errors.js +141 -0
- package/node_modules/@integration-app/sdk/errors.js.map +1 -0
- package/node_modules/@integration-app/sdk/field-mappings/accessors.d.ts +25 -0
- package/node_modules/@integration-app/sdk/field-mappings/accessors.js +60 -0
- package/node_modules/@integration-app/sdk/field-mappings/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/field-mappings/api.d.ts +34 -0
- package/node_modules/@integration-app/sdk/field-mappings/api.js +3 -0
- package/node_modules/@integration-app/sdk/field-mappings/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/field-mappings/index.d.ts +90 -0
- package/node_modules/@integration-app/sdk/field-mappings/index.js +195 -0
- package/node_modules/@integration-app/sdk/field-mappings/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/flow-runs/flow-node-runs.d.ts +30 -0
- package/node_modules/@integration-app/sdk/flow-runs/flow-node-runs.js +11 -0
- package/node_modules/@integration-app/sdk/flow-runs/flow-node-runs.js.map +1 -0
- package/node_modules/@integration-app/sdk/flow-runs/index.d.ts +59 -0
- package/node_modules/@integration-app/sdk/flow-runs/index.js +44 -0
- package/node_modules/@integration-app/sdk/flow-runs/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/accessors.d.ts +37 -0
- package/node_modules/@integration-app/sdk/flows/accessors.js +167 -0
- package/node_modules/@integration-app/sdk/flows/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/api.d.ts +55 -0
- package/node_modules/@integration-app/sdk/flows/api.js +8 -0
- package/node_modules/@integration-app/sdk/flows/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/index.d.ts +84 -0
- package/node_modules/@integration-app/sdk/flows/index.js +26 -0
- package/node_modules/@integration-app/sdk/flows/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/api-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/api-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/api-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/app-event-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/app-event-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/app-event-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-link.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-link.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-link.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-record.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-record.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/create-data-record.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-created-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-created-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-created-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-deleted-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-deleted-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-deleted-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-updated-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-updated-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/data-record-updated-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/delete-data-record.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/delete-data-record.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/delete-data-record.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/filter.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/filter.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/filter.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-link.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-link.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-link.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-record-by-id.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-record-by-id.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-record-by-id.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-records.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-records.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/find-data-records.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/http-request.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/http-request.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/http-request.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/index.d.ts +28 -0
- package/node_modules/@integration-app/sdk/flows/nodes/index.js +50 -0
- package/node_modules/@integration-app/sdk/flows/nodes/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/list-data-records.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/list-data-records.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/list-data-records.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/schedule-trigger.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/schedule-trigger.js +9 -0
- package/node_modules/@integration-app/sdk/flows/nodes/schedule-trigger.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/transform-data.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/transform-data.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/transform-data.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/nodes/update-data-record.d.ts +3 -0
- package/node_modules/@integration-app/sdk/flows/nodes/update-data-record.js +8 -0
- package/node_modules/@integration-app/sdk/flows/nodes/update-data-record.js.map +1 -0
- package/node_modules/@integration-app/sdk/flows/utils.d.ts +10 -0
- package/node_modules/@integration-app/sdk/flows/utils.js +72 -0
- package/node_modules/@integration-app/sdk/flows/utils.js.map +1 -0
- package/node_modules/@integration-app/sdk/http-requests.d.ts +37 -0
- package/node_modules/@integration-app/sdk/http-requests.js +33 -0
- package/node_modules/@integration-app/sdk/http-requests.js.map +1 -0
- package/node_modules/@integration-app/sdk/iframe.d.ts +9 -0
- package/node_modules/@integration-app/sdk/iframe.js +112 -0
- package/node_modules/@integration-app/sdk/iframe.js.map +1 -0
- package/node_modules/@integration-app/sdk/index.d.ts +4 -0
- package/node_modules/@integration-app/sdk/index.js +8 -0
- package/node_modules/@integration-app/sdk/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/integration-elements/index.d.ts +22 -0
- package/node_modules/@integration-app/sdk/integration-elements/index.js +15 -0
- package/node_modules/@integration-app/sdk/integration-elements/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/integrations/accessors.d.ts +17 -0
- package/node_modules/@integration-app/sdk/integrations/accessors.js +36 -0
- package/node_modules/@integration-app/sdk/integrations/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/integrations/api.d.ts +10 -0
- package/node_modules/@integration-app/sdk/integrations/api.js +3 -0
- package/node_modules/@integration-app/sdk/integrations/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/integrations/index.d.ts +27 -0
- package/node_modules/@integration-app/sdk/integrations/index.js +16 -0
- package/node_modules/@integration-app/sdk/integrations/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/json-schema/index.d.ts +32 -0
- package/node_modules/@integration-app/sdk/json-schema/index.js +207 -0
- package/node_modules/@integration-app/sdk/json-schema/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.d.ts +7 -0
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.js +232 -0
- package/node_modules/@integration-app/sdk/json-schema/schema-builder.js.map +1 -0
- package/node_modules/@integration-app/sdk/jwt.d.ts +1 -0
- package/node_modules/@integration-app/sdk/jwt.js +37 -0
- package/node_modules/@integration-app/sdk/jwt.js.map +1 -0
- package/node_modules/@integration-app/sdk/package.json +63 -0
- package/node_modules/@integration-app/sdk/rollup.config.js +23 -0
- package/node_modules/@integration-app/sdk/src/accessors.ts +150 -0
- package/node_modules/@integration-app/sdk/src/app-data-collections/accessors.ts +69 -0
- package/node_modules/@integration-app/sdk/src/app-data-collections/api.ts +31 -0
- package/node_modules/@integration-app/sdk/src/app-data-collections/index.ts +46 -0
- package/node_modules/@integration-app/sdk/src/app-data-schemas/accessors.ts +69 -0
- package/node_modules/@integration-app/sdk/src/app-data-schemas/api.ts +28 -0
- package/node_modules/@integration-app/sdk/src/app-data-schemas/index.ts +35 -0
- package/node_modules/@integration-app/sdk/src/app-events/accessors.ts +69 -0
- package/node_modules/@integration-app/sdk/src/app-events/api.ts +28 -0
- package/node_modules/@integration-app/sdk/src/app-events/index.ts +75 -0
- package/node_modules/@integration-app/sdk/src/auth/accessors.ts +10 -0
- package/node_modules/@integration-app/sdk/src/auth/index.ts +7 -0
- package/node_modules/@integration-app/sdk/src/bundle-index.ts +6 -0
- package/node_modules/@integration-app/sdk/src/client.ts +417 -0
- package/node_modules/@integration-app/sdk/src/connections/accessors.ts +58 -0
- package/node_modules/@integration-app/sdk/src/connections/api.ts +28 -0
- package/node_modules/@integration-app/sdk/src/connections/index.ts +70 -0
- package/node_modules/@integration-app/sdk/src/connector-api/index.ts +44 -0
- package/node_modules/@integration-app/sdk/src/data-builder/context.ts +40 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/base.test.ts +26 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/base.ts +95 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/case.test.ts +158 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/case.ts +53 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/concat.test.ts +117 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/concat.ts +49 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/copy.test.ts +70 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/copy.ts +20 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/extractDate.test.ts +49 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/extractDate.ts +28 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/extractTime.test.ts +49 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/extractTime.ts +28 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/findAppRecordId.test.ts +30 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/findAppRecordId.ts +30 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/findExternalRecordId.test.ts +30 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/findExternalRecordId.ts +30 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/first-name.ts +21 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/index.test.ts +83 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/index.ts +190 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/iterate.test.ts +154 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/iterate.ts +46 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/last-name.ts +21 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/lookup.test.ts +20 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/lookup.ts +33 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/map.test.ts +125 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/map.ts +42 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/plain.ts +17 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/record.ts +20 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/schemaOption.ts +26 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/tpl.test.ts +51 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/tpl.ts +33 -0
- package/node_modules/@integration-app/sdk/src/data-builder/formulas/var.ts +19 -0
- package/node_modules/@integration-app/sdk/src/data-builder/index.test.ts +372 -0
- package/node_modules/@integration-app/sdk/src/data-builder/index.ts +16 -0
- package/node_modules/@integration-app/sdk/src/data-builder/locators.test.ts +1045 -0
- package/node_modules/@integration-app/sdk/src/data-builder/locators.ts +702 -0
- package/node_modules/@integration-app/sdk/src/data-collections.ts +74 -0
- package/node_modules/@integration-app/sdk/src/data-filter/index.test.ts +48 -0
- package/node_modules/@integration-app/sdk/src/data-filter/index.ts +127 -0
- package/node_modules/@integration-app/sdk/src/data-filter/operators.test.ts +694 -0
- package/node_modules/@integration-app/sdk/src/data-filter/operators.ts +163 -0
- package/node_modules/@integration-app/sdk/src/data-links/accessors.ts +108 -0
- package/node_modules/@integration-app/sdk/src/data-links/api.ts +75 -0
- package/node_modules/@integration-app/sdk/src/data-links/index.ts +55 -0
- package/node_modules/@integration-app/sdk/src/data-locations/accessors.ts +24 -0
- package/node_modules/@integration-app/sdk/src/data-locations/api.ts +5 -0
- package/node_modules/@integration-app/sdk/src/data-locations/index.ts +209 -0
- package/node_modules/@integration-app/sdk/src/data-schema/index.test.ts +90 -0
- package/node_modules/@integration-app/sdk/src/data-schema/index.ts +185 -0
- package/node_modules/@integration-app/sdk/src/data-sources/accessors.ts +133 -0
- package/node_modules/@integration-app/sdk/src/data-sources/api.ts +59 -0
- package/node_modules/@integration-app/sdk/src/data-sources/index.ts +103 -0
- package/node_modules/@integration-app/sdk/src/datetime.ts +16 -0
- package/node_modules/@integration-app/sdk/src/entity-repository.ts +12 -0
- package/node_modules/@integration-app/sdk/src/errors.ts +154 -0
- package/node_modules/@integration-app/sdk/src/field-mappings/accessors.ts +100 -0
- package/node_modules/@integration-app/sdk/src/field-mappings/api.ts +61 -0
- package/node_modules/@integration-app/sdk/src/field-mappings/index.ts +341 -0
- package/node_modules/@integration-app/sdk/src/flow-runs/flow-node-runs.ts +53 -0
- package/node_modules/@integration-app/sdk/src/flow-runs/index.ts +102 -0
- package/node_modules/@integration-app/sdk/src/flows/accessors.ts +246 -0
- package/node_modules/@integration-app/sdk/src/flows/api.ts +71 -0
- package/node_modules/@integration-app/sdk/src/flows/index.ts +233 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/api-trigger.ts +7 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/app-event-trigger.ts +7 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/create-data-link.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/create-data-record.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/data-record-created-trigger.ts +8 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/data-record-deleted-trigger.ts +8 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/data-record-updated-trigger.ts +8 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/delete-data-record.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/filter.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/find-data-link.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/find-data-record-by-id.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/find-data-records.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/http-request.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/index.ts +60 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/list-data-records.ts +7 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/schedule-trigger.ts +7 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/transform-data.ts +7 -0
- package/node_modules/@integration-app/sdk/src/flows/nodes/update-data-record.ts +6 -0
- package/node_modules/@integration-app/sdk/src/flows/utils.test.ts +63 -0
- package/node_modules/@integration-app/sdk/src/flows/utils.ts +110 -0
- package/node_modules/@integration-app/sdk/src/http-requests.ts +41 -0
- package/node_modules/@integration-app/sdk/src/iframe.ts +142 -0
- package/node_modules/@integration-app/sdk/src/index.ts +5 -0
- package/node_modules/@integration-app/sdk/src/integration-elements/index.ts +24 -0
- package/node_modules/@integration-app/sdk/src/integrations/accessors.ts +42 -0
- package/node_modules/@integration-app/sdk/src/integrations/api.ts +13 -0
- package/node_modules/@integration-app/sdk/src/integrations/index.ts +50 -0
- package/node_modules/@integration-app/sdk/src/json-schema/__snapshots__/schema-builder.test.ts.snap +167 -0
- package/node_modules/@integration-app/sdk/src/json-schema/index.ts +251 -0
- package/node_modules/@integration-app/sdk/src/json-schema/json-schema.test.ts +246 -0
- package/node_modules/@integration-app/sdk/src/json-schema/schema-builder.test.ts +396 -0
- package/node_modules/@integration-app/sdk/src/json-schema/schema-builder.ts +258 -0
- package/node_modules/@integration-app/sdk/src/jwt.test.ts +11 -0
- package/node_modules/@integration-app/sdk/src/jwt.ts +40 -0
- package/node_modules/@integration-app/sdk/src/udm/activities.test.ts +43 -0
- package/node_modules/@integration-app/sdk/src/udm/activities.ts +83 -0
- package/node_modules/@integration-app/sdk/src/udm/base.ts +88 -0
- package/node_modules/@integration-app/sdk/src/udm/campaigns.ts +72 -0
- package/node_modules/@integration-app/sdk/src/udm/companies.ts +80 -0
- package/node_modules/@integration-app/sdk/src/udm/contacts.test.ts +147 -0
- package/node_modules/@integration-app/sdk/src/udm/contacts.ts +106 -0
- package/node_modules/@integration-app/sdk/src/udm/deals.ts +90 -0
- package/node_modules/@integration-app/sdk/src/udm/index.ts +28 -0
- package/node_modules/@integration-app/sdk/src/udm/leads.ts +113 -0
- package/node_modules/@integration-app/sdk/src/udm/users.ts +92 -0
- package/node_modules/@integration-app/sdk/src/users/accessors.ts +28 -0
- package/node_modules/@integration-app/sdk/src/users/api.ts +8 -0
- package/node_modules/@integration-app/sdk/src/users/index.ts +5 -0
- package/node_modules/@integration-app/sdk/src/variables.ts +33 -0
- package/node_modules/@integration-app/sdk/src/workspaces/index.ts +5 -0
- package/node_modules/@integration-app/sdk/tsconfig.build.json +10 -0
- package/node_modules/@integration-app/sdk/tsconfig.json +19 -0
- package/node_modules/@integration-app/sdk/udm/activities.d.ts +30 -0
- package/node_modules/@integration-app/sdk/udm/activities.js +70 -0
- package/node_modules/@integration-app/sdk/udm/activities.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/base.d.ts +27 -0
- package/node_modules/@integration-app/sdk/udm/base.js +62 -0
- package/node_modules/@integration-app/sdk/udm/base.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/campaigns.d.ts +25 -0
- package/node_modules/@integration-app/sdk/udm/campaigns.js +66 -0
- package/node_modules/@integration-app/sdk/udm/campaigns.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/companies.d.ts +42 -0
- package/node_modules/@integration-app/sdk/udm/companies.js +69 -0
- package/node_modules/@integration-app/sdk/udm/companies.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/contacts.d.ts +49 -0
- package/node_modules/@integration-app/sdk/udm/contacts.js +94 -0
- package/node_modules/@integration-app/sdk/udm/contacts.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/deals.d.ts +26 -0
- package/node_modules/@integration-app/sdk/udm/deals.js +84 -0
- package/node_modules/@integration-app/sdk/udm/deals.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/index.d.ts +11 -0
- package/node_modules/@integration-app/sdk/udm/index.js +31 -0
- package/node_modules/@integration-app/sdk/udm/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/leads.d.ts +52 -0
- package/node_modules/@integration-app/sdk/udm/leads.js +101 -0
- package/node_modules/@integration-app/sdk/udm/leads.js.map +1 -0
- package/node_modules/@integration-app/sdk/udm/users.d.ts +31 -0
- package/node_modules/@integration-app/sdk/udm/users.js +81 -0
- package/node_modules/@integration-app/sdk/udm/users.js.map +1 -0
- package/node_modules/@integration-app/sdk/users/accessors.d.ts +10 -0
- package/node_modules/@integration-app/sdk/users/accessors.js +21 -0
- package/node_modules/@integration-app/sdk/users/accessors.js.map +1 -0
- package/node_modules/@integration-app/sdk/users/api.d.ts +6 -0
- package/node_modules/@integration-app/sdk/users/api.js +3 -0
- package/node_modules/@integration-app/sdk/users/api.js.map +1 -0
- package/node_modules/@integration-app/sdk/users/index.d.ts +5 -0
- package/node_modules/@integration-app/sdk/users/index.js +3 -0
- package/node_modules/@integration-app/sdk/users/index.js.map +1 -0
- package/node_modules/@integration-app/sdk/variables.d.ts +3 -0
- package/node_modules/@integration-app/sdk/variables.js +30 -0
- package/node_modules/@integration-app/sdk/variables.js.map +1 -0
- package/node_modules/@integration-app/sdk/workspaces/index.d.ts +5 -0
- package/node_modules/@integration-app/sdk/workspaces/index.js +3 -0
- package/node_modules/@integration-app/sdk/workspaces/index.js.map +1 -0
- 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 +14 -38
- package/dist/node_modules/.package-lock.json +0 -111
- package/dist/node_modules/js-tokens/CHANGELOG.md +0 -151
- package/dist/node_modules/js-tokens/LICENSE +0 -21
- package/dist/node_modules/js-tokens/README.md +0 -240
- package/dist/node_modules/js-tokens/index.js +0 -23
- package/dist/node_modules/js-tokens/package.json +0 -30
- package/dist/node_modules/loose-envify/LICENSE +0 -21
- package/dist/node_modules/loose-envify/README.md +0 -45
- package/dist/node_modules/loose-envify/cli.js +0 -16
- package/dist/node_modules/loose-envify/custom.js +0 -4
- package/dist/node_modules/loose-envify/index.js +0 -3
- package/dist/node_modules/loose-envify/loose-envify.js +0 -36
- package/dist/node_modules/loose-envify/package.json +0 -36
- package/dist/node_modules/loose-envify/replace.js +0 -65
- package/dist/node_modules/object-assign/index.js +0 -90
- package/dist/node_modules/object-assign/license +0 -21
- package/dist/node_modules/object-assign/package.json +0 -42
- package/dist/node_modules/object-assign/readme.md +0 -61
- package/dist/node_modules/scheduler/README.md +0 -9
- package/dist/node_modules/scheduler/build-info.json +0 -8
- package/dist/node_modules/scheduler/cjs/scheduler-tracing.development.js +0 -347
- package/dist/node_modules/scheduler/cjs/scheduler-tracing.production.min.js +0 -9
- package/dist/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js +0 -16
- package/dist/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +0 -665
- package/dist/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +0 -19
- package/dist/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -206
- package/dist/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +0 -13
- package/dist/node_modules/scheduler/cjs/scheduler.development.js +0 -646
- package/dist/node_modules/scheduler/cjs/scheduler.production.min.js +0 -20
- package/dist/node_modules/scheduler/index.js +0 -7
- package/dist/node_modules/scheduler/package.json +0 -40
- package/dist/node_modules/scheduler/tracing-profiling.js +0 -7
- package/dist/node_modules/scheduler/tracing.js +0 -7
- package/dist/node_modules/scheduler/umd/scheduler-tracing.development.js +0 -80
- package/dist/node_modules/scheduler/umd/scheduler-tracing.production.min.js +0 -80
- package/dist/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js +0 -80
- package/dist/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +0 -664
- package/dist/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +0 -18
- package/dist/node_modules/scheduler/umd/scheduler.development.js +0 -152
- package/dist/node_modules/scheduler/umd/scheduler.production.min.js +0 -146
- package/dist/node_modules/scheduler/umd/scheduler.profiling.min.js +0 -146
- package/dist/node_modules/scheduler/unstable_mock.js +0 -7
- package/dist/node_modules/scheduler/unstable_post_task.js +0 -7
- package/dist/package.json +0 -26
@@ -0,0 +1,702 @@
|
|
1
|
+
import _ from 'lodash'
|
2
|
+
import { toHeaderCase } from 'js-convert-case'
|
3
|
+
import { BadRequestError } from '../errors'
|
4
|
+
import { isEmpty } from './formulas'
|
5
|
+
import { findSchemaOption } from '../data-schema'
|
6
|
+
|
7
|
+
export enum DataLocatorStepType {
|
8
|
+
OBJECT_PROPERTY = 'object_property', // Points to a property inside `object` schema
|
9
|
+
ARRAY_ITEM = 'array_item', // Points to a specific array item by index
|
10
|
+
CURRENT_ARRAY_ITEM = 'current_array_item', // For cases when we iterate over a referenced array.
|
11
|
+
SCHEMA_OPTION = 'schema_option', // Selects schema option for anyOf schema
|
12
|
+
}
|
13
|
+
|
14
|
+
export class DataLocatorStep {
|
15
|
+
type: DataLocatorStepType
|
16
|
+
}
|
17
|
+
|
18
|
+
export class DataLocatorStepObjectProperty extends DataLocatorStep {
|
19
|
+
constructor(public propertyName: string) {
|
20
|
+
super()
|
21
|
+
this.type = DataLocatorStepType.OBJECT_PROPERTY
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
export class DataLocatorStepArrayItem extends DataLocatorStep {
|
26
|
+
constructor(public index: number) {
|
27
|
+
super()
|
28
|
+
this.type = DataLocatorStepType.ARRAY_ITEM
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
export class DataLocatorStepCurrentArrayItem extends DataLocatorStep {
|
33
|
+
constructor() {
|
34
|
+
super()
|
35
|
+
this.type = DataLocatorStepType.CURRENT_ARRAY_ITEM
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
export class DataLocatorStepSchemaOption extends DataLocatorStep {
|
40
|
+
constructor(public key: string) {
|
41
|
+
super()
|
42
|
+
this.type = DataLocatorStepType.SCHEMA_OPTION
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
export type DataLocator = DataLocatorStep[] | string
|
47
|
+
|
48
|
+
export class InvalidLocatorError extends Error {}
|
49
|
+
|
50
|
+
export function locatorToField(locator: string) {
|
51
|
+
if (typeof locator !== 'string') return undefined
|
52
|
+
return locator.replace(/^\$\./, '')
|
53
|
+
}
|
54
|
+
|
55
|
+
/*
|
56
|
+
Extract sub-schema that pointer points at.
|
57
|
+
*/
|
58
|
+
export function getSchemaByLocator(schema: any, locator: DataLocator): any {
|
59
|
+
if (schema) {
|
60
|
+
try {
|
61
|
+
const schemaSteps = walkSchema(schema, locator)
|
62
|
+
if (schemaSteps) {
|
63
|
+
if (schemaSteps.length > 0) {
|
64
|
+
return schemaSteps[schemaSteps.length - 1].schema
|
65
|
+
} else {
|
66
|
+
return schema
|
67
|
+
}
|
68
|
+
} else {
|
69
|
+
return null
|
70
|
+
}
|
71
|
+
} catch (e) {
|
72
|
+
if (e instanceof InvalidLocatorError) {
|
73
|
+
return null
|
74
|
+
} else {
|
75
|
+
throw e
|
76
|
+
}
|
77
|
+
}
|
78
|
+
} else {
|
79
|
+
return null
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Finds locators of `value` inside `data`.
|
85
|
+
*/
|
86
|
+
export function findValueLocators(data: any, value: any): string[] {
|
87
|
+
function doFindValueLocator(data: any, value: any, locatorSoFar: string) {
|
88
|
+
if (JSON.stringify(data) === JSON.stringify(value)) {
|
89
|
+
return [locatorSoFar]
|
90
|
+
} else {
|
91
|
+
if (Array.isArray(data)) {
|
92
|
+
const result: string[] = []
|
93
|
+
for (let i = 0; i < data.length; ++i) {
|
94
|
+
result.push(
|
95
|
+
...doFindValueLocator(data[i], value, `${locatorSoFar}[${i}]`),
|
96
|
+
)
|
97
|
+
}
|
98
|
+
return result
|
99
|
+
} else if (typeof data === 'object' && data) {
|
100
|
+
const result: string[] = []
|
101
|
+
for (const key in data) {
|
102
|
+
result.push(
|
103
|
+
...doFindValueLocator(data[key], value, `${locatorSoFar}.${key}`),
|
104
|
+
)
|
105
|
+
}
|
106
|
+
return result
|
107
|
+
} else {
|
108
|
+
return []
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
return doFindValueLocator(data, value, '$')
|
114
|
+
}
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Returns value at a given locator in an given data object
|
118
|
+
*/
|
119
|
+
export function getValueAtLocator(data: any, locator: DataLocator) {
|
120
|
+
let curValue = data
|
121
|
+
const locatorSteps = locatorToSteps(locator)
|
122
|
+
for (let i = 0; i < locatorSteps.length; ++i) {
|
123
|
+
const locatorStep = locatorSteps[i]
|
124
|
+
switch (locatorStep.type) {
|
125
|
+
case DataLocatorStepType.OBJECT_PROPERTY:
|
126
|
+
const propStep = locatorStep as DataLocatorStepObjectProperty
|
127
|
+
if (
|
128
|
+
typeof curValue == 'object' &&
|
129
|
+
curValue &&
|
130
|
+
curValue[propStep.propertyName]
|
131
|
+
) {
|
132
|
+
// Resolve value once in case it's lazy-loaded
|
133
|
+
curValue = curValue[propStep.propertyName]
|
134
|
+
} else {
|
135
|
+
return undefined
|
136
|
+
}
|
137
|
+
break
|
138
|
+
case DataLocatorStepType.ARRAY_ITEM:
|
139
|
+
const itemStep = locatorStep as DataLocatorStepArrayItem
|
140
|
+
if (Array.isArray(curValue) && curValue[itemStep.index]) {
|
141
|
+
curValue = curValue[itemStep.index]
|
142
|
+
} else {
|
143
|
+
return undefined
|
144
|
+
}
|
145
|
+
break
|
146
|
+
case DataLocatorStepType.CURRENT_ARRAY_ITEM:
|
147
|
+
if (Array.isArray(curValue)) {
|
148
|
+
curValue = curValue[0]
|
149
|
+
} else {
|
150
|
+
return undefined
|
151
|
+
}
|
152
|
+
break
|
153
|
+
case DataLocatorStepType.SCHEMA_OPTION:
|
154
|
+
// Do nothing - this step is only meaningful when working with schemas
|
155
|
+
break
|
156
|
+
default:
|
157
|
+
throw new Error(`Unknown locator step type: ${locatorStep.type}`)
|
158
|
+
}
|
159
|
+
}
|
160
|
+
return curValue
|
161
|
+
}
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Sets value within a given object at the position specified by `locator`.
|
165
|
+
* Locator may only contain "object property" and "array index" items.
|
166
|
+
*
|
167
|
+
* Example:
|
168
|
+
* ```
|
169
|
+
* setValueAtLocator({'name': 'John'}, '$.lastName', 'Doe') == {'name': 'John', 'lastName': 'Doe'}
|
170
|
+
* ```
|
171
|
+
*
|
172
|
+
* More examples in tests.
|
173
|
+
*/
|
174
|
+
export function setValueAtLocator(obj: any, locator: string, value: any) {
|
175
|
+
const locatorSteps = locatorToSteps(locator)
|
176
|
+
|
177
|
+
let result = obj
|
178
|
+
|
179
|
+
if (locatorSteps.length > 0) {
|
180
|
+
// Current position of the locator in the object
|
181
|
+
let cursor = result
|
182
|
+
// Function we'll save a way to set value at the next step of the locator
|
183
|
+
let setValue: (value) => void = (value) => {
|
184
|
+
result = value
|
185
|
+
}
|
186
|
+
|
187
|
+
for (let i = 0; i < locatorSteps.length; i++) {
|
188
|
+
const locatorStep = locatorSteps[i]
|
189
|
+
|
190
|
+
if (
|
191
|
+
locatorStep instanceof DataLocatorStepArrayItem ||
|
192
|
+
locatorStep instanceof DataLocatorStepCurrentArrayItem
|
193
|
+
) {
|
194
|
+
if (!Array.isArray(cursor)) {
|
195
|
+
// If value at locator is not array,
|
196
|
+
// set value at the previous locator step into an empty array
|
197
|
+
// and use it as cursor.
|
198
|
+
cursor = []
|
199
|
+
setValue(cursor)
|
200
|
+
}
|
201
|
+
|
202
|
+
const index =
|
203
|
+
locatorStep instanceof DataLocatorStepArrayItem
|
204
|
+
? locatorStep.index
|
205
|
+
: 0
|
206
|
+
|
207
|
+
// Wrap function in a closure to preserve cursor
|
208
|
+
setValue = ((cursor) => {
|
209
|
+
return (value) => {
|
210
|
+
if (value !== undefined) {
|
211
|
+
cursor[index] = value
|
212
|
+
} else {
|
213
|
+
cursor.splice(index, 1)
|
214
|
+
}
|
215
|
+
}
|
216
|
+
})(cursor)
|
217
|
+
|
218
|
+
cursor = cursor[index]
|
219
|
+
} else if (locatorStep instanceof DataLocatorStepObjectProperty) {
|
220
|
+
if (typeof cursor !== 'object' || cursor === null) {
|
221
|
+
// If value at locator is not object,
|
222
|
+
// set value at the previous locator step into an empty object
|
223
|
+
// and use it as cursor.
|
224
|
+
cursor = {}
|
225
|
+
setValue(cursor)
|
226
|
+
}
|
227
|
+
|
228
|
+
// Wrap function in a closure to preserve cursor
|
229
|
+
setValue = ((cursor) => {
|
230
|
+
return (value) => {
|
231
|
+
if (value !== undefined) {
|
232
|
+
cursor[locatorStep.propertyName] = value
|
233
|
+
} else {
|
234
|
+
delete cursor[locatorStep.propertyName]
|
235
|
+
}
|
236
|
+
}
|
237
|
+
})(cursor)
|
238
|
+
|
239
|
+
cursor = cursor[locatorStep.propertyName]
|
240
|
+
} else {
|
241
|
+
throw new Error(
|
242
|
+
`Unexpected locator step type in "setValueAtLocator": ${locatorStep}`,
|
243
|
+
)
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
// Finally, set the value at the last step of the locator
|
248
|
+
setValue(value)
|
249
|
+
|
250
|
+
return result
|
251
|
+
} else {
|
252
|
+
// There are no locator steps - locator is the root object.
|
253
|
+
// Simply return the value
|
254
|
+
return value
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
/**
|
259
|
+
* Returns value witht `fields` locators picked from the source `value`.
|
260
|
+
*/
|
261
|
+
export function pickFieldsFromValue(value: any, fields: string[]): any {
|
262
|
+
let result
|
263
|
+
for (const field of fields) {
|
264
|
+
const fieldValue = getValueAtLocator(value, field)
|
265
|
+
if (!isEmpty(fieldValue)) {
|
266
|
+
result = setValueAtLocator(result, field, fieldValue)
|
267
|
+
}
|
268
|
+
}
|
269
|
+
return result
|
270
|
+
}
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Removes `fields` from value.
|
274
|
+
*/
|
275
|
+
export function excludeFieldsFromValue(value: any, fields: string[]): any {
|
276
|
+
for (const field of fields) {
|
277
|
+
setValueAtLocator(value, field, undefined)
|
278
|
+
}
|
279
|
+
return value
|
280
|
+
}
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Sets schema at a given locator into `schemaAtLocator`.
|
284
|
+
* Updates the passed `schema` object (if any) and returns it.
|
285
|
+
*/
|
286
|
+
export function setSchemaAtLocator(
|
287
|
+
schema: any,
|
288
|
+
locator: DataLocator,
|
289
|
+
schemaAtLocator: any,
|
290
|
+
) {
|
291
|
+
const locatorSteps = locatorToSteps(locator)
|
292
|
+
const result = schema ?? {}
|
293
|
+
let curSchema = result
|
294
|
+
let curSchemaDataLocator = '$'
|
295
|
+
for (const locatorStep of locatorSteps) {
|
296
|
+
if (locatorStep.type == DataLocatorStepType.OBJECT_PROPERTY) {
|
297
|
+
curSchema.type = 'object'
|
298
|
+
const propertyName = (locatorStep as DataLocatorStepObjectProperty)
|
299
|
+
.propertyName
|
300
|
+
if (!curSchema.properties?.hasOwnProperty(propertyName)) {
|
301
|
+
curSchema.properties = {
|
302
|
+
...(curSchema.properties ?? {}),
|
303
|
+
[propertyName]: {},
|
304
|
+
}
|
305
|
+
}
|
306
|
+
curSchema = curSchema.properties[propertyName]
|
307
|
+
curSchemaDataLocator += `.properties.${propertyName}`
|
308
|
+
} else if (
|
309
|
+
locatorStep.type == DataLocatorStepType.ARRAY_ITEM ||
|
310
|
+
locatorStep.type == DataLocatorStepType.CURRENT_ARRAY_ITEM
|
311
|
+
) {
|
312
|
+
curSchema.type = 'array'
|
313
|
+
curSchema.items = curSchema.items ?? {}
|
314
|
+
curSchema = curSchema.items
|
315
|
+
curSchemaDataLocator = `${curSchemaDataLocator}.items`
|
316
|
+
} else if (locatorStep.type == DataLocatorStepType.SCHEMA_OPTION) {
|
317
|
+
const schemaOptionStep = locatorStep as DataLocatorStepSchemaOption
|
318
|
+
let schemaOption = findSchemaOption(curSchema, schemaOptionStep.key)
|
319
|
+
if (!schemaOption) {
|
320
|
+
curSchema.anyOf = curSchema.anyOf ?? []
|
321
|
+
schemaOption = { key: schemaOptionStep.key }
|
322
|
+
curSchema.anyOf.push(schemaOption)
|
323
|
+
}
|
324
|
+
curSchemaDataLocator = `${curSchemaDataLocator}.anyOf[${curSchema.anyOf.indexOf(
|
325
|
+
schemaOption,
|
326
|
+
)}]`
|
327
|
+
curSchema = schemaOption
|
328
|
+
} else {
|
329
|
+
throw new Error(`Unexpected locator step type: ${locatorStep.type}`)
|
330
|
+
}
|
331
|
+
}
|
332
|
+
return setValueAtLocator(result, curSchemaDataLocator, schemaAtLocator)
|
333
|
+
}
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Extracts a field locator from full locator that may include formulas.
|
337
|
+
* For example, for locator `$.name.$concat.values[0]` returns `$.name`.
|
338
|
+
*/
|
339
|
+
export function extractFieldLocator(locator: string) {
|
340
|
+
const steps = locatorToSteps(locator)
|
341
|
+
const fieldSteps = []
|
342
|
+
for (const step of steps) {
|
343
|
+
if (
|
344
|
+
step.type === DataLocatorStepType.OBJECT_PROPERTY &&
|
345
|
+
(step as DataLocatorStepObjectProperty).propertyName.startsWith('$')
|
346
|
+
) {
|
347
|
+
break
|
348
|
+
}
|
349
|
+
fieldSteps.push(step)
|
350
|
+
}
|
351
|
+
return stepsToLocator(fieldSteps)
|
352
|
+
}
|
353
|
+
|
354
|
+
/**
|
355
|
+
* Returns minimal JSONSchema that contains `locatorSchema` at a given locator position.
|
356
|
+
* For example, for locator '$.name' and locatorSchema `{type: 'string'}
|
357
|
+
* it will return
|
358
|
+
* {
|
359
|
+
* type: 'object',
|
360
|
+
* properties: {
|
361
|
+
* name: {type: 'string'}
|
362
|
+
* }
|
363
|
+
* }
|
364
|
+
*/
|
365
|
+
export function makeSchemaForLocator(
|
366
|
+
locator: DataLocator,
|
367
|
+
locatorSchema: any,
|
368
|
+
): any {
|
369
|
+
return setSchemaAtLocator(null, locator, locatorSchema)
|
370
|
+
}
|
371
|
+
|
372
|
+
/*
|
373
|
+
Get a human-readable name for a given location in a schema.
|
374
|
+
*/
|
375
|
+
export function getNameForLocator(schema: any, locator: DataLocator) {
|
376
|
+
locator = locatorToSteps(locator)
|
377
|
+
const schemaSteps = walkSchema(schema, locator)
|
378
|
+
if (schemaSteps) {
|
379
|
+
const titleParts = schemaSteps.map((s) => s.title).filter((t) => !!t)
|
380
|
+
return titleParts[titleParts.length - 1]
|
381
|
+
} else {
|
382
|
+
return null
|
383
|
+
}
|
384
|
+
}
|
385
|
+
|
386
|
+
export function getNameComponentsForLocator(schema: any, locator: DataLocator) {
|
387
|
+
locator = locatorToSteps(locator)
|
388
|
+
const schemaSteps = walkSchema(schema, locator)
|
389
|
+
return schemaSteps?.map((s) => s.title).filter((t) => !!t)
|
390
|
+
}
|
391
|
+
|
392
|
+
/*
|
393
|
+
Get a human-readable name for the full path to the given location in a schema
|
394
|
+
I.e. "Extracted Data > Object 1 > Field 1"
|
395
|
+
*/
|
396
|
+
export function getFullNameForLocator(schema: any, locator: DataLocator) {
|
397
|
+
return getNameComponentsForLocator(schema, locator)?.join(' > ')
|
398
|
+
}
|
399
|
+
|
400
|
+
export function getIconUriForLocator(
|
401
|
+
schema: any,
|
402
|
+
locator: DataLocator,
|
403
|
+
): string {
|
404
|
+
locator = locatorToSteps(locator)
|
405
|
+
const schemaSteps = walkSchema(schema, locator)
|
406
|
+
return schemaSteps && schemaSteps.map((s) => s.iconUri).filter((t) => !!t)[0]
|
407
|
+
}
|
408
|
+
|
409
|
+
/**
|
410
|
+
* Checks if field locator is pointing to is user-visible.
|
411
|
+
* It is user-visible if no field above it has userVisible set to false.
|
412
|
+
*/
|
413
|
+
export function isLocatorUserVisible(
|
414
|
+
schema: any,
|
415
|
+
locator: DataLocator,
|
416
|
+
): boolean {
|
417
|
+
locator = locatorToSteps(locator)
|
418
|
+
const schemaSteps = walkSchema(schema, locator)
|
419
|
+
if (schemaSteps) {
|
420
|
+
return !schemaSteps.some((s) => s.schema.userVisible === false)
|
421
|
+
} else {
|
422
|
+
return false
|
423
|
+
}
|
424
|
+
}
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Returns a list of locators of all the fields in the data object.
|
428
|
+
*/
|
429
|
+
export function getLocatorsFromData(data: any, parentLocator = '$') {
|
430
|
+
if (data === null || data === undefined) {
|
431
|
+
return []
|
432
|
+
}
|
433
|
+
|
434
|
+
if (Array.isArray(data)) {
|
435
|
+
return data.flatMap((item, idx) =>
|
436
|
+
getLocatorsFromData(item, `${parentLocator}[${idx}]`),
|
437
|
+
)
|
438
|
+
}
|
439
|
+
|
440
|
+
if (typeof data === 'object') {
|
441
|
+
const locators = []
|
442
|
+
for (const [key, value] of Object.entries(data)) {
|
443
|
+
locators.push(...getLocatorsFromData(value, `${parentLocator}.${key}`))
|
444
|
+
}
|
445
|
+
return locators
|
446
|
+
}
|
447
|
+
|
448
|
+
return [parentLocator]
|
449
|
+
}
|
450
|
+
|
451
|
+
export function getLocatorsFromSchema(schema: any, parentLocator = '$') {
|
452
|
+
if (!schema || !schema.type) {
|
453
|
+
return []
|
454
|
+
}
|
455
|
+
|
456
|
+
if (schema.type === 'object') {
|
457
|
+
const locators = []
|
458
|
+
for (const [key, value] of Object.entries(schema.properties ?? {})) {
|
459
|
+
locators.push(...getLocatorsFromSchema(value, `${parentLocator}.${key}`))
|
460
|
+
}
|
461
|
+
return locators
|
462
|
+
}
|
463
|
+
|
464
|
+
if (schema.type === 'array') {
|
465
|
+
return getLocatorsFromSchema(schema.items, `${parentLocator}[0]`)
|
466
|
+
}
|
467
|
+
|
468
|
+
return [parentLocator]
|
469
|
+
}
|
470
|
+
|
471
|
+
/**
|
472
|
+
* @deprecated
|
473
|
+
*/
|
474
|
+
export const getFullTitleForLocator = getFullNameForLocator
|
475
|
+
|
476
|
+
interface SchemaStep {
|
477
|
+
schema: any
|
478
|
+
title?: string
|
479
|
+
iconUri: string
|
480
|
+
}
|
481
|
+
|
482
|
+
export function walkSchema(schema, locator: DataLocator): SchemaStep[] {
|
483
|
+
locator = locatorToSteps(locator)
|
484
|
+
const schemaSteps: SchemaStep[] = []
|
485
|
+
|
486
|
+
let curSchema = schema
|
487
|
+
|
488
|
+
for (let idx = 0; idx < locator.length; ++idx) {
|
489
|
+
const schemaStep = {} as SchemaStep
|
490
|
+
const step = locator[idx]
|
491
|
+
let defaultTitle
|
492
|
+
|
493
|
+
if (!curSchema) {
|
494
|
+
return null
|
495
|
+
}
|
496
|
+
|
497
|
+
if (step.type == DataLocatorStepType.OBJECT_PROPERTY) {
|
498
|
+
if (curSchema.type == 'object') {
|
499
|
+
const objectPropertyStep = step as DataLocatorStepObjectProperty
|
500
|
+
curSchema = curSchema.properties?.[objectPropertyStep.propertyName]
|
501
|
+
defaultTitle = toHeaderCase(objectPropertyStep.propertyName)
|
502
|
+
} else {
|
503
|
+
return null
|
504
|
+
}
|
505
|
+
} else if (step.type == DataLocatorStepType.ARRAY_ITEM) {
|
506
|
+
if (curSchema.type == 'array') {
|
507
|
+
const arrayItemStep = step as DataLocatorStepArrayItem
|
508
|
+
curSchema = curSchema.items
|
509
|
+
defaultTitle = `Item #${arrayItemStep.index + 1}`
|
510
|
+
} else {
|
511
|
+
return null
|
512
|
+
}
|
513
|
+
} else if (step.type == DataLocatorStepType.CURRENT_ARRAY_ITEM) {
|
514
|
+
if (curSchema.type == 'array') {
|
515
|
+
curSchema = curSchema.items
|
516
|
+
defaultTitle = 'Current Item'
|
517
|
+
} else {
|
518
|
+
return null
|
519
|
+
}
|
520
|
+
} else if (step.type == DataLocatorStepType.SCHEMA_OPTION) {
|
521
|
+
if (curSchema.anyOf) {
|
522
|
+
const schemaOption = findSchemaOption(
|
523
|
+
curSchema,
|
524
|
+
(step as DataLocatorStepSchemaOption).key,
|
525
|
+
)
|
526
|
+
if (schemaOption) {
|
527
|
+
curSchema = schemaOption
|
528
|
+
} else {
|
529
|
+
return null
|
530
|
+
}
|
531
|
+
} else {
|
532
|
+
// anyOf disappeared, so what - just skip anyOf locator step
|
533
|
+
continue
|
534
|
+
}
|
535
|
+
}
|
536
|
+
if (!curSchema) {
|
537
|
+
// This locator is not pointing anywhere
|
538
|
+
return null
|
539
|
+
}
|
540
|
+
schemaStep.schema = Object.assign({}, curSchema)
|
541
|
+
schemaStep.title = schemaStep.schema.title ?? defaultTitle
|
542
|
+
schemaStep.iconUri = schemaStep.schema.iconUri
|
543
|
+
schemaSteps.push(schemaStep)
|
544
|
+
}
|
545
|
+
|
546
|
+
return schemaSteps
|
547
|
+
}
|
548
|
+
|
549
|
+
/**
|
550
|
+
* Transforms parameter to data locator array
|
551
|
+
* If parameter is already a data locator array - just return it
|
552
|
+
* '$.name' => [new DataLocatorObjectProperty('name')]
|
553
|
+
* [new DataLocatorObjectProperty('name')] => [new DataLocatorObjectProperty('name')]
|
554
|
+
* @param sourceLocator
|
555
|
+
* @returns locators
|
556
|
+
*/
|
557
|
+
export function locatorToSteps(sourceLocator: DataLocator): DataLocatorStep[] {
|
558
|
+
if (Array.isArray(sourceLocator)) return sourceLocator
|
559
|
+
if (typeof sourceLocator !== 'string')
|
560
|
+
throw new BadRequestError(
|
561
|
+
`Unexpected locator value: ${JSON.stringify(sourceLocator)}`,
|
562
|
+
)
|
563
|
+
if (sourceLocator === '$') return []
|
564
|
+
|
565
|
+
if (!_.startsWith(sourceLocator, '$')) {
|
566
|
+
sourceLocator = `$.${sourceLocator}`
|
567
|
+
}
|
568
|
+
|
569
|
+
const locators = []
|
570
|
+
|
571
|
+
// skip $ because it's not used for locator
|
572
|
+
let cursorPosition = 1
|
573
|
+
while (cursorPosition < sourceLocator.length) {
|
574
|
+
if (sourceLocator[cursorPosition] === '.') {
|
575
|
+
const closingIndex = _.min(
|
576
|
+
_.filter(
|
577
|
+
[
|
578
|
+
sourceLocator.indexOf('[', cursorPosition + 1),
|
579
|
+
sourceLocator.indexOf('<', cursorPosition + 1),
|
580
|
+
sourceLocator.indexOf('.', cursorPosition + 1),
|
581
|
+
sourceLocator.length,
|
582
|
+
],
|
583
|
+
(n) => n > -1,
|
584
|
+
),
|
585
|
+
)
|
586
|
+
const part = sourceLocator.slice(cursorPosition + 1, closingIndex)
|
587
|
+
if (!part) {
|
588
|
+
throw new BadRequestError('There should be a property name after a dot')
|
589
|
+
}
|
590
|
+
locators.push(
|
591
|
+
part === '$current'
|
592
|
+
? new DataLocatorStepCurrentArrayItem()
|
593
|
+
: new DataLocatorStepObjectProperty(part),
|
594
|
+
)
|
595
|
+
cursorPosition = closingIndex
|
596
|
+
} else if (sourceLocator[cursorPosition] === '[') {
|
597
|
+
const closingIndex = sourceLocator.indexOf(']', cursorPosition)
|
598
|
+
if (closingIndex === -1) {
|
599
|
+
throw new BadRequestError(
|
600
|
+
`Could not find a closing bracket for the bracket at position ${cursorPosition}. Locator: ${sourceLocator}`,
|
601
|
+
)
|
602
|
+
}
|
603
|
+
const arrayIndex = +sourceLocator.slice(cursorPosition + 1, closingIndex)
|
604
|
+
if (isNaN(arrayIndex) || arrayIndex < 0) {
|
605
|
+
throw new BadRequestError(
|
606
|
+
`Invalid index [${sourceLocator.slice(
|
607
|
+
cursorPosition + 1,
|
608
|
+
closingIndex,
|
609
|
+
)}]. Index should be a positive number`,
|
610
|
+
)
|
611
|
+
}
|
612
|
+
locators.push(new DataLocatorStepArrayItem(arrayIndex))
|
613
|
+
cursorPosition = closingIndex + 1
|
614
|
+
} else if (sourceLocator[cursorPosition] === '<') {
|
615
|
+
const closingIndex = sourceLocator.indexOf('>', cursorPosition)
|
616
|
+
if (closingIndex === -1) {
|
617
|
+
throw new BadRequestError(
|
618
|
+
`Could not find a closing bracket for the bracket at position ${cursorPosition}. Locator: ${sourceLocator}`,
|
619
|
+
)
|
620
|
+
}
|
621
|
+
const optionKey = sourceLocator.slice(cursorPosition + 1, closingIndex)
|
622
|
+
locators.push(new DataLocatorStepSchemaOption(optionKey))
|
623
|
+
cursorPosition = closingIndex + 1
|
624
|
+
} else {
|
625
|
+
throw new BadRequestError(
|
626
|
+
`Unexpected symbol at position ${cursorPosition}. Locator: ${sourceLocator}`,
|
627
|
+
)
|
628
|
+
}
|
629
|
+
}
|
630
|
+
|
631
|
+
return locators
|
632
|
+
}
|
633
|
+
|
634
|
+
export function locatorToString(locator: DataLocator): string {
|
635
|
+
if (typeof locator === 'object' && Array.isArray(locator)) {
|
636
|
+
return stepsToLocator(locator)
|
637
|
+
} else {
|
638
|
+
return locator
|
639
|
+
}
|
640
|
+
}
|
641
|
+
|
642
|
+
export function stepsToLocator(steps: DataLocatorStep[]): string {
|
643
|
+
let locator = '$'
|
644
|
+
;(steps ?? []).forEach((step) => {
|
645
|
+
switch (step.type) {
|
646
|
+
case DataLocatorStepType.OBJECT_PROPERTY:
|
647
|
+
locator += `.${(step as DataLocatorStepObjectProperty).propertyName}`
|
648
|
+
break
|
649
|
+
case DataLocatorStepType.ARRAY_ITEM:
|
650
|
+
locator += `[${(step as DataLocatorStepArrayItem).index}]`
|
651
|
+
break
|
652
|
+
case DataLocatorStepType.CURRENT_ARRAY_ITEM:
|
653
|
+
locator += '.$current'
|
654
|
+
break
|
655
|
+
case DataLocatorStepType.SCHEMA_OPTION:
|
656
|
+
locator += `<${(step as DataLocatorStepSchemaOption).key}>`
|
657
|
+
break
|
658
|
+
default:
|
659
|
+
throw new Error(`Unknown locator step type: ${step.type}`)
|
660
|
+
}
|
661
|
+
})
|
662
|
+
return locator
|
663
|
+
}
|
664
|
+
|
665
|
+
/**
|
666
|
+
* Finds locators of `$<formula>` formulas inside a data object. Returns list of locators by which these formulas can be found.
|
667
|
+
*
|
668
|
+
* For example, for
|
669
|
+
* {
|
670
|
+
* "obj": {
|
671
|
+
* "key": {
|
672
|
+
* $var: $.abc
|
673
|
+
* }
|
674
|
+
* }
|
675
|
+
* }
|
676
|
+
* it will return ['$.obj.key']
|
677
|
+
*/
|
678
|
+
export function getFormulaLocators(formulaType: string, data: any): string[] {
|
679
|
+
function doGetFormulaLocators(data: Record<string, any>, locator: string) {
|
680
|
+
if (data && typeof data === 'object') {
|
681
|
+
if (`$${formulaType}` in data && Object.keys(data).length === 1) {
|
682
|
+
return [locator]
|
683
|
+
} else if (Array.isArray(data)) {
|
684
|
+
const locators = []
|
685
|
+
data.map((item, idx) => {
|
686
|
+
locators.push(...doGetFormulaLocators(item, `${locator}[${idx}]`))
|
687
|
+
})
|
688
|
+
return locators
|
689
|
+
} else {
|
690
|
+
const locators = []
|
691
|
+
for (const [key, value] of Object.entries(data)) {
|
692
|
+
locators.push(...doGetFormulaLocators(value, `${locator}.${key}`))
|
693
|
+
}
|
694
|
+
return locators
|
695
|
+
}
|
696
|
+
} else {
|
697
|
+
return []
|
698
|
+
}
|
699
|
+
}
|
700
|
+
|
701
|
+
return doGetFormulaLocators(data, '$')
|
702
|
+
}
|