@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,396 @@
|
|
1
|
+
import {
|
2
|
+
createSchema,
|
3
|
+
mergeSchemas,
|
4
|
+
extendSchema,
|
5
|
+
createCompoundSchema,
|
6
|
+
} from './schema-builder'
|
7
|
+
|
8
|
+
describe('SchemaBuilder', () => {
|
9
|
+
describe('generation', () => {
|
10
|
+
describe('simple types', () => {
|
11
|
+
it('should build schema for integer', () => {
|
12
|
+
const schema = createSchema(1)
|
13
|
+
expect(schema.type).toEqual('integer')
|
14
|
+
})
|
15
|
+
|
16
|
+
it('should build schema for number', () => {
|
17
|
+
const schema = createSchema(1.1)
|
18
|
+
expect(schema.type).toEqual('number')
|
19
|
+
})
|
20
|
+
|
21
|
+
it('should build schema for string', () => {
|
22
|
+
const schema = createSchema('some string')
|
23
|
+
expect(schema.type).toEqual('string')
|
24
|
+
})
|
25
|
+
|
26
|
+
it('should build schema for null', () => {
|
27
|
+
const schema = createSchema(null)
|
28
|
+
expect(schema.type).toBeUndefined()
|
29
|
+
})
|
30
|
+
|
31
|
+
it('should build schema for boolean', () => {
|
32
|
+
const schema = createSchema(false)
|
33
|
+
expect(schema.type).toEqual('boolean')
|
34
|
+
})
|
35
|
+
|
36
|
+
it('should build schema for array', () => {
|
37
|
+
const schema = createSchema([])
|
38
|
+
expect(schema.type).toEqual('array')
|
39
|
+
expect(schema.items).toBeUndefined()
|
40
|
+
})
|
41
|
+
|
42
|
+
it('should build schema for object', () => {
|
43
|
+
const schema = createSchema({})
|
44
|
+
expect(schema.type).toEqual('object')
|
45
|
+
expect(schema.properties).toBeUndefined()
|
46
|
+
})
|
47
|
+
|
48
|
+
it('should build schema for undefined', () => {
|
49
|
+
const schema = createSchema(undefined)
|
50
|
+
expect(schema.type).toBeUndefined()
|
51
|
+
})
|
52
|
+
})
|
53
|
+
|
54
|
+
describe('arrays', () => {
|
55
|
+
it('it should generate schema for arrays of the same type', () => {
|
56
|
+
const schema = createSchema([1, 2, 3])
|
57
|
+
expect(schema.type).toEqual('array')
|
58
|
+
expect(schema.items.type).toEqual('integer')
|
59
|
+
})
|
60
|
+
|
61
|
+
it('it should generate schema for arrays of the same type with floats', () => {
|
62
|
+
const schema = createSchema([1, 2.1, 3])
|
63
|
+
expect(schema.type).toEqual('array')
|
64
|
+
expect(schema.items.type).toEqual('number')
|
65
|
+
})
|
66
|
+
})
|
67
|
+
|
68
|
+
describe('objects', () => {
|
69
|
+
it('it should generate schema for object with props of the same type', () => {
|
70
|
+
const schema = createSchema({ one: 1, two: 2 })
|
71
|
+
expect(schema).toEqual({
|
72
|
+
type: 'object',
|
73
|
+
properties: {
|
74
|
+
one: { type: 'integer' },
|
75
|
+
two: { type: 'integer' },
|
76
|
+
},
|
77
|
+
})
|
78
|
+
})
|
79
|
+
|
80
|
+
it('it should generate schema for object with props of different types', () => {
|
81
|
+
const schema = createSchema({ one: 1, two: 'second' })
|
82
|
+
expect(schema).toEqual({
|
83
|
+
type: 'object',
|
84
|
+
properties: {
|
85
|
+
one: { type: 'integer' },
|
86
|
+
two: { type: 'string' },
|
87
|
+
},
|
88
|
+
})
|
89
|
+
})
|
90
|
+
})
|
91
|
+
|
92
|
+
describe('nested array', () => {
|
93
|
+
it('should generate schema for nested arrays', () => {
|
94
|
+
const schema = createSchema([1, [2.1], [[3]]])
|
95
|
+
expect(schema.type).toEqual('array')
|
96
|
+
expect(schema.items).toHaveProperty('anyOf')
|
97
|
+
const integerSchema = schema.items.anyOf.find(
|
98
|
+
(s) => s.type == 'integer',
|
99
|
+
)
|
100
|
+
expect(integerSchema).toBeTruthy()
|
101
|
+
const arraySchema = schema.items.anyOf.find((s) => s.type == 'array')
|
102
|
+
expect(arraySchema).not.toBeUndefined()
|
103
|
+
expect(arraySchema.items).toHaveProperty('anyOf')
|
104
|
+
const nestedNumberSchema = arraySchema.items.anyOf.find(
|
105
|
+
(s) => s.type == 'number',
|
106
|
+
)
|
107
|
+
expect(nestedNumberSchema).not.toBeUndefined()
|
108
|
+
const nestedArraySchema = arraySchema.items.anyOf.find(
|
109
|
+
(s) => s.type == 'array',
|
110
|
+
)
|
111
|
+
expect(nestedArraySchema).not.toBeUndefined()
|
112
|
+
expect(nestedArraySchema.items.type).toEqual('integer')
|
113
|
+
})
|
114
|
+
|
115
|
+
it('complex end-to-end case: should generate schema for nested arrays and simplify anyOf', () => {
|
116
|
+
const schema = createSchema([
|
117
|
+
1,
|
118
|
+
'some string',
|
119
|
+
null,
|
120
|
+
[2, 'some other string', {}],
|
121
|
+
[[3.1]],
|
122
|
+
])
|
123
|
+
expect(schema).toMatchSnapshot()
|
124
|
+
})
|
125
|
+
})
|
126
|
+
|
127
|
+
describe('nested objects/arrays', () => {
|
128
|
+
it('should combine object schemas and respect required property', () => {
|
129
|
+
const schema = createSchema({
|
130
|
+
one: 1,
|
131
|
+
two: 'second',
|
132
|
+
three: {
|
133
|
+
four: 5,
|
134
|
+
five: [5],
|
135
|
+
six: null,
|
136
|
+
seven: [{}, { eight: 1.1 }, { nine: 'nine' }],
|
137
|
+
},
|
138
|
+
})
|
139
|
+
expect(schema).toMatchSnapshot()
|
140
|
+
})
|
141
|
+
})
|
142
|
+
|
143
|
+
describe('all cases combined', () => {
|
144
|
+
it('should generate valid schemas for complex objects', () => {
|
145
|
+
const schema = createSchema([
|
146
|
+
{
|
147
|
+
lvl1PropNum: 1,
|
148
|
+
lvl1PropStr: 'second',
|
149
|
+
lvl1PropObj1: { lvl2PropArr: [1, 2] },
|
150
|
+
lvl1PropObj2: {
|
151
|
+
lvl2PropNum1: 5,
|
152
|
+
lvl2PropArr1: [5],
|
153
|
+
six: null,
|
154
|
+
lvl2PropArr2: [
|
155
|
+
{},
|
156
|
+
{ lvl3PropNum1: 1.2 },
|
157
|
+
{ lvl3PropStr1: 'nine' },
|
158
|
+
[1, false],
|
159
|
+
1,
|
160
|
+
'some string',
|
161
|
+
],
|
162
|
+
},
|
163
|
+
},
|
164
|
+
{ lvl1PropStr: 'one' },
|
165
|
+
{ lvl1PropNum: 1.2, lvl1PropStr: 'one' },
|
166
|
+
{
|
167
|
+
lvl1PropStr: 'one',
|
168
|
+
lvl1PropObj1: { lvl2PropArr: [2.3, null, 'some string', false] },
|
169
|
+
},
|
170
|
+
])
|
171
|
+
|
172
|
+
expect(schema).toMatchSnapshot()
|
173
|
+
})
|
174
|
+
})
|
175
|
+
|
176
|
+
describe('prototype methods', () => {
|
177
|
+
function createObjectWithProtoMethods(): Record<string, any> {
|
178
|
+
return {
|
179
|
+
constructor: 'constructor value',
|
180
|
+
hasOwnProperty: 'hasOwnProperty value',
|
181
|
+
isPrototypeOf: 'isPrototypeOf value',
|
182
|
+
propertyIsEnumerable: 'propertyIsEnumerable value',
|
183
|
+
toLocaleString: 'toLocaleString value',
|
184
|
+
toString: 'toString value',
|
185
|
+
valueOf: 'valueOf value',
|
186
|
+
__defineGetter__: '__defineGetter__ value',
|
187
|
+
__defineSetter__: '__defineSetter__ value',
|
188
|
+
__lookupGetter__: '__lookupGetter__ value',
|
189
|
+
__lookupSetter__: '__lookupSetter__ value',
|
190
|
+
__proto__: '__proto__ value',
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
it('should work for props with the same names as Object.prototype methods', async () => {
|
195
|
+
// it's improtant to keep them in array, as this is more complex case
|
196
|
+
const value: any = [
|
197
|
+
createObjectWithProtoMethods(),
|
198
|
+
createObjectWithProtoMethods(),
|
199
|
+
]
|
200
|
+
const schema = createSchema(value)
|
201
|
+
expect(schema.items).toEqual({
|
202
|
+
type: 'object',
|
203
|
+
properties: {
|
204
|
+
constructor: { type: 'string' },
|
205
|
+
hasOwnProperty: {
|
206
|
+
type: 'string',
|
207
|
+
},
|
208
|
+
isPrototypeOf: {
|
209
|
+
type: 'string',
|
210
|
+
},
|
211
|
+
propertyIsEnumerable: {
|
212
|
+
type: 'string',
|
213
|
+
},
|
214
|
+
toLocaleString: {
|
215
|
+
type: 'string',
|
216
|
+
},
|
217
|
+
toString: { type: 'string' },
|
218
|
+
valueOf: { type: 'string' },
|
219
|
+
__defineGetter__: {
|
220
|
+
type: 'string',
|
221
|
+
},
|
222
|
+
__defineSetter__: {
|
223
|
+
type: 'string',
|
224
|
+
},
|
225
|
+
__lookupGetter__: {
|
226
|
+
type: 'string',
|
227
|
+
},
|
228
|
+
__lookupSetter__: {
|
229
|
+
type: 'string',
|
230
|
+
},
|
231
|
+
},
|
232
|
+
})
|
233
|
+
})
|
234
|
+
})
|
235
|
+
|
236
|
+
describe('circular refs', () => {
|
237
|
+
it('should throw an error w/ explanation', async () => {
|
238
|
+
const a: any = {}
|
239
|
+
const b: any = {}
|
240
|
+
a.b = b
|
241
|
+
b.a = a
|
242
|
+
|
243
|
+
expect(() => {
|
244
|
+
createSchema(a)
|
245
|
+
}).toThrowErrorMatchingSnapshot()
|
246
|
+
})
|
247
|
+
})
|
248
|
+
|
249
|
+
describe('non-json values', () => {
|
250
|
+
it('should ignore functions', async () => {
|
251
|
+
const value: any = {
|
252
|
+
func() {
|
253
|
+
/* do nothing*/
|
254
|
+
},
|
255
|
+
someProp: 'string',
|
256
|
+
}
|
257
|
+
const schema = createSchema(value)
|
258
|
+
expect(schema.type).toEqual('object')
|
259
|
+
expect(Object.keys(schema.properties)).toHaveLength(1)
|
260
|
+
expect(schema.properties).toHaveProperty('someProp')
|
261
|
+
})
|
262
|
+
})
|
263
|
+
|
264
|
+
describe('null values', () => {
|
265
|
+
it('should generate fields with empty schemas when the value is null', async () => {
|
266
|
+
const value = {
|
267
|
+
key1: 'string',
|
268
|
+
key2: null,
|
269
|
+
}
|
270
|
+
|
271
|
+
const schema = createSchema(value)
|
272
|
+
expect(schema.type).toEqual('object')
|
273
|
+
expect(Object.keys(schema.properties)).toHaveLength(2)
|
274
|
+
expect(schema.properties.key1.type).toEqual('string')
|
275
|
+
expect(schema.properties.key2.type).toBeUndefined()
|
276
|
+
})
|
277
|
+
})
|
278
|
+
})
|
279
|
+
|
280
|
+
describe('createCompoundSchema', () => {
|
281
|
+
it('should create compound schema from multiple inputs', () => {
|
282
|
+
const schema = createCompoundSchema([
|
283
|
+
{ age: 35 },
|
284
|
+
{ age: 19, name: 'John' },
|
285
|
+
{ age: 23, admin: true },
|
286
|
+
])
|
287
|
+
expect(schema).toEqual({
|
288
|
+
type: 'object',
|
289
|
+
properties: {
|
290
|
+
admin: { type: 'boolean' },
|
291
|
+
age: { type: 'integer' },
|
292
|
+
name: { type: 'string' },
|
293
|
+
},
|
294
|
+
})
|
295
|
+
})
|
296
|
+
})
|
297
|
+
|
298
|
+
describe('merging', () => {
|
299
|
+
it('should merge simple schemas', () => {
|
300
|
+
const merged = mergeSchemas([{ type: 'number' }, { type: 'string' }])
|
301
|
+
expect(merged).toEqual({ type: ['number', 'string'] })
|
302
|
+
})
|
303
|
+
|
304
|
+
it('should merge array schemas', () => {
|
305
|
+
const merged = mergeSchemas([
|
306
|
+
{
|
307
|
+
type: 'array',
|
308
|
+
items: {
|
309
|
+
anyOf: [
|
310
|
+
{
|
311
|
+
type: ['number', 'string'],
|
312
|
+
},
|
313
|
+
{
|
314
|
+
type: 'array',
|
315
|
+
},
|
316
|
+
],
|
317
|
+
},
|
318
|
+
},
|
319
|
+
{ type: 'string' },
|
320
|
+
])
|
321
|
+
expect(merged).toEqual({
|
322
|
+
anyOf: [
|
323
|
+
{ type: 'string' },
|
324
|
+
{
|
325
|
+
type: 'array',
|
326
|
+
items: {
|
327
|
+
type: ['number', 'string', 'array'],
|
328
|
+
},
|
329
|
+
},
|
330
|
+
],
|
331
|
+
})
|
332
|
+
})
|
333
|
+
|
334
|
+
it('should merge object schemas', async () => {
|
335
|
+
const merged = mergeSchemas([
|
336
|
+
{ type: 'object' },
|
337
|
+
{
|
338
|
+
type: 'object',
|
339
|
+
properties: { prop1: { type: 'string' } },
|
340
|
+
},
|
341
|
+
])
|
342
|
+
expect(merged).toEqual({
|
343
|
+
type: 'object',
|
344
|
+
properties: { prop1: { type: 'string' } },
|
345
|
+
})
|
346
|
+
})
|
347
|
+
|
348
|
+
it('should merge more than 2 schemas', async () => {
|
349
|
+
const merged = mergeSchemas([
|
350
|
+
{ type: 'number' },
|
351
|
+
{ type: 'string' },
|
352
|
+
{ type: 'boolean' },
|
353
|
+
])
|
354
|
+
expect(merged).toEqual({ type: ['boolean', 'number', 'string'] })
|
355
|
+
})
|
356
|
+
})
|
357
|
+
|
358
|
+
describe('extending', () => {
|
359
|
+
it('should extend simple schemas', () => {
|
360
|
+
const merged = extendSchema({ type: 'number' }, 'some string')
|
361
|
+
expect(merged).toEqual({
|
362
|
+
type: ['number', 'string'],
|
363
|
+
})
|
364
|
+
})
|
365
|
+
|
366
|
+
it('should extend array schemas', () => {
|
367
|
+
const merged = extendSchema(
|
368
|
+
{
|
369
|
+
type: 'array',
|
370
|
+
items: {
|
371
|
+
anyOf: [
|
372
|
+
{
|
373
|
+
type: ['number', 'string'],
|
374
|
+
},
|
375
|
+
{
|
376
|
+
type: 'array',
|
377
|
+
},
|
378
|
+
],
|
379
|
+
},
|
380
|
+
},
|
381
|
+
'some string',
|
382
|
+
)
|
383
|
+
expect(merged).toEqual({
|
384
|
+
anyOf: [
|
385
|
+
createSchema('some string'),
|
386
|
+
{
|
387
|
+
type: 'array',
|
388
|
+
items: {
|
389
|
+
type: ['number', 'string', 'array'],
|
390
|
+
},
|
391
|
+
},
|
392
|
+
],
|
393
|
+
})
|
394
|
+
})
|
395
|
+
})
|
396
|
+
})
|
@@ -0,0 +1,258 @@
|
|
1
|
+
/*
|
2
|
+
Originally created by Aspecto folks: https://github.com/aspecto-io/genson-js.
|
3
|
+
|
4
|
+
We added a few modifications:
|
5
|
+
* Ignore null schemas when combining schemas.
|
6
|
+
* Always ignore `required`.
|
7
|
+
*/
|
8
|
+
function createSchemaFor(value: any): any {
|
9
|
+
switch (typeof value) {
|
10
|
+
case 'number':
|
11
|
+
if (Number.isInteger(value)) {
|
12
|
+
return { type: 'integer' }
|
13
|
+
}
|
14
|
+
return { type: 'number' }
|
15
|
+
case 'boolean':
|
16
|
+
return { type: 'boolean' }
|
17
|
+
case 'string':
|
18
|
+
return { type: 'string' }
|
19
|
+
case 'object':
|
20
|
+
if (value === null) {
|
21
|
+
return {}
|
22
|
+
}
|
23
|
+
if (Array.isArray(value)) {
|
24
|
+
return createSchemaForArray(value)
|
25
|
+
}
|
26
|
+
return createSchemaForObject(value)
|
27
|
+
default:
|
28
|
+
return null
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
function createSchemaForArray(arr: Array<any>): any {
|
33
|
+
if (arr.length === 0) {
|
34
|
+
return { type: 'array' }
|
35
|
+
}
|
36
|
+
const elementSchemas = arr.map((value) => createSchemaFor(value))
|
37
|
+
const items = combineSchemas(elementSchemas)
|
38
|
+
return { type: 'array', items }
|
39
|
+
}
|
40
|
+
|
41
|
+
function createSchemaForObject(obj: Record<string, any>): any {
|
42
|
+
const keys = Object.keys(obj)
|
43
|
+
if (keys.length === 0) {
|
44
|
+
return {
|
45
|
+
type: 'object',
|
46
|
+
}
|
47
|
+
}
|
48
|
+
const properties = Object.entries(obj).reduce((props, [key, val]) => {
|
49
|
+
props[key] = createSchemaFor(val)
|
50
|
+
return props
|
51
|
+
}, {})
|
52
|
+
|
53
|
+
const schema: any = { type: 'object', properties }
|
54
|
+
return schema
|
55
|
+
}
|
56
|
+
|
57
|
+
function combineSchemas(schemas: any[]): any {
|
58
|
+
const schemasByType: Record<string, any[]> = {
|
59
|
+
undefined: [],
|
60
|
+
['null']: [],
|
61
|
+
['boolean']: [],
|
62
|
+
['integer']: [],
|
63
|
+
['number']: [],
|
64
|
+
['string']: [],
|
65
|
+
['array']: [],
|
66
|
+
['object']: [],
|
67
|
+
}
|
68
|
+
|
69
|
+
const unwrappedSchemas = unwrapSchemas(schemas)
|
70
|
+
for (const unwrappedSchema of unwrappedSchemas) {
|
71
|
+
const type = unwrappedSchema.type
|
72
|
+
schemasByType[type].push(unwrappedSchema)
|
73
|
+
}
|
74
|
+
|
75
|
+
if (schemasByType['number'].length > 0) {
|
76
|
+
// if at least one value is number, other integers can be numbers too
|
77
|
+
schemasByType['number'].push(
|
78
|
+
...schemasByType['integer'].map((r) => ({
|
79
|
+
...r,
|
80
|
+
type: 'number',
|
81
|
+
})),
|
82
|
+
)
|
83
|
+
delete schemasByType['integer']
|
84
|
+
}
|
85
|
+
|
86
|
+
const resultSchemasByType: Record<string, any> = {
|
87
|
+
['null']: combineSameTypeScalarSchemas(schemasByType['null']),
|
88
|
+
['boolean']: combineSameTypeScalarSchemas(schemasByType['boolean']),
|
89
|
+
['number']: combineSameTypeScalarSchemas(schemasByType['number']),
|
90
|
+
['integer']: combineSameTypeScalarSchemas(schemasByType['integer']),
|
91
|
+
['string']: combineSameTypeScalarSchemas(schemasByType['string']),
|
92
|
+
['array']: combineArraySchemas(schemasByType['array']),
|
93
|
+
['object']: combineObjectSchemas(schemasByType['object']),
|
94
|
+
}
|
95
|
+
|
96
|
+
const schemasFound = Object.values(resultSchemasByType).filter(Boolean)
|
97
|
+
const multiType = schemasFound.length > 1
|
98
|
+
if (multiType) {
|
99
|
+
const wrapped = wrapAnyOfSchema({ anyOf: schemasFound })
|
100
|
+
return wrapped
|
101
|
+
}
|
102
|
+
return schemasFound[0] as any
|
103
|
+
}
|
104
|
+
|
105
|
+
function combineSameTypeScalarSchemas(schemas: any[]): any {
|
106
|
+
if (!schemas || schemas.length === 0) {
|
107
|
+
return undefined
|
108
|
+
}
|
109
|
+
|
110
|
+
const schema = <any>{
|
111
|
+
type: schemas[0].type,
|
112
|
+
}
|
113
|
+
|
114
|
+
addTitleFromSourceSchemas(schema, schemas)
|
115
|
+
|
116
|
+
return schema
|
117
|
+
}
|
118
|
+
|
119
|
+
function combineArraySchemas(schemas: any[]): any {
|
120
|
+
if (!schemas || schemas.length === 0) {
|
121
|
+
return undefined
|
122
|
+
}
|
123
|
+
const itemSchemas: any[] = []
|
124
|
+
for (const schema of schemas) {
|
125
|
+
if (!schema.items) continue
|
126
|
+
const unwrappedSchemas = unwrapSchema(schema.items)
|
127
|
+
itemSchemas.push(...unwrappedSchemas)
|
128
|
+
}
|
129
|
+
|
130
|
+
const schema = <any>{
|
131
|
+
type: 'array',
|
132
|
+
}
|
133
|
+
addTitleFromSourceSchemas(schema, schemas)
|
134
|
+
|
135
|
+
if (itemSchemas.length > 0) {
|
136
|
+
schema.items = combineSchemas(itemSchemas)
|
137
|
+
}
|
138
|
+
return schema
|
139
|
+
}
|
140
|
+
|
141
|
+
function combineObjectSchemas(schemas: any[]): any {
|
142
|
+
if (!schemas || schemas.length === 0) {
|
143
|
+
return undefined
|
144
|
+
}
|
145
|
+
const allPropSchemas = schemas.map((s) => s.properties).filter(Boolean)
|
146
|
+
const schemasByProp: Record<string, any[]> = Object.create(null)
|
147
|
+
// const schemasByProp: Record<string, any[]> = {};
|
148
|
+
for (const propSchemas of allPropSchemas) {
|
149
|
+
for (const [prop, schema] of Object.entries(propSchemas)) {
|
150
|
+
if (!schemasByProp[prop]) {
|
151
|
+
schemasByProp[prop] = []
|
152
|
+
}
|
153
|
+
const unwrappedSchemas = unwrapSchema(schema)
|
154
|
+
schemasByProp[prop].push(...unwrappedSchemas)
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
const properties: Record<string, any> = Object.entries(schemasByProp).reduce(
|
159
|
+
(props, [prop, schemas]) => {
|
160
|
+
if (schemas.length === 1) {
|
161
|
+
props[prop] = schemas[0]
|
162
|
+
} else {
|
163
|
+
props[prop] = combineSchemas(schemas)
|
164
|
+
}
|
165
|
+
return props
|
166
|
+
},
|
167
|
+
{},
|
168
|
+
)
|
169
|
+
|
170
|
+
const combinedSchema: any = {
|
171
|
+
type: 'object',
|
172
|
+
}
|
173
|
+
addTitleFromSourceSchemas(combinedSchema, schemas)
|
174
|
+
|
175
|
+
if (Object.keys(properties).length > 0) {
|
176
|
+
combinedSchema.properties = properties
|
177
|
+
}
|
178
|
+
|
179
|
+
return combinedSchema
|
180
|
+
}
|
181
|
+
|
182
|
+
export function unwrapSchema(schema: any): any[] {
|
183
|
+
if (!schema) return []
|
184
|
+
if (schema.anyOf) {
|
185
|
+
return unwrapSchemas(schema.anyOf)
|
186
|
+
}
|
187
|
+
if (Array.isArray(schema.type)) {
|
188
|
+
return schema.type.map((x) => ({ type: x }))
|
189
|
+
}
|
190
|
+
return [schema]
|
191
|
+
}
|
192
|
+
|
193
|
+
export function unwrapSchemas(schemas: any[]): any[] {
|
194
|
+
if (!schemas || schemas.length === 0) return []
|
195
|
+
const unwrappedSchemas = schemas.flatMap((schema) => unwrapSchema(schema))
|
196
|
+
return unwrappedSchemas
|
197
|
+
}
|
198
|
+
|
199
|
+
export function wrapAnyOfSchema(schema: any): any {
|
200
|
+
const simpleSchemas = []
|
201
|
+
const complexSchemas = []
|
202
|
+
for (const subSchema of schema.anyOf) {
|
203
|
+
if (Array.isArray(subSchema.type)) {
|
204
|
+
simpleSchemas.push(...subSchema.type)
|
205
|
+
} else if (isSimpleSchema(subSchema)) {
|
206
|
+
simpleSchemas.push((subSchema as any).type)
|
207
|
+
} else {
|
208
|
+
complexSchemas.push(subSchema)
|
209
|
+
}
|
210
|
+
}
|
211
|
+
if (complexSchemas.length === 0) {
|
212
|
+
return { type: simpleSchemas }
|
213
|
+
}
|
214
|
+
const anyOf = []
|
215
|
+
if (simpleSchemas.length > 0) {
|
216
|
+
anyOf.push({
|
217
|
+
type: simpleSchemas.length > 1 ? simpleSchemas : simpleSchemas[0],
|
218
|
+
})
|
219
|
+
}
|
220
|
+
anyOf.push(...complexSchemas)
|
221
|
+
return { anyOf }
|
222
|
+
}
|
223
|
+
|
224
|
+
function isSimpleSchema(schema: any): boolean {
|
225
|
+
const keys = Object.keys(schema)
|
226
|
+
return keys.length === 1 && keys[0] === 'type'
|
227
|
+
}
|
228
|
+
|
229
|
+
// FACADE
|
230
|
+
|
231
|
+
export function createSchema(value: any): any {
|
232
|
+
if (typeof value === 'undefined') value = null
|
233
|
+
const clone = JSON.parse(JSON.stringify(value))
|
234
|
+
return createSchemaFor(clone)
|
235
|
+
}
|
236
|
+
|
237
|
+
export function mergeSchemas(schemas: any[]): any {
|
238
|
+
const mergedSchema = combineSchemas(schemas)
|
239
|
+
return mergedSchema
|
240
|
+
}
|
241
|
+
|
242
|
+
export function extendSchema(schema: any, value: any): any {
|
243
|
+
const valueSchema = createSchema(value)
|
244
|
+
const mergedSchema = combineSchemas([schema, valueSchema])
|
245
|
+
return mergedSchema
|
246
|
+
}
|
247
|
+
|
248
|
+
export function createCompoundSchema(values: any[]): any {
|
249
|
+
const schemas = values.map((value) => createSchema(value))
|
250
|
+
return mergeSchemas(schemas)
|
251
|
+
}
|
252
|
+
|
253
|
+
function addTitleFromSourceSchemas(schema: any, schemas: any[]) {
|
254
|
+
const title = schemas.filter((s) => !!s.title)[0]?.title
|
255
|
+
if (title) {
|
256
|
+
schema.title = title
|
257
|
+
}
|
258
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { isJWT } from './jwt'
|
2
|
+
|
3
|
+
describe('JWT', () => {
|
4
|
+
it('should treat valid token as valid', () => {
|
5
|
+
expect(
|
6
|
+
isJWT(
|
7
|
+
'eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjYwZGQxYTU3MGRmZTk3MDAwOTAyZjY1NiIsImVtYWlsIjoiZGFuaWlsQGludGVncmF0aW9uLmFwcCIsIm5hbWUiOiJEYW5paWwgQnJhdGNoZW5rbyIsImRlZmF1bHRBY2NvdW50SWQiOiI2MGRkMWIyZTMwOWE1ODAwMDkwNzc2NGIiLCJkZWZhdWx0QXBwSWQiOiI2MTQyMGYyNmEyNTI4MzE0YmM3NTYwZTgiLCJ1c2VyIjp7ImlkIjoiNjBkZDFhNTcwZGZlOTcwMDA5MDJmNjU2IiwiZW1haWwiOiJkYW5paWxAaW50ZWdyYXRpb24uYXBwIiwibmFtZSI6IkRhbmlpbCBCcmF0Y2hlbmtvIiwiZGVmYXVsdEFjY291bnRJZCI6IjYwZGQxYjJlMzA5YTU4MDAwOTA3NzY0YiIsImRlZmF1bHRBcHBJZCI6IjYxNDIwZjI2YTI1MjgzMTRiYzc1NjBlOCIsImlzQWRtaW4iOnRydWV9LCJpc3MiOiJlOTI2YTI1OS0xNTM2LTQxYTUtOWVmMy03MDhkNzdiNjI2ODkiLCJleHAiOjE2Mzk3MzUxMTF9.s3sUNns-5mVi7e2y4nc7Mmm0-Bq4MqEbFxhYOxzDig4',
|
8
|
+
),
|
9
|
+
).toBe(true)
|
10
|
+
})
|
11
|
+
})
|
@@ -0,0 +1,40 @@
|
|
1
|
+
export function isJWT(token: string): boolean {
|
2
|
+
if (typeof token !== 'string') return false
|
3
|
+
|
4
|
+
const splittedToken = token.split('.')
|
5
|
+
if (splittedToken.length !== 3) return false
|
6
|
+
|
7
|
+
try {
|
8
|
+
JSON.parse(decodeBase64(splittedToken[0]))
|
9
|
+
} catch (e) {
|
10
|
+
return false
|
11
|
+
}
|
12
|
+
|
13
|
+
return true
|
14
|
+
}
|
15
|
+
|
16
|
+
function decodeBase64(s) {
|
17
|
+
const e = {},
|
18
|
+
L = s.length,
|
19
|
+
w = String.fromCharCode
|
20
|
+
let i,
|
21
|
+
b = 0,
|
22
|
+
c,
|
23
|
+
x,
|
24
|
+
l = 0,
|
25
|
+
a,
|
26
|
+
r = ''
|
27
|
+
const A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
28
|
+
for (i = 0; i < 64; i++) {
|
29
|
+
e[A.charAt(i)] = i
|
30
|
+
}
|
31
|
+
for (x = 0; x < L; x++) {
|
32
|
+
c = e[s.charAt(x)]
|
33
|
+
b = (b << 6) + c
|
34
|
+
l += 6
|
35
|
+
while (l >= 8) {
|
36
|
+
;((a = (b >>> (l -= 8)) & 0xff) || x < L - 2) && (r += w(a))
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return r
|
40
|
+
}
|