@membranehq/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/bundle.d.ts +2543 -0
- package/dist/bundle.js +26089 -0
- package/dist/bundle.js.map +1 -0
- package/dist/dts/__mocks__/axios.d.ts +4 -0
- package/dist/dts/_helper.d.ts +7 -0
- package/dist/dts/_helper.test.d.ts +1 -0
- package/dist/dts/accessors.d.ts +85 -0
- package/dist/dts/accessors.test.d.ts +1 -0
- package/dist/dts/actions/accessors.d.ts +49 -0
- package/dist/dts/actions/action-types.d.ts +26 -0
- package/dist/dts/actions/index.d.ts +3 -0
- package/dist/dts/actions/types.d.ts +95 -0
- package/dist/dts/alerts/index.d.ts +1 -0
- package/dist/dts/alerts/types.d.ts +24 -0
- package/dist/dts/api-client.d.ts +32 -0
- package/dist/dts/api-client.test.d.ts +1 -0
- package/dist/dts/app-data-schemas/accessors.d.ts +18 -0
- package/dist/dts/app-data-schemas/api.d.ts +33 -0
- package/dist/dts/app-data-schemas/index.d.ts +23 -0
- package/dist/dts/app-events/accessors.d.ts +20 -0
- package/dist/dts/app-events/api.d.ts +44 -0
- package/dist/dts/app-events/index.d.ts +42 -0
- package/dist/dts/apps/index.d.ts +1 -0
- package/dist/dts/apps/types.d.ts +18 -0
- package/dist/dts/auth/accessors.d.ts +10 -0
- package/dist/dts/auth/index.d.ts +7 -0
- package/dist/dts/client.d.ts +70 -0
- package/dist/dts/connections/accessors.d.ts +88 -0
- package/dist/dts/connections/api.d.ts +27 -0
- package/dist/dts/connections/create-or-update-connection.d.ts +14 -0
- package/dist/dts/connections/index.d.ts +3 -0
- package/dist/dts/connections/types.d.ts +52 -0
- package/dist/dts/connector-copilot/index.d.ts +1 -0
- package/dist/dts/connector-copilot/types.d.ts +160 -0
- package/dist/dts/connectors/auth.d.ts +171 -0
- package/dist/dts/connectors/constants.d.ts +5 -0
- package/dist/dts/connectors/data-locations/base.d.ts +10 -0
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/connector-event.d.ts +14 -0
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/custom-pull.d.ts +14 -0
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/full-scan.d.ts +7 -0
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/pull-latest-records.d.ts +17 -0
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/webhook.d.ts +18 -0
- package/dist/dts/connectors/data-locations/collections/events/index.d.ts +50 -0
- package/dist/dts/connectors/data-locations/collections/events/methods.d.ts +15 -0
- package/dist/dts/connectors/data-locations/collections/index.d.ts +70 -0
- package/dist/dts/connectors/data-locations/collections/methods/base.d.ts +24 -0
- package/dist/dts/connectors/data-locations/collections/methods/create.d.ts +7 -0
- package/dist/dts/connectors/data-locations/collections/methods/delete.d.ts +2 -0
- package/dist/dts/connectors/data-locations/collections/methods/find-by-id.d.ts +2 -0
- package/dist/dts/connectors/data-locations/collections/methods/find.d.ts +6 -0
- package/dist/dts/connectors/data-locations/collections/methods/list.d.ts +5 -0
- package/dist/dts/connectors/data-locations/collections/methods/match.d.ts +5 -0
- package/dist/dts/connectors/data-locations/collections/methods/search.d.ts +2 -0
- package/dist/dts/connectors/data-locations/collections/methods/update.d.ts +6 -0
- package/dist/dts/connectors/data-locations/directories/index.d.ts +17 -0
- package/dist/dts/connectors/data-locations/directories/methods/base.d.ts +18 -0
- package/dist/dts/connectors/data-locations/directories/methods/list.d.ts +2 -0
- package/dist/dts/connectors/data-locations/index.d.ts +6 -0
- package/dist/dts/connectors/data-locations/methods.d.ts +6 -0
- package/dist/dts/connectors/data-locations/types.d.ts +258 -0
- package/dist/dts/connectors/data-locations/utils.d.ts +17 -0
- package/dist/dts/connectors/data-locations/utils.test.d.ts +1 -0
- package/dist/dts/connectors/data-records.d.ts +7 -0
- package/dist/dts/connectors/events/index.d.ts +1 -0
- package/dist/dts/connectors/events/types.d.ts +36 -0
- package/dist/dts/connectors/global-webhooks/index.d.ts +1 -0
- package/dist/dts/connectors/global-webhooks/types.d.ts +33 -0
- package/dist/dts/connectors/graphql-api.d.ts +17 -0
- package/dist/dts/connectors/index.d.ts +13 -0
- package/dist/dts/connectors/methods.d.ts +44 -0
- package/dist/dts/connectors/openapi.d.ts +11 -0
- package/dist/dts/connectors/operations/handlers.d.ts +9 -0
- package/dist/dts/connectors/operations/index.d.ts +2 -0
- package/dist/dts/connectors/operations/types.d.ts +26 -0
- package/dist/dts/connectors/rest-api.d.ts +67 -0
- package/dist/dts/connectors/types.d.ts +75 -0
- package/dist/dts/connectors/udm.d.ts +14 -0
- package/dist/dts/data-builder/formula-processors.d.ts +13 -0
- package/dist/dts/data-builder/formula-processors.test.d.ts +1 -0
- package/dist/dts/data-builder/formula-types.d.ts +4 -0
- package/dist/dts/data-builder/formulas/and.d.ts +9 -0
- package/dist/dts/data-builder/formulas/and.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/base.d.ts +47 -0
- package/dist/dts/data-builder/formulas/case.d.ts +18 -0
- package/dist/dts/data-builder/formulas/case.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/concat.d.ts +19 -0
- package/dist/dts/data-builder/formulas/concat.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/copy.d.ts +10 -0
- package/dist/dts/data-builder/formulas/copy.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/dataSchemaRef.d.ts +22 -0
- package/dist/dts/data-builder/formulas/dataSchemaRef.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/domainFromEmail.d.ts +10 -0
- package/dist/dts/data-builder/formulas/domainFromEmail.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/eval.d.ts +28 -0
- package/dist/dts/data-builder/formulas/eval.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/extractDate.d.ts +11 -0
- package/dist/dts/data-builder/formulas/extractDate.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/extractTime.d.ts +11 -0
- package/dist/dts/data-builder/formulas/extractTime.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/findAppRecordId.d.ts +17 -0
- package/dist/dts/data-builder/formulas/findAppRecordId.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/findExternalRecordId.d.ts +17 -0
- package/dist/dts/data-builder/formulas/findExternalRecordId.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/first-name.d.ts +10 -0
- package/dist/dts/data-builder/formulas/first-name.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/firstNotEmpty.d.ts +7 -0
- package/dist/dts/data-builder/formulas/firstNotEmpty.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/formula.d.ts +8 -0
- package/dist/dts/data-builder/formulas/formula.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/index.d.ts +26 -0
- package/dist/dts/data-builder/formulas/index.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/iterate.d.ts +19 -0
- package/dist/dts/data-builder/formulas/iterate.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/jsonata.d.ts +8 -0
- package/dist/dts/data-builder/formulas/jsonata.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/last-name.d.ts +11 -0
- package/dist/dts/data-builder/formulas/last-name.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/lookup.d.ts +12 -0
- package/dist/dts/data-builder/formulas/lookup.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/map.d.ts +17 -0
- package/dist/dts/data-builder/formulas/map.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/mergeObjects.d.ts +12 -0
- package/dist/dts/data-builder/formulas/mergeObjects.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/or.d.ts +9 -0
- package/dist/dts/data-builder/formulas/or.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/plain.d.ts +8 -0
- package/dist/dts/data-builder/formulas/plain.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/record.d.ts +11 -0
- package/dist/dts/data-builder/formulas/record.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/tpl.d.ts +15 -0
- package/dist/dts/data-builder/formulas/tpl.test.d.ts +1 -0
- package/dist/dts/data-builder/formulas/types.d.ts +27 -0
- package/dist/dts/data-builder/formulas/var.d.ts +11 -0
- package/dist/dts/data-builder/formulas/var.test.d.ts +1 -0
- package/dist/dts/data-builder/index.d.ts +9 -0
- package/dist/dts/data-builder/index.test.d.ts +1 -0
- package/dist/dts/data-builder/locators.d.ts +44 -0
- package/dist/dts/data-builder/locators.test.d.ts +1 -0
- package/dist/dts/data-collections/index.d.ts +1 -0
- package/dist/dts/data-collections/types.d.ts +24 -0
- package/dist/dts/data-filter/index.d.ts +13 -0
- package/dist/dts/data-filter/index.test.d.ts +1 -0
- package/dist/dts/data-filter/operators.d.ts +13 -0
- package/dist/dts/data-filter/operators.test.d.ts +1 -0
- package/dist/dts/data-form/data-field.d.ts +7 -0
- package/dist/dts/data-form/index.d.ts +21 -0
- package/dist/dts/data-links/accessors.d.ts +20 -0
- package/dist/dts/data-links/api.d.ts +56 -0
- package/dist/dts/data-links/index.d.ts +36 -0
- package/dist/dts/data-schema/create.d.ts +2 -0
- package/dist/dts/data-schema/create.test.d.ts +1 -0
- package/dist/dts/data-schema/data-field.d.ts +14 -0
- package/dist/dts/data-schema/index.d.ts +5 -0
- package/dist/dts/data-schema/merge.d.ts +10 -0
- package/dist/dts/data-schema/merge.test.d.ts +1 -0
- package/dist/dts/data-schema/types.d.ts +35 -0
- package/dist/dts/data-schema/utils.d.ts +47 -0
- package/dist/dts/data-schema/utils.test.d.ts +1 -0
- package/dist/dts/data-sources/accessors.d.ts +64 -0
- package/dist/dts/data-sources/api.d.ts +90 -0
- package/dist/dts/data-sources/constants.d.ts +4 -0
- package/dist/dts/data-sources/index.d.ts +4 -0
- package/dist/dts/data-sources/types.d.ts +63 -0
- package/dist/dts/date-time/index.d.ts +1 -0
- package/dist/dts/date-time/parse.d.ts +1 -0
- package/dist/dts/date-time/parse.test.d.ts +1 -0
- package/dist/dts/datetime.d.ts +1 -0
- package/dist/dts/entity-repository.d.ts +24 -0
- package/dist/dts/errors/error-doc-enum.d.ts +7 -0
- package/dist/dts/errors/index.d.ts +105 -0
- package/dist/dts/external-events/accessors.d.ts +19 -0
- package/dist/dts/external-events/api.d.ts +22 -0
- package/dist/dts/external-events/index.d.ts +8 -0
- package/dist/dts/external-events/types.d.ts +157 -0
- package/dist/dts/field-mappings/accessors.d.ts +54 -0
- package/dist/dts/field-mappings/api.d.ts +58 -0
- package/dist/dts/field-mappings/index.d.ts +66 -0
- package/dist/dts/field-mappings/merge/is-object.test.d.ts +1 -0
- package/dist/dts/field-mappings/merge/merge-with-formulas.d.ts +2 -0
- package/dist/dts/field-mappings/merge/merge-with-formulas.test.d.ts +1 -0
- package/dist/dts/field-mappings/types.d.ts +12 -0
- package/dist/dts/flow-runs/accessors.d.ts +33 -0
- package/dist/dts/flow-runs/flow-node-runs.d.ts +42 -0
- package/dist/dts/flow-runs/index.d.ts +78 -0
- package/dist/dts/flows/accessors.d.ts +75 -0
- package/dist/dts/flows/api.d.ts +54 -0
- package/dist/dts/flows/index.d.ts +6 -0
- package/dist/dts/flows/nodes/api-request-to-external-app.d.ts +3 -0
- package/dist/dts/flows/nodes/api-request-to-your-app.d.ts +3 -0
- package/dist/dts/flows/nodes/api-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/app-event-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/base.d.ts +17 -0
- package/dist/dts/flows/nodes/connector-event-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/create-data-link.d.ts +3 -0
- package/dist/dts/flows/nodes/create-data-record.d.ts +3 -0
- package/dist/dts/flows/nodes/custom-http-request.d.ts +3 -0
- package/dist/dts/flows/nodes/data-record-created-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/data-record-deleted-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/data-record-updated-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/delete-data-link.d.ts +3 -0
- package/dist/dts/flows/nodes/delete-data-record.d.ts +3 -0
- package/dist/dts/flows/nodes/filter.d.ts +3 -0
- package/dist/dts/flows/nodes/find-data-link.d.ts +3 -0
- package/dist/dts/flows/nodes/find-data-record-by-id.d.ts +3 -0
- package/dist/dts/flows/nodes/find-data-records.d.ts +3 -0
- package/dist/dts/flows/nodes/find-or-create-data-record.d.ts +3 -0
- package/dist/dts/flows/nodes/for-each-v2.d.ts +3 -0
- package/dist/dts/flows/nodes/for-each.d.ts +3 -0
- package/dist/dts/flows/nodes/index.d.ts +37 -0
- package/dist/dts/flows/nodes/integration-specific-operation.d.ts +3 -0
- package/dist/dts/flows/nodes/list-data-records.d.ts +3 -0
- package/dist/dts/flows/nodes/lookup-data-record.d.ts +3 -0
- package/dist/dts/flows/nodes/run-action.d.ts +3 -0
- package/dist/dts/flows/nodes/run-javascript.d.ts +3 -0
- package/dist/dts/flows/nodes/schedule-trigger.d.ts +3 -0
- package/dist/dts/flows/nodes/search-data-records.d.ts +3 -0
- package/dist/dts/flows/nodes/transform-data.d.ts +3 -0
- package/dist/dts/flows/nodes/update-data-record.d.ts +3 -0
- package/dist/dts/flows/schemas.d.ts +240 -0
- package/dist/dts/flows/types.d.ts +77 -0
- package/dist/dts/flows/utils.d.ts +16 -0
- package/dist/dts/flows/utils.test.d.ts +1 -0
- package/dist/dts/http-requests.d.ts +37 -0
- package/dist/dts/iframe.d.ts +11 -0
- package/dist/dts/index.d.ts +41 -0
- package/dist/dts/index.umd.d.ts +2 -0
- package/dist/dts/integration-elements/common.d.ts +3 -0
- package/dist/dts/integration-elements/connection-level-element.accessor.d.ts +29 -0
- package/dist/dts/integration-elements/index.d.ts +74 -0
- package/dist/dts/integration-elements/integration-level-element.accessor.d.ts +25 -0
- package/dist/dts/integrations/accessors.d.ts +58 -0
- package/dist/dts/integrations/api.d.ts +23 -0
- package/dist/dts/integrations/index.d.ts +3 -0
- package/dist/dts/integrations/types.d.ts +38 -0
- package/dist/dts/jwt.d.ts +1 -0
- package/dist/dts/jwt.test.d.ts +1 -0
- package/dist/dts/logging/index.d.ts +8 -0
- package/dist/dts/logging/index.test.d.ts +1 -0
- package/dist/dts/logging/types.d.ts +13 -0
- package/dist/dts/orgs/index.d.ts +1 -0
- package/dist/dts/orgs/types.d.ts +59 -0
- package/dist/dts/scenarios/accessors.d.ts +9 -0
- package/dist/dts/scenarios/index.d.ts +2 -0
- package/dist/dts/scenarios/types.d.ts +145 -0
- package/dist/dts/screens/accessors.d.ts +9 -0
- package/dist/dts/screens/index.d.ts +2 -0
- package/dist/dts/screens/types.d.ts +37 -0
- package/dist/dts/udm/activities.d.ts +143 -0
- package/dist/dts/udm/activities.test.d.ts +1 -0
- package/dist/dts/udm/base.d.ts +62 -0
- package/dist/dts/udm/bills.d.ts +3 -0
- package/dist/dts/udm/campaign-members.d.ts +3 -0
- package/dist/dts/udm/campaigns.d.ts +3 -0
- package/dist/dts/udm/companies.d.ts +3 -0
- package/dist/dts/udm/contact-lists.d.ts +3 -0
- package/dist/dts/udm/contacts.d.ts +3 -0
- package/dist/dts/udm/credit-notes.d.ts +3 -0
- package/dist/dts/udm/customers.d.ts +3 -0
- package/dist/dts/udm/deal-products.d.ts +3 -0
- package/dist/dts/udm/deal-stages.d.ts +3 -0
- package/dist/dts/udm/deals.d.ts +3 -0
- package/dist/dts/udm/documents.d.ts +59 -0
- package/dist/dts/udm/drive-items.d.ts +78 -0
- package/dist/dts/udm/drives.d.ts +46 -0
- package/dist/dts/udm/eeocs.d.ts +3 -0
- package/dist/dts/udm/emails.d.ts +115 -0
- package/dist/dts/udm/employees.d.ts +3 -0
- package/dist/dts/udm/files.d.ts +73 -0
- package/dist/dts/udm/folders.d.ts +66 -0
- package/dist/dts/udm/index.d.ts +53 -0
- package/dist/dts/udm/invoices.d.ts +3 -0
- package/dist/dts/udm/job-applications.d.ts +3 -0
- package/dist/dts/udm/job-candidates.d.ts +3 -0
- package/dist/dts/udm/job-interviews.d.ts +3 -0
- package/dist/dts/udm/job-offers.d.ts +3 -0
- package/dist/dts/udm/jobs.d.ts +3 -0
- package/dist/dts/udm/journal-entries.d.ts +3 -0
- package/dist/dts/udm/leads.d.ts +3 -0
- package/dist/dts/udm/ledger-accounts.d.ts +3 -0
- package/dist/dts/udm/meetings.d.ts +98 -0
- package/dist/dts/udm/messages.d.ts +51 -0
- package/dist/dts/udm/notes.d.ts +61 -0
- package/dist/dts/udm/orders.d.ts +3 -0
- package/dist/dts/udm/payments.d.ts +3 -0
- package/dist/dts/udm/payrolls.d.ts +3 -0
- package/dist/dts/udm/products.d.ts +3 -0
- package/dist/dts/udm/projects.d.ts +3 -0
- package/dist/dts/udm/suppliers.d.ts +3 -0
- package/dist/dts/udm/tasks.d.ts +104 -0
- package/dist/dts/udm/tax-rates.d.ts +3 -0
- package/dist/dts/udm/timeoff-balances.d.ts +3 -0
- package/dist/dts/udm/timeoff-requests.d.ts +3 -0
- package/dist/dts/udm/users.d.ts +3 -0
- package/dist/dts/usage/index.d.ts +1 -0
- package/dist/dts/usage/types.d.ts +33 -0
- package/dist/dts/users/accessors.d.ts +10 -0
- package/dist/dts/users/api.d.ts +23 -0
- package/dist/dts/users/index.d.ts +13 -0
- package/dist/dts/variables.d.ts +27 -0
- package/dist/dts/webhooks/index.d.ts +1 -0
- package/dist/dts/webhooks/types.d.ts +11 -0
- package/dist/dts/workspace-elements/index.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +77 -0
- package/dist/dts/workspace-elements-catalog/index.d.ts +27 -0
- package/dist/dts/workspace-updates/index.d.ts +1 -0
- package/dist/dts/workspace-updates/types.d.ts +6 -0
- package/dist/dts/workspaces/api.d.ts +5 -0
- package/dist/dts/workspaces/constants.d.ts +4 -0
- package/dist/dts/workspaces/index.d.ts +3 -0
- package/dist/dts/workspaces/types.d.ts +175 -0
- package/dist/index.d.ts +5022 -0
- package/dist/index.js +11815 -0
- package/dist/index.js.map +1 -0
- package/dist/index.module.d.mts +5022 -0
- package/dist/index.module.mjs +11551 -0
- package/dist/index.module.mjs.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor } from '../accessors';
|
|
2
|
+
import { IntegrationAppApiClient } from '../api-client';
|
|
3
|
+
import { DataCollectionCreateRequest, DataCollectionCreateResponse, DataCollectionDeleteResponse, DataCollectionFindByIdRequest, DataCollectionFindByIdResponse, DataCollectionFindRequest, DataCollectionFindResponse, DataCollectionListRequest, DataCollectionListResponse, DataCollectionMatchRequest, DataCollectionMatchResponse, DataCollectionSearchRequest, DataCollectionSearchResponse, DataCollectionSpec, DataCollectionUpdateRequest, DataCollectionUpdateResponse } from '../connectors/data-locations';
|
|
4
|
+
import { OpenConfigurationOptions } from '../iframe';
|
|
5
|
+
import { CreateDataSourceInstanceRequest, CreateDataSourceRequest, DataSourceInstanceSelector, FindDataSourceInstancesQuery, FindDataSourcesQuery, ListDataSourceInstancesForConnectionQuery, ListDataSourcesForIntegrationQuery, UpdateDataSourceInstanceRequest, UpdateDataSourceRequest } from './api';
|
|
6
|
+
import { InstanceKeyQuery } from '../integration-elements/common';
|
|
7
|
+
import { ConnectionLevelElementAccessor, ConnectionLevelElementsListAccessor } from '../integration-elements/connection-level-element.accessor';
|
|
8
|
+
import { IntegrationLevelElementAccessor, IntegrationLevelElementsListAccessor } from '../integration-elements/integration-level-element.accessor';
|
|
9
|
+
import { DataSource, DataSourceInstance, DataSourceSelector } from '.';
|
|
10
|
+
export interface OpenDataSourceConfigurationOptions extends OpenConfigurationOptions {
|
|
11
|
+
}
|
|
12
|
+
export declare class DataSourcesAccessor extends ElementListAccessor<DataSource, FindDataSourcesQuery, CreateDataSourceRequest> {
|
|
13
|
+
constructor(client: IntegrationAppApiClient);
|
|
14
|
+
}
|
|
15
|
+
export declare class DataSourceAccessor extends ElementAccessor<DataSource, UpdateDataSourceRequest, DataSourceSelector> {
|
|
16
|
+
constructor(client: IntegrationAppApiClient, selector: DataSourceSelector | string);
|
|
17
|
+
apply(integrationKeys: string[]): Promise<DataSource[]>;
|
|
18
|
+
setup(): Promise<void>;
|
|
19
|
+
reset(): Promise<any>;
|
|
20
|
+
}
|
|
21
|
+
export declare class DataSourceInstancesAccessor extends ElementInstanceListAccessor<DataSourceInstance, FindDataSourceInstancesQuery> {
|
|
22
|
+
constructor(client: IntegrationAppApiClient);
|
|
23
|
+
}
|
|
24
|
+
export declare class DataSourceInstanceAccessor extends ElementInstanceAccessor<DataSourceInstance, DataSourceInstanceSelector, CreateDataSourceInstanceRequest, UpdateDataSourceInstanceRequest> {
|
|
25
|
+
client: IntegrationAppApiClient;
|
|
26
|
+
constructor(client: IntegrationAppApiClient, selector: string | DataSourceInstanceSelector);
|
|
27
|
+
setup(): Promise<void>;
|
|
28
|
+
reset(): Promise<void>;
|
|
29
|
+
openConfiguration({ onClose }?: OpenDataSourceConfigurationOptions): Promise<void>;
|
|
30
|
+
unifiedFieldsToNative(unifiedFields: any): Promise<any>;
|
|
31
|
+
getCollection(): Promise<DataCollectionSpec>;
|
|
32
|
+
listRecords(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
|
|
33
|
+
matchRecord(request: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
|
|
34
|
+
searchRecords(request: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
|
|
35
|
+
findRecordById(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
|
|
36
|
+
createRecord(request: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
|
|
37
|
+
updateRecord(request: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
|
|
38
|
+
deleteRecord(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionDeleteResponse>;
|
|
39
|
+
findRecords(request?: DataCollectionFindRequest): Promise<DataCollectionFindResponse>;
|
|
40
|
+
}
|
|
41
|
+
export declare class IntegrationLevelDataSourceAccessor extends IntegrationLevelElementAccessor<DataSource, UpdateDataSourceRequest> {
|
|
42
|
+
client: IntegrationAppApiClient;
|
|
43
|
+
integrationSelector: string;
|
|
44
|
+
dataSourceSelector: string;
|
|
45
|
+
constructor(client: IntegrationAppApiClient, integrationSelector: string, dataSourceSelector: string);
|
|
46
|
+
}
|
|
47
|
+
export declare class IntegrationLevelDataSourcesListAccessor extends IntegrationLevelElementsListAccessor<DataSource, ListDataSourcesForIntegrationQuery, Omit<CreateDataSourceRequest, 'integrationId'>> {
|
|
48
|
+
client: IntegrationAppApiClient;
|
|
49
|
+
integrationSelector: string;
|
|
50
|
+
constructor(client: IntegrationAppApiClient, integrationSelector: string);
|
|
51
|
+
}
|
|
52
|
+
export declare class ConnectionLevelDataSourceAccessor extends ConnectionLevelElementAccessor<DataSourceInstance, UpdateDataSourceInstanceRequest> {
|
|
53
|
+
client: IntegrationAppApiClient;
|
|
54
|
+
connectionSelector: string;
|
|
55
|
+
dataSourceSelector: string;
|
|
56
|
+
query: InstanceKeyQuery;
|
|
57
|
+
constructor(client: IntegrationAppApiClient, connectionSelector: string, dataSourceSelector: string, query: InstanceKeyQuery);
|
|
58
|
+
openConfiguration(options?: OpenDataSourceConfigurationOptions): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
export declare class ConnectionLevelDataSourcesAccessor extends ConnectionLevelElementsListAccessor<DataSource, ListDataSourceInstancesForConnectionQuery> {
|
|
61
|
+
client: IntegrationAppApiClient;
|
|
62
|
+
connectionSelector: string;
|
|
63
|
+
constructor(client: IntegrationAppApiClient, connectionSelector: string);
|
|
64
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ElementInstanceSelector } from '../accessors';
|
|
2
|
+
import { ConnectionSelector } from '../connections';
|
|
3
|
+
import { PaginationQuery, PaginationResponse } from '../entity-repository';
|
|
4
|
+
import { FlowInstanceSelector } from '../flows';
|
|
5
|
+
import { DataSourceInstance } from '.';
|
|
6
|
+
export interface ListDataSourcesForIntegrationQuery extends PaginationQuery {
|
|
7
|
+
universalDataSourceId?: string | 'null';
|
|
8
|
+
}
|
|
9
|
+
export interface FindDataSourcesQuery extends ListDataSourcesForIntegrationQuery {
|
|
10
|
+
integrationId?: string | 'null';
|
|
11
|
+
}
|
|
12
|
+
export type CreateDataSourceRequest = {
|
|
13
|
+
key: string;
|
|
14
|
+
name: string;
|
|
15
|
+
integrationId?: string;
|
|
16
|
+
udm?: string;
|
|
17
|
+
pullUpdatesIntervalSeconds?: number;
|
|
18
|
+
fullSyncIntervalSeconds?: number;
|
|
19
|
+
rootPath?: string;
|
|
20
|
+
defaultPath?: string;
|
|
21
|
+
collectionKey?: string;
|
|
22
|
+
collectionParameters?: any;
|
|
23
|
+
};
|
|
24
|
+
export type UpdateDataSourceRequest = {
|
|
25
|
+
key?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
archivedAt?: string;
|
|
28
|
+
udm?: string;
|
|
29
|
+
pullUpdatesIntervalSeconds?: number;
|
|
30
|
+
fullSyncIntervalSeconds?: number;
|
|
31
|
+
rootPath?: string;
|
|
32
|
+
defaultPath?: string;
|
|
33
|
+
};
|
|
34
|
+
export interface DataSourceInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
|
|
35
|
+
dataSourceKey?: string;
|
|
36
|
+
dataSourceId?: string;
|
|
37
|
+
instanceKey?: string;
|
|
38
|
+
nodeKey?: string;
|
|
39
|
+
udm?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface FindDataSourceInstancesQuery extends PaginationQuery {
|
|
42
|
+
userId?: string;
|
|
43
|
+
dataSourceId?: string;
|
|
44
|
+
universalDataSourceId?: string;
|
|
45
|
+
connectionId?: string;
|
|
46
|
+
integrationKey?: string;
|
|
47
|
+
integrationId?: string;
|
|
48
|
+
}
|
|
49
|
+
export type FindDataSourceInstancesResponse = PaginationResponse<DataSourceInstance>;
|
|
50
|
+
export interface CreateDataSourceInstanceRequest {
|
|
51
|
+
dataSourceId: string;
|
|
52
|
+
connectionId: string;
|
|
53
|
+
path?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface UpdateDataSourceInstanceRequest {
|
|
56
|
+
path?: string;
|
|
57
|
+
collectionKey?: string;
|
|
58
|
+
collectionParameters?: any;
|
|
59
|
+
pullUpdatesIntervalSeconds?: number;
|
|
60
|
+
fullSyncIntervalSeconds?: number;
|
|
61
|
+
subscribedTo?: {
|
|
62
|
+
created?: boolean;
|
|
63
|
+
updated?: boolean;
|
|
64
|
+
deleted?: boolean;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface FindDataSourceEventsQuery extends PaginationQuery {
|
|
68
|
+
userId?: string;
|
|
69
|
+
udm?: string;
|
|
70
|
+
dataSourceInstanceId?: string;
|
|
71
|
+
startDatetime?: string;
|
|
72
|
+
endDatetime?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface FindDataSourceSyncsQuery extends PaginationQuery {
|
|
75
|
+
userId?: string;
|
|
76
|
+
dataSourceId?: string;
|
|
77
|
+
dataSourceInstanceId?: string;
|
|
78
|
+
integrationId?: string;
|
|
79
|
+
connectionId?: string;
|
|
80
|
+
startedAfter?: string;
|
|
81
|
+
}
|
|
82
|
+
export type ListDataSourceInstancesForConnectionQuery = PaginationQuery & {
|
|
83
|
+
dataSourceId?: string;
|
|
84
|
+
};
|
|
85
|
+
export interface FindDataSourceInstanceSyncsQuery extends ListDataSourceInstancesForConnectionQuery {
|
|
86
|
+
userId?: string;
|
|
87
|
+
connectionId?: string;
|
|
88
|
+
integrationId?: string;
|
|
89
|
+
dataSourceInstanceId?: string;
|
|
90
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IntegrationSpecificElementSelector } from '../accessors';
|
|
2
|
+
import { Connection } from '../connections';
|
|
3
|
+
import { DataCollectionSpec } from '../connectors';
|
|
4
|
+
import { ErrorData } from '../errors';
|
|
5
|
+
import { AppliedToIntegrations, Integration } from '../integrations';
|
|
6
|
+
import { User } from '../users';
|
|
7
|
+
import { WorkspaceElement } from '../workspace-elements';
|
|
8
|
+
export interface DataSourceUnitConfig {
|
|
9
|
+
key?: string;
|
|
10
|
+
collectionKey?: any;
|
|
11
|
+
collectionParameters?: any;
|
|
12
|
+
udm?: any;
|
|
13
|
+
path?: string;
|
|
14
|
+
pullUpdatesIntervalSeconds?: number;
|
|
15
|
+
fullSyncIntervalSeconds?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface DataSource extends WorkspaceElement {
|
|
18
|
+
revision: string;
|
|
19
|
+
publishedRevision?: string;
|
|
20
|
+
integrationId?: string;
|
|
21
|
+
integration?: Integration;
|
|
22
|
+
universalDataSourceId?: string;
|
|
23
|
+
universalDataSourceRevision?: string;
|
|
24
|
+
udm?: string;
|
|
25
|
+
pullUpdatesIntervalSeconds?: number;
|
|
26
|
+
fullSyncIntervalSeconds?: number;
|
|
27
|
+
collectionKey?: string;
|
|
28
|
+
collectionParameters?: any;
|
|
29
|
+
archivedAt?: string;
|
|
30
|
+
createdAt?: string;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
customized?: boolean;
|
|
33
|
+
appliedToIntegrations?: AppliedToIntegrations<DataSource>;
|
|
34
|
+
defaultPath?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface DataSourceInstance extends WorkspaceElement {
|
|
37
|
+
userId: string;
|
|
38
|
+
revision: string;
|
|
39
|
+
user?: User;
|
|
40
|
+
dataSourceRevision?: string;
|
|
41
|
+
dataSourceId?: string;
|
|
42
|
+
universalDataSourceId?: string;
|
|
43
|
+
dataSource?: DataSource;
|
|
44
|
+
udm?: string;
|
|
45
|
+
connectionId: string;
|
|
46
|
+
connection?: Connection;
|
|
47
|
+
integrationId: string;
|
|
48
|
+
integration?: Integration;
|
|
49
|
+
instanceKey?: string;
|
|
50
|
+
collectionKey?: string;
|
|
51
|
+
collectionParameters?: any;
|
|
52
|
+
defaultCollectionKey?: string;
|
|
53
|
+
defaultCollectionParameters?: any;
|
|
54
|
+
collectionSpec?: DataCollectionSpec;
|
|
55
|
+
isCustomized?: boolean;
|
|
56
|
+
errors?: ErrorData[];
|
|
57
|
+
pullUpdatesIntervalSeconds?: number;
|
|
58
|
+
fullSyncIntervalSeconds?: number;
|
|
59
|
+
path?: string;
|
|
60
|
+
defaultPath?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface DataSourceSelector extends IntegrationSpecificElementSelector {
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './parse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseDate(value: any): Date | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseDatetime(str: string): Date;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CommonListElementsQuery = SearchQuery & PaginationQuery & IncludeArchivedQuery;
|
|
2
|
+
export type CommonInstancesListQuery = CommonListElementsQuery & {
|
|
3
|
+
userId?: string;
|
|
4
|
+
instanceKey?: string;
|
|
5
|
+
};
|
|
6
|
+
export type CommonIntegrationOrConnectionQuery = {
|
|
7
|
+
connectionId?: string;
|
|
8
|
+
integrationId?: string;
|
|
9
|
+
integrationKey?: string;
|
|
10
|
+
};
|
|
11
|
+
export type IncludeArchivedQuery = {
|
|
12
|
+
includeArchived?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type SearchQuery = {
|
|
15
|
+
search?: string;
|
|
16
|
+
};
|
|
17
|
+
export type PaginationQuery = {
|
|
18
|
+
limit?: number;
|
|
19
|
+
cursor?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare class PaginationResponse<T> {
|
|
22
|
+
items: T[];
|
|
23
|
+
cursor?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare enum ErrorDoc {
|
|
2
|
+
AuthenticationTokenErrors = "authentication-token-errors",
|
|
3
|
+
DataSourceNoCollectionSelected = "data-source-no-collection-selected",
|
|
4
|
+
FlowInstanceSetupFailed = "flow-instance-setup-failed",
|
|
5
|
+
FlowInstanceSetupTimeout = "flow-instance-setup-timeout",
|
|
6
|
+
WebhookCannotFindUser = "webhook-cannot-find-user"
|
|
7
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { WorkspaceElementReference } from '../workspace-elements';
|
|
2
|
+
import { ErrorDoc } from './error-doc-enum';
|
|
3
|
+
export * from './error-doc-enum';
|
|
4
|
+
export declare enum ErrorType {
|
|
5
|
+
BAD_REQUEST = "bad_request",
|
|
6
|
+
CONNECTION = "connection",
|
|
7
|
+
CONFIGURATION = "configuration",
|
|
8
|
+
DEPENDENCY_ERROR = "dependency_error",
|
|
9
|
+
FLOW_RUN = "flow_run",
|
|
10
|
+
FLOW_INSTANCE_SETUP = "flow_instance_setup",
|
|
11
|
+
CONCURRENCY = "concurrency",
|
|
12
|
+
INTERNAL = "internal",
|
|
13
|
+
ACTION_RUN = "action_run",
|
|
14
|
+
ACTION_INSTANCE_SETUP = "action_instance_setup",
|
|
15
|
+
UNIT_RUN = "unit_run",
|
|
16
|
+
CUSTOM_CODE = "custom_code"
|
|
17
|
+
}
|
|
18
|
+
export declare enum BadRequestErrorKey {
|
|
19
|
+
NOT_FOUND = "not_found",
|
|
20
|
+
NOT_AUTHENTICATED = "not_authenticated",
|
|
21
|
+
ACCESS_DENIED = "access_denied",
|
|
22
|
+
ALREADY_EXISTS = "already_exists",
|
|
23
|
+
RATE_LIMIT_EXCEEDED = "rate_limit_exceeded"
|
|
24
|
+
}
|
|
25
|
+
export declare enum ConnectionErrorKey {
|
|
26
|
+
CONNECTION_IS_DEFUNCT = "connection_is_defunct",
|
|
27
|
+
ACCESS_TOKEN_EXPIRED = "access_token_expired",
|
|
28
|
+
RATE_LIMIT_EXCEEDED = "rate_limit_exceeded"
|
|
29
|
+
}
|
|
30
|
+
export declare enum ConcurrencyErrorKey {
|
|
31
|
+
LOCK_TIMEOUT = "lock_timeout"
|
|
32
|
+
}
|
|
33
|
+
interface ErrorDataFields {
|
|
34
|
+
type?: ErrorType;
|
|
35
|
+
key?: string;
|
|
36
|
+
message: string;
|
|
37
|
+
data?: any;
|
|
38
|
+
doc?: ErrorDoc;
|
|
39
|
+
stack?: any;
|
|
40
|
+
causedByError?: ErrorData;
|
|
41
|
+
logs?: any[];
|
|
42
|
+
}
|
|
43
|
+
type ErrorConstructorArg = string | ErrorDataFields | Error;
|
|
44
|
+
export declare function isIntegrationAppError(error: any): any;
|
|
45
|
+
export declare class ErrorData implements ErrorDataFields {
|
|
46
|
+
constructor(arg: ErrorConstructorArg);
|
|
47
|
+
}
|
|
48
|
+
export interface ErrorData extends ErrorDataFields {
|
|
49
|
+
}
|
|
50
|
+
export declare class IntegrationAppError extends Error {
|
|
51
|
+
isIntegrationAppError: true;
|
|
52
|
+
data: ErrorData;
|
|
53
|
+
constructor(arg: ErrorConstructorArg);
|
|
54
|
+
}
|
|
55
|
+
export declare class InternalError extends IntegrationAppError {
|
|
56
|
+
constructor(arg: ErrorConstructorArg);
|
|
57
|
+
}
|
|
58
|
+
export declare class BadRequestError extends IntegrationAppError {
|
|
59
|
+
constructor(arg: ErrorConstructorArg);
|
|
60
|
+
}
|
|
61
|
+
export declare class ConcurrencyError extends IntegrationAppError {
|
|
62
|
+
constructor(arg: ErrorConstructorArg);
|
|
63
|
+
}
|
|
64
|
+
export declare class ConfigurationError extends IntegrationAppError {
|
|
65
|
+
constructor(arg: ErrorConstructorArg);
|
|
66
|
+
}
|
|
67
|
+
export declare class DependencyError extends IntegrationAppError {
|
|
68
|
+
constructor(arg: ErrorConstructorArg, workspaceElementReference?: WorkspaceElementReference);
|
|
69
|
+
}
|
|
70
|
+
export declare class FlowInstanceSetupError extends IntegrationAppError {
|
|
71
|
+
constructor(arg: ErrorConstructorArg);
|
|
72
|
+
}
|
|
73
|
+
export declare class FlowRunError extends IntegrationAppError {
|
|
74
|
+
constructor(arg: ErrorConstructorArg);
|
|
75
|
+
}
|
|
76
|
+
export declare class ActionRunError extends IntegrationAppError {
|
|
77
|
+
constructor(arg: ErrorConstructorArg);
|
|
78
|
+
}
|
|
79
|
+
export declare class ActionInstanceSetupError extends IntegrationAppError {
|
|
80
|
+
constructor(arg: ErrorConstructorArg);
|
|
81
|
+
}
|
|
82
|
+
export declare class UnitRunError extends IntegrationAppError {
|
|
83
|
+
constructor(arg: ErrorConstructorArg);
|
|
84
|
+
}
|
|
85
|
+
export declare class ConnectionError extends IntegrationAppError {
|
|
86
|
+
constructor(arg: ErrorConstructorArg);
|
|
87
|
+
}
|
|
88
|
+
export declare class NotFoundError extends BadRequestError {
|
|
89
|
+
constructor(arg: ErrorConstructorArg);
|
|
90
|
+
}
|
|
91
|
+
export declare class RateLimitExceededError extends BadRequestError {
|
|
92
|
+
constructor(arg: ErrorConstructorArg);
|
|
93
|
+
}
|
|
94
|
+
export declare class NotAuthenticatedError extends BadRequestError {
|
|
95
|
+
constructor(arg: ErrorConstructorArg);
|
|
96
|
+
}
|
|
97
|
+
export declare class AccessDeniedError extends BadRequestError {
|
|
98
|
+
constructor(arg: ErrorConstructorArg);
|
|
99
|
+
}
|
|
100
|
+
export declare class CustomCodeError extends IntegrationAppError {
|
|
101
|
+
constructor(arg: ErrorConstructorArg);
|
|
102
|
+
}
|
|
103
|
+
export declare function getErrorFromData(data: any): any;
|
|
104
|
+
export declare function extractIntegrationAppErrorData(error: any): ErrorData;
|
|
105
|
+
export declare function buildUserFriendlyErrorMessage({ message, doc }: ErrorData): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementInstanceListAccessor } from '../accessors';
|
|
2
|
+
import { IntegrationAppApiClient } from '../api-client';
|
|
3
|
+
import { FindExternalEventSubscriptionsQuery } from './api';
|
|
4
|
+
import { ExternalEventSubscription } from './types';
|
|
5
|
+
export declare class ExternalEventSubscriptionsAccessor extends ElementInstanceListAccessor<ExternalEventSubscription, FindExternalEventSubscriptionsQuery> {
|
|
6
|
+
constructor(client: IntegrationAppApiClient);
|
|
7
|
+
}
|
|
8
|
+
export declare class ExternalEventSubscriptionAccessor {
|
|
9
|
+
private client;
|
|
10
|
+
private id;
|
|
11
|
+
constructor(client: IntegrationAppApiClient, id: string);
|
|
12
|
+
get(): Promise<ExternalEventSubscription>;
|
|
13
|
+
setup(): Promise<void>;
|
|
14
|
+
subscribe(): Promise<void>;
|
|
15
|
+
unsubscribe(): Promise<void>;
|
|
16
|
+
resubscribe(): Promise<void>;
|
|
17
|
+
pullEvents(): Promise<void>;
|
|
18
|
+
private getPath;
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PaginationQuery } from '../entity-repository';
|
|
2
|
+
import { ExternalEventLogStatus } from './types';
|
|
3
|
+
export interface FindExternalEventSubscriptionsQuery extends PaginationQuery {
|
|
4
|
+
userId?: string;
|
|
5
|
+
connectionId?: string;
|
|
6
|
+
integrationId?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FindExternalEventLogsQuery extends PaginationQuery {
|
|
9
|
+
userId?: string;
|
|
10
|
+
externalEventSubscriptionId?: string;
|
|
11
|
+
connectionId?: string;
|
|
12
|
+
integrationId?: string;
|
|
13
|
+
startDatetime?: string;
|
|
14
|
+
status?: ExternalEventLogStatus;
|
|
15
|
+
}
|
|
16
|
+
export interface FindExternalEventPullsQuery extends PaginationQuery {
|
|
17
|
+
userId?: string;
|
|
18
|
+
externalEventSubscriptionId?: string;
|
|
19
|
+
integrationId?: string;
|
|
20
|
+
connectionId?: string;
|
|
21
|
+
startedAfter?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataCollectionEventType } from '../data-collections';
|
|
2
|
+
import { ExternalEventSubscriptionType, ExternalEventType } from './types';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './accessors';
|
|
5
|
+
export * from './api';
|
|
6
|
+
export declare function externalEventTypeToDataCollectionEventType(type: ExternalEventType): DataCollectionEventType;
|
|
7
|
+
export declare function dataCollectionEventTypeToExternalEventType(type: DataCollectionEventType): ExternalEventType;
|
|
8
|
+
export declare function externalEventTypeToSubscriptionType(type: ExternalEventType): ExternalEventSubscriptionType;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Connection } from '../connections';
|
|
2
|
+
import { DataSourceUnitConfig } from '../data-sources';
|
|
3
|
+
import { ErrorData } from '../errors';
|
|
4
|
+
import { AppliedToIntegrations, Integration } from '../integrations';
|
|
5
|
+
import { Customer } from '../users';
|
|
6
|
+
export declare enum ExternalEventType {
|
|
7
|
+
DataRecordCreated = "data-record-created",
|
|
8
|
+
DataRecordUpdated = "data-record-updated",
|
|
9
|
+
DataRecordDeleted = "data-record-deleted",
|
|
10
|
+
ConnectorEvent = "connector-event"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ExternalEventSubscriptionStatus {
|
|
13
|
+
Subscribed = "subscribed",
|
|
14
|
+
Unsubscribed = "unsubscribed",
|
|
15
|
+
Error = "error"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ExternalEventPullStatus {
|
|
18
|
+
RUNNING = "running",
|
|
19
|
+
SUCCESS = "success",
|
|
20
|
+
ERROR = "error",
|
|
21
|
+
QUEUED = "queued"
|
|
22
|
+
}
|
|
23
|
+
export declare enum IncomingWebhooksState {
|
|
24
|
+
SUCCESS = "success",
|
|
25
|
+
ERROR = "error"
|
|
26
|
+
}
|
|
27
|
+
export interface ExternalEventUnitConfig {
|
|
28
|
+
type: ExternalEventType;
|
|
29
|
+
dataSource?: DataSourceUnitConfig;
|
|
30
|
+
eventKey?: string;
|
|
31
|
+
eventParameters?: any;
|
|
32
|
+
}
|
|
33
|
+
export declare enum ExternalEventSubscriptionType {
|
|
34
|
+
DataRecordCreated = "data-record-created",
|
|
35
|
+
DataRecordUpdated = "data-record-updated",
|
|
36
|
+
DataRecordDeleted = "data-record-deleted",
|
|
37
|
+
ConnectorEvent = "connector-event"
|
|
38
|
+
}
|
|
39
|
+
export interface ExternalEventSubscriptionConfig {
|
|
40
|
+
type: ExternalEventSubscriptionType;
|
|
41
|
+
dataSource?: DataSourceUnitConfig;
|
|
42
|
+
eventKey?: string;
|
|
43
|
+
eventParameters?: any;
|
|
44
|
+
}
|
|
45
|
+
export interface ExternalEvent {
|
|
46
|
+
config?: ExternalEventUnitConfig;
|
|
47
|
+
appliedToIntegrations?: AppliedToIntegrations<ExternalEvent>;
|
|
48
|
+
}
|
|
49
|
+
export interface ExternalEventSubscription {
|
|
50
|
+
id: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
user?: Customer;
|
|
54
|
+
connectionId: string;
|
|
55
|
+
connection?: Connection;
|
|
56
|
+
integrationId: string;
|
|
57
|
+
integration?: Integration;
|
|
58
|
+
uuid: string;
|
|
59
|
+
config?: ExternalEventSubscriptionConfig;
|
|
60
|
+
status?: ExternalEventSubscriptionStatus;
|
|
61
|
+
error?: ErrorData;
|
|
62
|
+
isRealTime?: boolean;
|
|
63
|
+
requiresPull?: boolean;
|
|
64
|
+
requiresFullSync?: boolean;
|
|
65
|
+
createdAt?: string;
|
|
66
|
+
archivedAt?: string;
|
|
67
|
+
stateData?: any;
|
|
68
|
+
nextPullEventsTimestamp?: number;
|
|
69
|
+
pullUpdatesIntervalSeconds?: number;
|
|
70
|
+
fullSyncIntervalSeconds?: number;
|
|
71
|
+
nextRefreshTimestamp?: number;
|
|
72
|
+
globalWebhookKey?: string;
|
|
73
|
+
globalWebhookEventSelector?: string;
|
|
74
|
+
}
|
|
75
|
+
export declare enum ExternalEventLogStatus {
|
|
76
|
+
CREATED = "created",
|
|
77
|
+
ERROR = "error",
|
|
78
|
+
SUCCESS = "success"
|
|
79
|
+
}
|
|
80
|
+
export interface ExternalEventLogRecord {
|
|
81
|
+
id: string;
|
|
82
|
+
userId: string;
|
|
83
|
+
user?: Customer;
|
|
84
|
+
name?: string;
|
|
85
|
+
externalEventSubscriptionId: string;
|
|
86
|
+
externalEventSubscription?: ExternalEventSubscription;
|
|
87
|
+
integrationId: string;
|
|
88
|
+
integration?: Integration;
|
|
89
|
+
connectionId: string;
|
|
90
|
+
connection?: Connection;
|
|
91
|
+
payload?: any;
|
|
92
|
+
launchedFlowRunIds?: string[];
|
|
93
|
+
status: ExternalEventLogStatus;
|
|
94
|
+
error?: ErrorData;
|
|
95
|
+
}
|
|
96
|
+
export interface ExternalEventCustomPullSubscribeResponse {
|
|
97
|
+
state: Record<string, any>;
|
|
98
|
+
}
|
|
99
|
+
export interface ExternalEventCustomPullCollectEventsRequest {
|
|
100
|
+
state: Record<string, any>;
|
|
101
|
+
}
|
|
102
|
+
export interface ExternalEventCustomPullCollectEventsResponse<EventPayload = any> {
|
|
103
|
+
events: EventPayload[];
|
|
104
|
+
state: Record<string, any>;
|
|
105
|
+
}
|
|
106
|
+
export interface ExternalEventWebhookSubscribeRequest {
|
|
107
|
+
webhookUri: string;
|
|
108
|
+
}
|
|
109
|
+
export interface ExternalEventWebhookSubscribeResponse {
|
|
110
|
+
state?: Record<string, any>;
|
|
111
|
+
nextRefreshTimestamp?: number;
|
|
112
|
+
}
|
|
113
|
+
export interface ExternalEventWebhookUnsubscribeRequest {
|
|
114
|
+
state: Record<string, any>;
|
|
115
|
+
}
|
|
116
|
+
export interface ExternalEventWebhookHandleRequest {
|
|
117
|
+
state: Record<string, any>;
|
|
118
|
+
query: Record<string, string>;
|
|
119
|
+
data: any;
|
|
120
|
+
rawBody?: string;
|
|
121
|
+
headers: any;
|
|
122
|
+
}
|
|
123
|
+
export interface ExternalEventWebhookHandleResponse<EventPayload = any> {
|
|
124
|
+
events?: EventPayload[];
|
|
125
|
+
response?: {
|
|
126
|
+
headers?: Record<string, string>;
|
|
127
|
+
data?: any;
|
|
128
|
+
status?: number;
|
|
129
|
+
};
|
|
130
|
+
state?: Record<string, any>;
|
|
131
|
+
}
|
|
132
|
+
export interface ExternalEventWebhookRefreshRequest {
|
|
133
|
+
state: Record<string, any>;
|
|
134
|
+
webhookUri: string;
|
|
135
|
+
}
|
|
136
|
+
export interface ExternalEventWebhookRefreshResponse {
|
|
137
|
+
state?: Record<string, any>;
|
|
138
|
+
nextRefreshTimestamp?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface ExternalEventPull {
|
|
141
|
+
id: string;
|
|
142
|
+
name?: string;
|
|
143
|
+
userId: string;
|
|
144
|
+
user?: Customer;
|
|
145
|
+
externalEventSubscriptionId: string;
|
|
146
|
+
externalEventSubscription?: ExternalEventSubscription;
|
|
147
|
+
integrationId: string;
|
|
148
|
+
integration?: Integration;
|
|
149
|
+
connectionId: string;
|
|
150
|
+
connection?: Connection;
|
|
151
|
+
startDatetime: string;
|
|
152
|
+
endDatetime: string;
|
|
153
|
+
isFullScan?: boolean;
|
|
154
|
+
status: ExternalEventPullStatus;
|
|
155
|
+
collectedEventIds: string[];
|
|
156
|
+
error?: ErrorData;
|
|
157
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor } from '../accessors';
|
|
2
|
+
import { IntegrationAppApiClient } from '../api-client';
|
|
3
|
+
import { OpenConfigurationOptions } from '../iframe';
|
|
4
|
+
import { CreateFieldMappingInstanceRequest, CreateFieldMappingRequest, FieldMappingInstanceSelector, FindFieldMappingInstancesQuery, FindFieldMappingsQuery, ListFieldMappingInstancesForConnectionQuery, ListFieldMappingsForIntegrationQuery, UpdateFieldMappingInstanceRequest, UpdateFieldMappingRequest } from './api';
|
|
5
|
+
import { InstanceKeyQuery } from '../integration-elements/common';
|
|
6
|
+
import { ConnectionLevelElementAccessor, ConnectionLevelElementsListAccessor } from '../integration-elements/connection-level-element.accessor';
|
|
7
|
+
import { IntegrationLevelElementAccessor, IntegrationLevelElementsListAccessor } from '../integration-elements/integration-level-element.accessor';
|
|
8
|
+
import { FieldMapping, FieldMappingInstance, FieldMappingSelector } from '.';
|
|
9
|
+
export interface OpenFieldMappingInstanceConfigurationOptions extends OpenConfigurationOptions {
|
|
10
|
+
}
|
|
11
|
+
export declare class FieldMappingsAccessor extends ElementListAccessor<FieldMapping, FindFieldMappingsQuery, CreateFieldMappingRequest> {
|
|
12
|
+
constructor(client: IntegrationAppApiClient);
|
|
13
|
+
}
|
|
14
|
+
export declare class FieldMappingAccessor extends ElementAccessor<FieldMapping, UpdateFieldMappingRequest, FieldMappingSelector> {
|
|
15
|
+
constructor(client: IntegrationAppApiClient, selector: string | FieldMappingSelector);
|
|
16
|
+
getAppSchema(): Promise<any>;
|
|
17
|
+
apply(integrationKeys: string[]): Promise<FieldMapping[]>;
|
|
18
|
+
setup(): Promise<any>;
|
|
19
|
+
reset(): Promise<any>;
|
|
20
|
+
}
|
|
21
|
+
export declare class FieldMappingInstancesAccessor extends ElementInstanceListAccessor<FieldMappingInstance, FindFieldMappingInstancesQuery> {
|
|
22
|
+
constructor(client: IntegrationAppApiClient);
|
|
23
|
+
}
|
|
24
|
+
export declare class FieldMappingInstanceAccessor extends ElementInstanceAccessor<FieldMappingInstance, FieldMappingInstanceSelector, CreateFieldMappingInstanceRequest, UpdateFieldMappingInstanceRequest> {
|
|
25
|
+
private client;
|
|
26
|
+
constructor(client: IntegrationAppApiClient, selector: string | FieldMappingInstanceSelector);
|
|
27
|
+
setup(): Promise<void>;
|
|
28
|
+
reset(): Promise<void>;
|
|
29
|
+
openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export declare class IntegrationLevelFieldMappingAccessor extends IntegrationLevelElementAccessor<FieldMapping, UpdateFieldMappingRequest> {
|
|
32
|
+
client: IntegrationAppApiClient;
|
|
33
|
+
integrationSelector: string;
|
|
34
|
+
fieldMappingSelector: string;
|
|
35
|
+
constructor(client: IntegrationAppApiClient, integrationSelector: string, fieldMappingSelector: string);
|
|
36
|
+
}
|
|
37
|
+
export declare class IntegrationLevelFieldMappingsListAccessor extends IntegrationLevelElementsListAccessor<FieldMapping, ListFieldMappingsForIntegrationQuery, Omit<CreateFieldMappingRequest, 'integrationId'>> {
|
|
38
|
+
client: IntegrationAppApiClient;
|
|
39
|
+
integrationSelector: string;
|
|
40
|
+
constructor(client: IntegrationAppApiClient, integrationSelector: string);
|
|
41
|
+
}
|
|
42
|
+
export declare class ConnectionLevelFieldMappingAccessor extends ConnectionLevelElementAccessor<FieldMappingInstance, UpdateFieldMappingInstanceRequest> {
|
|
43
|
+
client: IntegrationAppApiClient;
|
|
44
|
+
connectionSelector: string;
|
|
45
|
+
fieldMappingSelector: string;
|
|
46
|
+
query: InstanceKeyQuery;
|
|
47
|
+
constructor(client: IntegrationAppApiClient, connectionSelector: string, fieldMappingSelector: string, query: InstanceKeyQuery);
|
|
48
|
+
openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export declare class ConnectionLevelFieldMappingsAccessor extends ConnectionLevelElementsListAccessor<FieldMapping, ListFieldMappingInstancesForConnectionQuery> {
|
|
51
|
+
client: IntegrationAppApiClient;
|
|
52
|
+
connectionSelector: string;
|
|
53
|
+
constructor(client: IntegrationAppApiClient, connectionSelector: string);
|
|
54
|
+
}
|