@wix/auto_sdk_connectors_connectors 1.0.0 → 1.0.2
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/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +44 -7
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +44 -7
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +44 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +44 -7
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.typings.d.ts +50 -11
- package/build/internal/cjs/meta.d.ts +50 -11
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.typings.d.mts +50 -11
- package/build/internal/es/meta.d.mts +50 -11
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { StartConnectOptions, StartConnectResponse, ConnectorsQueryBuilder, ConnectorQuery, typedQueryConnectors } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, ActionEvent, CommonQueryWithEntityContext, Completed, Connector, ConnectorQuerySpec, ConnectorRegistrationOneOf, ConnectorsQueryResult, CreateConnectorRequest, CreateConnectorResponse, CredentialState, CredentialStateWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteConnectorRequest, DeleteConnectorResponse, DispatchRequest, DispatcherDispatchOptions, DomainEvent, DomainEventBodyOneOf, DynamicRegistration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Exposure, ExposureWithLiterals, GetConnectorRequest, GetConnectorResponse, GrantedScopes, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ListMcpToolsRequest, ListMcpToolsResponse, McpTool, MessageEnvelope, PathParametersEntry, PredefinedRegistration, QueryConnectorsRequest, QueryConnectorsResponse, QueryParametersEntry, RawHttpRequest, RawHttpResponse, Redirect, RegistrationType, RegistrationTypeWithLiterals, RestoreInfo, ScopeReportingState, ScopeReportingStateWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, StartConnectOptionsOwnerOneOf, StartConnectRequest, StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, StartConnectRequestRegistrationTypeWithLiterals, StartConnectResponseNextActionOneOf, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, CommonQueryWithEntityContext, Completed, Connector, ConnectorQuerySpec, ConnectorRegistrationOneOf, ConnectorsQueryResult, CreateConnectorRequest, CreateConnectorResponse, CredentialState, CredentialStateWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteConnectorRequest, DeleteConnectorResponse, DispatchByAccessKeyRequest, DispatchRequest, DispatcherDispatchOptions, DomainEvent, DomainEventBodyOneOf, DynamicRegistration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Exposure, ExposureWithLiterals, GetConnectorRequest, GetConnectorResponse, GrantedScopes, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ListMcpToolsRequest, ListMcpToolsResponse, McpTool, MessageEnvelope, PathParametersEntry, PredefinedRegistration, QueryConnectorsRequest, QueryConnectorsResponse, QueryParametersEntry, RawHttpRequest, RawHttpResponse, Redirect, RegistrationType, RegistrationTypeWithLiterals, RestoreInfo, ScopeReportingState, ScopeReportingStateWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, StartConnectOptionsOwnerOneOf, StartConnectRequest, StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, StartConnectRequestRegistrationTypeWithLiterals, StartConnectResponseNextActionOneOf, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function startConnect$1(httpClient: HttpClient): StartConnectSignature;
|
|
6
6
|
interface StartConnectSignature {
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/connectors-v1-connector-connectors.universal.ts","../../src/connectors-v1-connector-connectors.http.ts","../../src/connectors-v1-connector-connectors.public.ts","../../src/connectors-v1-connector-connectors.context.ts"],"sourcesContent":["export * from './src/connectors-v1-connector-connectors.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixConnectorsV1Connector from './connectors-v1-connector-connectors.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * Not a taggable product resource: it carries no OAuth credential of its own (that lives on the\n * shared wix.connectors_access_keys.v1.ConnectorAccessKey), only binding data.\n */\nexport interface Connector extends ConnectorRegistrationOneOf {\n /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */\n predefinedRegistration?: PredefinedRegistration;\n /** Dynamic owner: the provider registration this connection was created against. */\n dynamicRegistration?: DynamicRegistration;\n /**\n * SDL derives this entity's owner from identity.targetAccountId; do not add account_id.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Optimistic-lock revision assigned by SDL.\n * @readonly\n */\n revision?: string | null;\n /**\n * Time at which SDL created the Connector.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Time at which SDL last updated the Connector.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Stable identifier of the connector implementation, for example \"github\".\n * @maxLength 80\n * @immutable\n */\n connectorSlug?: string;\n /**\n * The provider-side subject this connection is about, and the value inbound webhook deliveries are\n * attributed by: it must be byte-identical to what a delivery carries at the pointer the connector's\n * WebhookConfig.provider_tenant_id_json_pointer names. Which value that is follows from where\n * OAuthConfig.identity_operation.response_id_json_pointer points, so aim that pointer at whatever the\n * provider's webhooks are about -- usually a workspace, team or installation rather than the individual\n * user who consented. This PII also participates in the account-local uniqueness constraint.\n *\n * For a connector whose WebhookConfig declares verification_source = CONNECTOR_WIDE, a non-empty\n * provider_tenant_id_json_pointer, and unique_callback_path = false, that byte-identity is a hard\n * contract, not advice: connectors-webhooks uses this value as the provider tenant identity when it\n * builds the shared-delivery fan-out route for this connector, so a mismatch means the account's\n * deliveries verify but resolve no route and are refused. Config validation enforces the\n * precondition of that contract: such a connector is rejected unless it also names\n * OAuthConfig.identity_operation.response_id_json_pointer, because a connector that names no\n * identity pointer produces no external id for a delivery to be matched against. The equivalence\n * itself stays unvalidated and remains the responsibility of whoever configures the two pointers:\n * they address different documents -- the provider's identity response and an inbound delivery\n * body -- so only a live delivery can show that they select the same value.\n * @internal\n * @maxLength 200\n */\n connectorExternalId?: string;\n /**\n * Wix user who consented to this private Connector. Required when exposure is USER.\n * @internal\n * @format GUID\n * @immutable\n */\n consentingUserId?: string;\n /** Whether the Connector is account-owned or restricted to the consenting user. */\n exposure?: ExposureWithLiterals;\n /**\n * Best-effort projection of the shared access key's granted scopes, maintained by consuming\n * AccessKeyBindingPushed -- see credential_state's comment for the full advisory rule, which applies\n * identically here. Carried as the GrantedScopes message rather than a bare repeated string so a\n * provider that never reports scopes (reporting_state NOT_REPORTED) stays distinguishable from one\n * that explicitly reported an empty set (REPORTED with no scopes); flattening the two would turn an\n * unknown into a false negative for anyone reading this field. Server-owned: no create or update path\n * accepts a caller-supplied value for it. The producer only emits AccessKeyBindingPushed on a\n * credential_state transition, so a scopes-only change at the shared access key (no state transition)\n * does not reach this field -- it reflects scopes as of the last state transition, not necessarily the\n * shared key's current scopes.\n * @internal\n * @readonly\n */\n grantedScopes?: GrantedScopes;\n /**\n * Best-effort snapshot of the shared access key's credential_state, maintained by consuming\n * AccessKeyBindingPushed off connectors-access-keys-store's own state-change events. NEVER a source\n * of truth and NEVER an authorization input -- under event lag this can read ACTIVE while the key is\n * REVOKED. It exists only to answer \"what should be shown to the user\"; every credential-usability\n * decision (dispatch, revocation, anything that gates behavior) must keep reading\n * connectors-access-keys-store synchronously. The same rule covers filtering by this field: a query\n * for credential_state == ACTIVE returns what the platform last believed, never a permission to use\n * those bindings. UNKNOWN_CREDENTIAL_STATE means no push has ever arrived for the bound access key --\n * including every row that predates this projection -- and is never a signal of a healthy connection.\n * Server-owned: no create or update path accepts a caller-supplied value for it. When a push carries\n * the source event's own timestamp, that timestamp is tracked on the domain row (not exposed on this\n * contract) and a later push older than the stored value is dropped; a push with no timestamp only\n * ever initializes a row that has never recorded one, never overwrites an already-timestamped\n * snapshot.\n * @readonly\n */\n credentialState?: CredentialStateWithLiterals;\n /**\n * Deprecated: use registration.predefined_registration.app_id. Retained for callers still on the\n * flat field. Empty for a dynamic (registration-owned) connector.\n * @format GUID\n * @immutable\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use registration.predefined_registration.component_id.\n * @format GUID\n * @immutable\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: RegistrationTypeWithLiterals;\n /**\n * Shared access-key binding identity: the access key this connection is bound to. Within an\n * account, one binding per scope is allowed, where an ACCOUNT connector uses the empty scope and a\n * USER connector uses its consenting user -- so a key admits one account-wide binding alongside one\n * binding per user in that account, and a second binding of the same key in the same scope within\n * the same account is rejected; the same key may be bound again in a different account, since the\n * index is scoped by tenant. Required on every connector: it backs the table's sole unique index,\n * so a connector cannot be stored without one.\n * @internal\n * @format GUID\n * @immutable\n */\n accessKeyId?: string | null;\n}\n\n/** @oneof */\nexport interface ConnectorRegistrationOneOf {\n /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */\n predefinedRegistration?: PredefinedRegistration;\n /** Dynamic owner: the provider registration this connection was created against. */\n dynamicRegistration?: DynamicRegistration;\n}\n\nexport enum Exposure {\n /** The Connector is owned and usable by its account. */\n ACCOUNT = 'ACCOUNT',\n /** The Connector is restricted to its consenting user. */\n USER = 'USER',\n}\n\n/** @enumType */\nexport type ExposureWithLiterals = Exposure | 'ACCOUNT' | 'USER';\n\n/**\n * Provider-reported granted scopes, preserving the distinction between a provider that never reports\n * scopes and one that explicitly reports an empty set.\n */\nexport interface GrantedScopes {\n /** Whether the provider has reported a granted-scopes set for this credential. */\n reportingState?: ScopeReportingStateWithLiterals;\n /**\n * The scopes the provider reported. Meaningful only when reporting_state is REPORTED: an empty list\n * there means the provider explicitly reported no granted scopes (known-empty), not that reporting is\n * unknown.\n * @maxSize 40\n * @maxLength 70\n */\n scopes?: string[];\n}\n\nexport enum ScopeReportingState {\n /** The provider has not reported a granted-scopes set for this credential. */\n NOT_REPORTED = 'NOT_REPORTED',\n /** The provider reported a granted-scopes set, which may itself be empty. */\n REPORTED = 'REPORTED',\n}\n\n/** @enumType */\nexport type ScopeReportingStateWithLiterals =\n | ScopeReportingState\n | 'NOT_REPORTED'\n | 'REPORTED';\n\n/** Reused verbatim from wix.connectors.v1. */\nexport enum CredentialState {\n ACTIVE = 'ACTIVE',\n REVOKED = 'REVOKED',\n}\n\n/** @enumType */\nexport type CredentialStateWithLiterals =\n | CredentialState\n | 'ACTIVE'\n | 'REVOKED';\n\n/** Curated owner: the connector app plus CONNECTOR_CONFIG component a connection was created against. */\nexport interface PredefinedRegistration {\n /**\n * The connector app that declares the CONNECTOR_CONFIG component.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * The CONNECTOR_CONFIG component within that app — the stable address for the connector's config.\n * @format GUID\n * @immutable\n */\n componentId?: string;\n}\n\n/**\n * Dynamic owner: the wix.connectors.registry.v1.mcp_server_registration a connection was created\n * against, for a DCR connector reached by URL. Shared per provider rather than per app/component.\n */\nexport interface DynamicRegistration {\n /**\n * The provider-registry McpServerRegistration this connection was created against.\n * @format GUID\n * @immutable\n */\n registrationId?: string;\n}\n\n/** Which kind of owner this connection belongs to. */\nexport enum RegistrationType {\n /** Owned by a connector app/component (curated). */\n PREDEFINED = 'PREDEFINED',\n /** Owned by a provider registration (DCR). */\n DYNAMIC = 'DYNAMIC',\n}\n\n/** @enumType */\nexport type RegistrationTypeWithLiterals =\n | RegistrationType\n | 'PREDEFINED'\n | 'DYNAMIC';\n\nexport interface CreateConnectorRequest {\n /** Durable OAuth Connector to persist in the target account tenant. */\n connector?: Connector;\n}\n\nexport interface CreateConnectorResponse {\n /** The persisted Connector. */\n connector?: Connector;\n}\n\nexport interface GetConnectorRequest {\n /**\n * ID of the Connector to retrieve.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface GetConnectorResponse {\n /** The requested Connector. */\n connector?: Connector;\n}\n\nexport interface DeleteConnectorRequest {\n /**\n * ID of the Connector to move to the trash bin.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface DeleteConnectorResponse {}\n\nexport interface QueryConnectorsRequest {\n /** Filter, sort, and cursor paging arguments for Connectors in the target account tenant. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryConnectorsResponse {\n /** Connectors from the target account tenant. Protected fields require their own permissions. */\n connectors?: Connector[];\n /** Cursor information for the next or previous page. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface StartConnectRequest extends StartConnectRequestOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: StartConnectRequestRegistrationTypeWithLiterals;\n /**\n * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat\n * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty\n * default a oneof-owner request carries, so this optional field only caps length.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use owner.predefined_registration.component_id.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /**\n * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as\n * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the\n * Connector's consenting_user_id and the connection is then visible only to that user.\n */\n exposure?: ExposureWithLiterals;\n /**\n * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain\n * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing\n * page is used. Carried through the handshake; the same URL is used for both success and error\n * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so\n * this optional field only caps length here — the server-side allowlist is the real URL gate.\n * @maxLength 2048\n */\n returnUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectRequestOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n}\n\n/** Which kind of owner this connect targets. */\nexport enum StartConnectRequestRegistrationType {\n /** Curated owner (app_id + component_id). */\n PREDEFINED = 'PREDEFINED',\n /** Dynamic (DCR) owner (registration_id). */\n DYNAMIC = 'DYNAMIC',\n}\n\n/** @enumType */\nexport type StartConnectRequestRegistrationTypeWithLiterals =\n | StartConnectRequestRegistrationType\n | 'PREDEFINED'\n | 'DYNAMIC';\n\nexport interface StartConnectResponse\n extends StartConnectResponseNextActionOneOf {\n /** Redirect the caller's browser to complete the connect. */\n redirect?: Redirect;\n /** Nothing left to do — the connect is already finished. */\n completed?: Completed;\n /**\n * Deprecated: read `next_action.redirect.url` instead. Still populated whenever the next action IS\n * a redirect, so callers that have not migrated keep working; it is simply unable to express any\n * other outcome, which is why it is being replaced rather than extended.\n * @format WEB_URL\n * @deprecated\n * @replacedBy next_action.redirect.url\n * @targetRemovalDate 2027-06-30\n */\n authorizationUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectResponseNextActionOneOf {\n /** Redirect the caller's browser to complete the connect. */\n redirect?: Redirect;\n /** Nothing left to do — the connect is already finished. */\n completed?: Completed;\n}\n\n/** Redirects the caller's browser to a provider authorization URL. */\nexport interface Redirect {\n /**\n * Provider authorization URL to redirect the user's browser to.\n * @format WEB_URL\n */\n url?: string;\n}\n\n/**\n * The connect is already finished and the Connector exists; no user interaction happened or is needed.\n * Returned for a provider that requires no authorization at all, where there is no authorization URL\n * to visit and so no callback to return through.\n */\nexport interface Completed {\n /**\n * Id of the access key the resulting Connector is bound to.\n * @format GUID\n */\n accessKeyId?: string;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface DispatchRequest {\n /**\n * ID of the Connector to authorize in the caller's target account.\n * @format GUID\n */\n connectorId: string;\n /** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */\n providerRequest: RawHttpRequest;\n /**\n * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same\n * connector will not produce a second provider attempt through Wix. Scoped to the connector, so\n * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it\n * cannot guarantee the provider applied the effect at most once when an attempt's outcome is\n * unknown (timeout, connection reset). For that, include the provider's own idempotency header in\n * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the\n * original response, which Wix does not retain; callers needing it must store it themselves.\n * @maxLength 128\n */\n idempotencyKey?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface ListMcpToolsRequest {\n /**\n * ID of the Connector whose callable MCP tools are requested.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface ListMcpToolsResponse {\n /**\n * The server's advertised tools filtered by the connector's allowlist. Capped to match mcp_config.allowed_tools' own maximum; the runtime\n * rejects a provider advertisement it cannot fit rather than returning an unbounded payload.\n * @maxSize 200\n */\n tools?: McpTool[];\n}\n\n/** One MCP tool as advertised by the connector's MCP server. */\nexport interface McpTool {\n /**\n * Tool name, exactly as the server advertises it.\n * @maxLength 128\n */\n name?: string;\n /**\n * Human- and model-readable description of what the tool does, as provided by the server.\n * @maxLength 10000\n */\n description?: string;\n /** JSON Schema of the tool's arguments, as provided by the server. */\n inputSchema?: Record<string, any> | null;\n}\n\n/**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n * @param connectorId - ID of the Connector to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:get_connector\n * @returns The requested Connector.\n * @fqn wix.connectors.v1.ConnectorsService.GetConnector\n */\nexport async function getConnector(\n connectorId: string\n): Promise<\n NonNullablePaths<\n Connector,\n | `predefinedRegistration.appId`\n | `predefinedRegistration.componentId`\n | `dynamicRegistration.registrationId`\n | `connectorSlug`\n | `exposure`\n | `credentialState`\n | `appId`\n | `componentId`\n | `registrationType`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.getConnector(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.connector!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n * @param connectorId - ID of the Connector to move to the trash bin.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:delete_connector\n * @fqn wix.connectors.v1.ConnectorsService.DeleteConnector\n */\nexport async function deleteConnector(connectorId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.deleteConnector(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n * @public\n * @documentationMaturity preview\n * @permissionId connectors:v1:connector:query_connectors\n * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors\n */\nexport function queryConnectors(): ConnectorsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Connector,\n 'CURSOR',\n QueryConnectorsRequest,\n QueryConnectorsResponse\n >({\n func: async (payload: QueryConnectorsRequest) => {\n const reqOpts =\n ambassadorWixConnectorsV1Connector.queryConnectors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryConnectorsRequest['query']) => {\n const args = [query, {}] as [QueryConnectorsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryConnectorsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.connectors,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ConnectorsQueryResult extends QueryCursorResult {\n items: Connector[];\n query: ConnectorsQueryBuilder;\n next: () => Promise<ConnectorsQueryResult>;\n prev: () => Promise<ConnectorsQueryResult>;\n}\n\nexport interface ConnectorsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: string\n ) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: boolean\n ) => ConnectorsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType'\n >\n ) => ConnectorsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType'\n >\n ) => ConnectorsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ConnectorsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ConnectorsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors\n * @requiredField query\n */\nexport async function typedQueryConnectors(\n query: ConnectorQuery\n): Promise<\n NonNullablePaths<\n QueryConnectorsResponse,\n | `connectors`\n | `connectors.${number}.predefinedRegistration.appId`\n | `connectors.${number}.predefinedRegistration.componentId`\n | `connectors.${number}.dynamicRegistration.registrationId`\n | `connectors.${number}.connectorSlug`\n | `connectors.${number}.exposure`\n | `connectors.${number}.credentialState`\n | `connectors.${number}.appId`\n | `connectors.${number}.componentId`\n | `connectors.${number}.registrationType`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.queryConnectors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ConnectorQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_id',\n 'appId',\n 'componentId',\n 'connectorSlug',\n 'credentialState',\n 'dynamicRegistration.registrationId',\n 'exposure',\n 'predefinedRegistration.appId',\n 'predefinedRegistration.componentId',\n 'registrationType'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Connector,\n ConnectorQuerySpec\n>;\nexport type ConnectorQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Connector,\n ConnectorQuerySpec,\n ConnectorQuery\n >(),\n};\n\n/**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n * @public\n * @documentationMaturity preview\n * @permissionId connectors:v1:connector:start_connect\n * @fqn wix.connectors.v1.ConnectorsService.StartConnect\n */\nexport async function startConnect(\n options?: StartConnectOptions\n): Promise<\n NonNullablePaths<\n StartConnectResponse,\n `redirect.url` | `completed.accessKeyId` | `authorizationUrl`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n predefinedRegistration: options?.predefinedRegistration,\n dynamicRegistration: options?.dynamicRegistration,\n registrationType: options?.registrationType,\n appId: options?.appId,\n componentId: options?.componentId,\n exposure: options?.exposure,\n returnUrl: options?.returnUrl,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.startConnect(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n predefinedRegistration: '$[0].predefinedRegistration',\n dynamicRegistration: '$[0].dynamicRegistration',\n registrationType: '$[0].registrationType',\n appId: '$[0].appId',\n componentId: '$[0].componentId',\n exposure: '$[0].exposure',\n returnUrl: '$[0].returnUrl',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface StartConnectOptions extends StartConnectOptionsOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: StartConnectRequestRegistrationTypeWithLiterals;\n /**\n * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat\n * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty\n * default a oneof-owner request carries, so this optional field only caps length.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use owner.predefined_registration.component_id.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /**\n * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as\n * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the\n * Connector's consenting_user_id and the connection is then visible only to that user.\n */\n exposure?: ExposureWithLiterals;\n /**\n * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain\n * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing\n * page is used. Carried through the handshake; the same URL is used for both success and error\n * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so\n * this optional field only caps length here — the server-side allowlist is the real URL gate.\n * @maxLength 2048\n */\n returnUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectOptionsOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n}\n\n/**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n * @param connectorId - ID of the Connector to authorize in the caller's target account.\n * @param providerRequest - Raw provider request. Callers must not include credentials; Wix injects them at dispatch.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @requiredField providerRequest\n * @permissionId connectors:v1:connector:dispatcher:dispatch\n * @fqn wix.connectors.v1.ConnectorsDispatcherService.Dispatch\n */\nexport async function dispatcherDispatch(\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n providerRequest: providerRequest,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts =\n ambassadorWixConnectorsV1Connector.dispatcherDispatch(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n connectorId: '$[0]',\n providerRequest: '$[1]',\n idempotencyKey: '$[2].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['connectorId', 'providerRequest', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DispatcherDispatchOptions {\n /**\n * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same\n * connector will not produce a second provider attempt through Wix. Scoped to the connector, so\n * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it\n * cannot guarantee the provider applied the effect at most once when an attempt's outcome is\n * unknown (timeout, connection reset). For that, include the provider's own idempotency header in\n * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the\n * original response, which Wix does not retain; callers needing it must store it themselves.\n * @maxLength 128\n */\n idempotencyKey?: string;\n}\n\n/**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @param connectorId - ID of the Connector whose callable MCP tools are requested.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:dispatcher:list_mcp_tools\n * @fqn wix.connectors.v1.ConnectorsDispatcherService.ListMcpTools\n * @deprecated\n */\nexport async function listMcpTools(\n connectorId: string\n): Promise<\n NonNullablePaths<\n ListMcpToolsResponse,\n `tools` | `tools.${number}.name` | `tools.${number}.description`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.listMcpTools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixConnectorsV1ConnectorsDispatcherServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixConnectorsV1ConnectorsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n {\n srcPath: '/connectors-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/connectors-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n _: [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_connectors_connectors';\n\n/**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n */\nexport function getConnector(payload: object): RequestOptionsFactory<any> {\n function __getConnector({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'GET' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.GetConnector',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/{connectorId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'connector.createdDate' },\n { path: 'connector.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getConnector;\n}\n\n/**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n */\nexport function deleteConnector(payload: object): RequestOptionsFactory<any> {\n function __deleteConnector({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'DELETE' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.DeleteConnector',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/{connectorId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteConnector;\n}\n\n/**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n */\nexport function queryConnectors(payload: object): RequestOptionsFactory<any> {\n function __queryConnectors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.QueryConnectors',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'connectors.createdDate' },\n { path: 'connectors.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryConnectors;\n}\n\n/**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n */\nexport function startConnect(payload: object): RequestOptionsFactory<any> {\n function __startConnect({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.StartConnect',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/start-connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __startConnect;\n}\n\n/**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n */\nexport function dispatcherDispatch(\n payload: object\n): RequestOptionsFactory<any> {\n function __dispatcherDispatch({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: [{ path: 'providerRequest.body' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsDispatcherService.Dispatch',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({\n protoPath: '/v1/connectors/{connectorId}/dispatch',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __dispatcherDispatch;\n}\n\n/**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @deprecated\n */\nexport function listMcpTools(payload: object): RequestOptionsFactory<any> {\n function __listMcpTools({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'GET' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsDispatcherService.ListMcpTools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({\n protoPath: '/v1/connectors/{connectorId}/mcp/tools',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listMcpTools;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Connector,\n ConnectorQuery,\n ConnectorsQueryBuilder,\n DispatcherDispatchOptions,\n ListMcpToolsResponse,\n QueryConnectorsResponse,\n RawHttpRequest,\n RawHttpResponse,\n StartConnectOptions,\n StartConnectResponse,\n deleteConnector as universalDeleteConnector,\n dispatcherDispatch as universalDispatcherDispatch,\n getConnector as universalGetConnector,\n listMcpTools as universalListMcpTools,\n queryConnectors as universalQueryConnectors,\n startConnect as universalStartConnect,\n typedQueryConnectors as universalTypedQueryConnectors,\n} from './connectors-v1-connector-connectors.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/connectors' };\n\n/** @internal */\nexport function getConnector(httpClient: HttpClient): GetConnectorSignature {\n return (connectorId: string) =>\n universalGetConnector(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetConnectorSignature {\n /**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n * @param - ID of the Connector to retrieve.\n * @returns The requested Connector.\n */\n (connectorId: string): Promise<\n NonNullablePaths<\n Connector,\n | `predefinedRegistration.appId`\n | `predefinedRegistration.componentId`\n | `dynamicRegistration.registrationId`\n | `connectorSlug`\n | `exposure`\n | `credentialState`\n | `appId`\n | `componentId`\n | `registrationType`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function deleteConnector(\n httpClient: HttpClient\n): DeleteConnectorSignature {\n return (connectorId: string) =>\n universalDeleteConnector(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteConnectorSignature {\n /**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n * @param - ID of the Connector to move to the trash bin.\n */\n (connectorId: string): Promise<void>;\n}\n\nexport function queryConnectors(\n httpClient: HttpClient\n): QueryConnectorsSignature {\n return () =>\n universalQueryConnectors(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryConnectorsSignature {\n /**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n */\n (): ConnectorsQueryBuilder;\n}\n\nexport function typedQueryConnectors(\n httpClient: HttpClient\n): TypedQueryConnectorsSignature {\n return (query: ConnectorQuery) =>\n universalTypedQueryConnectors(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryConnectorsSignature {\n /** */\n (query: ConnectorQuery): Promise<\n NonNullablePaths<\n QueryConnectorsResponse,\n | `connectors`\n | `connectors.${number}.predefinedRegistration.appId`\n | `connectors.${number}.predefinedRegistration.componentId`\n | `connectors.${number}.dynamicRegistration.registrationId`\n | `connectors.${number}.connectorSlug`\n | `connectors.${number}.exposure`\n | `connectors.${number}.credentialState`\n | `connectors.${number}.appId`\n | `connectors.${number}.componentId`\n | `connectors.${number}.registrationType`,\n 5\n >\n >;\n}\n\nexport function startConnect(httpClient: HttpClient): StartConnectSignature {\n return (options?: StartConnectOptions) =>\n universalStartConnect(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface StartConnectSignature {\n /**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n */\n (options?: StartConnectOptions): Promise<\n NonNullablePaths<\n StartConnectResponse,\n `redirect.url` | `completed.accessKeyId` | `authorizationUrl`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function dispatcherDispatch(\n httpClient: HttpClient\n): DispatcherDispatchSignature {\n return (\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n ) =>\n universalDispatcherDispatch(\n connectorId,\n providerRequest,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DispatcherDispatchSignature {\n /**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n * @param - ID of the Connector to authorize in the caller's target account.\n * @param - Raw provider request. Callers must not include credentials; Wix injects them at dispatch.\n */\n (\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n ): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n >;\n}\n\n/** @internal */\nexport function listMcpTools(httpClient: HttpClient): ListMcpToolsSignature {\n return (connectorId: string) =>\n universalListMcpTools(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListMcpToolsSignature {\n /**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @param - ID of the Connector whose callable MCP tools are requested.\n * @deprecated\n */\n (connectorId: string): Promise<\n NonNullablePaths<\n ListMcpToolsResponse,\n `tools` | `tools.${number}.name` | `tools.${number}.description`,\n 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Completed,\n Connector,\n ConnectorQuerySpec,\n ConnectorRegistrationOneOf,\n ConnectorsQueryBuilder,\n ConnectorsQueryResult,\n CreateConnectorRequest,\n CreateConnectorResponse,\n CredentialState,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteConnectorRequest,\n DeleteConnectorResponse,\n DispatchRequest,\n DispatcherDispatchOptions,\n DomainEvent,\n DomainEventBodyOneOf,\n DynamicRegistration,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Exposure,\n GetConnectorRequest,\n GetConnectorResponse,\n GrantedScopes,\n HeadersEntry,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListMcpToolsRequest,\n ListMcpToolsResponse,\n McpTool,\n MessageEnvelope,\n PathParametersEntry,\n PredefinedRegistration,\n QueryConnectorsRequest,\n QueryConnectorsResponse,\n QueryParametersEntry,\n RawHttpRequest,\n RawHttpResponse,\n Redirect,\n RegistrationType,\n RestoreInfo,\n ScopeReportingState,\n SortOrder,\n Sorting,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\n StartConnectRequest,\n StartConnectRequestOwnerOneOf,\n StartConnectRequestRegistrationType,\n StartConnectResponse,\n StartConnectResponseNextActionOneOf,\n WebhookIdentityType,\n utils,\n} from './connectors-v1-connector-connectors.universal.js';\n","import {\n getConnector as publicGetConnector,\n deleteConnector as publicDeleteConnector,\n queryConnectors as publicQueryConnectors,\n typedQueryConnectors as publicTypedQueryConnectors,\n startConnect as publicStartConnect,\n dispatcherDispatch as publicDispatcherDispatch,\n listMcpTools as publicListMcpTools,\n} from './connectors-v1-connector-connectors.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ConnectorQuery,\n ConnectorsQueryBuilder,\n typedQueryConnectors as universalTypedQueryConnectors,\n} from './connectors-v1-connector-connectors.universal.js';\n\nfunction customQueryConnectors(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryConnectors(httpClient)(),\n typedQueryFunction: (query: ConnectorQuery) =>\n publicTypedQueryConnectors(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ConnectorsQueryBuilder;\n function overloadedQuery(\n query: ConnectorQuery\n ): ReturnType<typeof universalTypedQueryConnectors>;\n function overloadedQuery(query?: ConnectorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\n/** @internal */\nexport const getConnector: MaybeContext<\n BuildRESTFunction<typeof publicGetConnector> & typeof publicGetConnector\n> = /*#__PURE__*/ createRESTModule(publicGetConnector);\n/** @internal */\nexport const deleteConnector: MaybeContext<\n BuildRESTFunction<typeof publicDeleteConnector> & typeof publicDeleteConnector\n> = /*#__PURE__*/ createRESTModule(publicDeleteConnector);\nexport const startConnect: MaybeContext<\n BuildRESTFunction<typeof publicStartConnect> & typeof publicStartConnect\n> = /*#__PURE__*/ createRESTModule(publicStartConnect);\n/** @internal */\nexport const dispatcherDispatch: MaybeContext<\n BuildRESTFunction<typeof publicDispatcherDispatch> &\n typeof publicDispatcherDispatch\n> = /*#__PURE__*/ createRESTModule(publicDispatcherDispatch);\n/** @internal */\nexport const listMcpTools: MaybeContext<\n BuildRESTFunction<typeof publicListMcpTools> & typeof publicListMcpTools\n> = /*#__PURE__*/ createRESTModule(publicListMcpTools);\nexport const queryConnectors: MaybeContext<\n BuildRESTFunction<typeof customQueryConnectors> & typeof customQueryConnectors\n> = /*#__PURE__*/ createRESTModule(customQueryConnectors);\n\nexport {\n Exposure,\n ScopeReportingState,\n CredentialState,\n RegistrationType,\n SortOrder,\n StartConnectRequestRegistrationType,\n WebhookIdentityType,\n} from './connectors-v1-connector-connectors.universal.js';\nexport {\n Connector,\n ConnectorRegistrationOneOf,\n GrantedScopes,\n PredefinedRegistration,\n DynamicRegistration,\n CreateConnectorRequest,\n CreateConnectorResponse,\n GetConnectorRequest,\n GetConnectorResponse,\n DeleteConnectorRequest,\n DeleteConnectorResponse,\n QueryConnectorsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryConnectorsResponse,\n CursorPagingMetadata,\n Cursors,\n StartConnectRequest,\n StartConnectRequestOwnerOneOf,\n StartConnectResponse,\n StartConnectResponseNextActionOneOf,\n Redirect,\n Completed,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n DispatchRequest,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n HeadersEntry,\n RawHttpResponse,\n ListMcpToolsRequest,\n ListMcpToolsResponse,\n McpTool,\n ConnectorsQueryResult,\n ConnectorsQueryBuilder,\n ConnectorQuerySpec,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\n DispatcherDispatchOptions,\n} from './connectors-v1-connector-connectors.universal.js';\nexport { utils } from './connectors-v1-connector-connectors.universal.js';\nexport {\n ExposureWithLiterals,\n ScopeReportingStateWithLiterals,\n CredentialStateWithLiterals,\n RegistrationTypeWithLiterals,\n SortOrderWithLiterals,\n StartConnectRequestRegistrationTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n ConnectorQuery,\n} from './connectors-v1-connector-connectors.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,SAAS,2CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,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EA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,oBACd,YAC6B;AAC7B,SAAO,CACL,aACA,iBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA8BO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC1MA,IAAAC,uBAAiC;AAGjC,iCAA0C;AAO1C,SAAS,sBAAsB,YAAwB;AACrD,QAAM,SAAuB,0EAA0B;AAAA,IACrD,sBAAsB,MAAMC,iBAAsB,UAAU,EAAE;AAAA,IAC9D,oBAAoB,CAAC,UACnBC,sBAA2B,UAAU,EAAE,KAAK;AAAA,IAC9C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA6B;AACpD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAGO,IAAMC,gBAEK,2DAAiBA,aAAkB;AAE9C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAE9C,IAAMC,sBAGK,2DAAiBA,mBAAwB;AAEpD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMN,mBAEK,2DAAiB,qBAAqB;","names":["deleteConnector","dispatcherDispatch","getConnector","listMcpTools","queryConnectors","startConnect","import_bytes","import_rest_modules","payload","import_transform_paths","Exposure","ScopeReportingState","CredentialState","RegistrationType","SortOrder","StartConnectRequestRegistrationType","WebhookIdentityType","getConnector","sdkTransformError","deleteConnector","queryConnectors","startConnect","dispatcherDispatch","listMcpTools","getConnector","deleteConnector","queryConnectors","typedQueryConnectors","startConnect","dispatcherDispatch","listMcpTools","import_rest_modules","queryConnectors","typedQueryConnectors","getConnector","deleteConnector","startConnect","dispatcherDispatch","listMcpTools"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/connectors-v1-connector-connectors.universal.ts","../../src/connectors-v1-connector-connectors.http.ts","../../src/connectors-v1-connector-connectors.public.ts","../../src/connectors-v1-connector-connectors.context.ts"],"sourcesContent":["export * from './src/connectors-v1-connector-connectors.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixConnectorsV1Connector from './connectors-v1-connector-connectors.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * Not a taggable product resource: it carries no OAuth credential of its own (that lives on the\n * shared wix.connectors_access_keys.v1.ConnectorAccessKey), only binding data.\n */\nexport interface Connector extends ConnectorRegistrationOneOf {\n /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */\n predefinedRegistration?: PredefinedRegistration;\n /** Dynamic owner: the provider registration this connection was created against. */\n dynamicRegistration?: DynamicRegistration;\n /**\n * SDL derives this entity's owner from identity.targetAccountId; do not add account_id.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Optimistic-lock revision assigned by SDL.\n * @readonly\n */\n revision?: string | null;\n /**\n * Time at which SDL created the Connector.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Time at which SDL last updated the Connector.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Stable identifier of the connector implementation, for example \"github\".\n * @maxLength 80\n * @immutable\n */\n connectorSlug?: string;\n /**\n * The provider-side subject this connection is about, and the value inbound webhook deliveries are\n * attributed by: it must be byte-identical to what a delivery carries at the pointer the connector's\n * WebhookConfig.provider_tenant_id_json_pointer names. Which value that is follows from where\n * OAuthConfig.identity_operation.response_id_json_pointer points, so aim that pointer at whatever the\n * provider's webhooks are about -- usually a workspace, team or installation rather than the individual\n * user who consented. This PII also participates in the account-local uniqueness constraint.\n *\n * For a connector whose WebhookConfig declares verification_source = CONNECTOR_WIDE, a non-empty\n * provider_tenant_id_json_pointer, and unique_callback_path = false, that byte-identity is a hard\n * contract, not advice: connectors-webhooks uses this value as the provider tenant identity when it\n * builds the shared-delivery fan-out route for this connector, so a mismatch means the account's\n * deliveries verify but resolve no route and are refused. Config validation enforces the\n * precondition of that contract: such a connector is rejected unless it also names\n * OAuthConfig.identity_operation.response_id_json_pointer, because a connector that names no\n * identity pointer produces no external id for a delivery to be matched against. The equivalence\n * itself stays unvalidated and remains the responsibility of whoever configures the two pointers:\n * they address different documents -- the provider's identity response and an inbound delivery\n * body -- so only a live delivery can show that they select the same value.\n * @internal\n * @maxLength 200\n */\n connectorExternalId?: string;\n /**\n * Wix user who consented to this private Connector. Required when exposure is USER.\n * @internal\n * @format GUID\n * @immutable\n */\n consentingUserId?: string;\n /** Whether the Connector is account-owned or restricted to the consenting user. */\n exposure?: ExposureWithLiterals;\n /**\n * Best-effort projection of the shared access key's granted scopes, maintained by consuming\n * AccessKeyBindingPushed -- see credential_state's comment for the full advisory rule, which applies\n * identically here. Carried as the GrantedScopes message rather than a bare repeated string so a\n * provider that never reports scopes (reporting_state NOT_REPORTED) stays distinguishable from one\n * that explicitly reported an empty set (REPORTED with no scopes); flattening the two would turn an\n * unknown into a false negative for anyone reading this field. INTERNAL exposure plus CreateConnector's\n * WIX_APPS_ONLY audience are what protect this field: oauth-handler is the only writable() caller,\n * supplying the real value it already holds from the token exchange at creation; no other create or\n * update path can touch it. The producer only emits AccessKeyBindingPushed on a credential_state\n * transition, so a scopes-only change at the shared access key (no state transition) does not reach\n * this field after creation -- it reflects scopes as of the last state transition, not necessarily the\n * shared key's current scopes.\n * @internal\n * @readonly\n */\n grantedScopes?: GrantedScopes;\n /**\n * Best-effort snapshot of the shared access key's credential_state, maintained by consuming\n * AccessKeyBindingPushed off connectors-access-keys-store's own state-change events. NEVER a source\n * of truth and NEVER an authorization input -- under event lag this can read ACTIVE while the key is\n * REVOKED. It exists only to answer \"what should be shown to the user\"; every credential-usability\n * decision (dispatch, revocation, anything that gates behavior) must keep reading\n * connectors-access-keys-store synchronously. The same rule covers filtering by this field: a query\n * for credential_state == ACTIVE returns what the platform last believed, never a permission to use\n * those bindings. UNKNOWN_CREDENTIAL_STATE means the row predates this projection, or its creator's\n * own upstream state was itself unknown at creation -- never a signal of a healthy connection either\n * way; every new row otherwise gets the real value at creation.\n * readOnly plus CreateConnector's WIX_APPS_ONLY audience are what protect this field: it is\n * writable() only on that one RPC, so only oauth-handler can supply the real value at creation; every\n * other create or update path still can't touch it. Deliberately NOT field_exposure = INTERNAL, so\n * this field stays filterable/visible to the same external callers as SiteConnector's sibling field,\n * which was never internal. When a push\n * carries the source event's own timestamp, that timestamp is tracked on the domain row (not exposed\n * on this contract) and a later push older than the stored value is dropped; a push with no timestamp\n * only ever initializes a row that has never recorded one, never overwrites an already-timestamped\n * snapshot.\n * @readonly\n */\n credentialState?: CredentialStateWithLiterals;\n /**\n * Deprecated: use registration.predefined_registration.app_id. Retained for callers still on the\n * flat field. Empty for a dynamic (registration-owned) connector.\n * @format GUID\n * @immutable\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use registration.predefined_registration.component_id.\n * @format GUID\n * @immutable\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: RegistrationTypeWithLiterals;\n /**\n * Shared access-key binding identity: the access key this connection is bound to. Within an\n * account, one binding per scope is allowed, where an ACCOUNT connector uses the empty scope and a\n * USER connector uses its consenting user -- so a key admits one account-wide binding alongside one\n * binding per user in that account, and a second binding of the same key in the same scope within\n * the same account is rejected; the same key may be bound again in a different account, since the\n * index is scoped by tenant. Required on every connector: it backs the table's sole unique index,\n * so a connector cannot be stored without one.\n * @internal\n * @format GUID\n * @immutable\n */\n accessKeyId?: string | null;\n}\n\n/** @oneof */\nexport interface ConnectorRegistrationOneOf {\n /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */\n predefinedRegistration?: PredefinedRegistration;\n /** Dynamic owner: the provider registration this connection was created against. */\n dynamicRegistration?: DynamicRegistration;\n}\n\nexport enum Exposure {\n /** The Connector is owned and usable by its account. */\n ACCOUNT = 'ACCOUNT',\n /** The Connector is restricted to its consenting user. */\n USER = 'USER',\n}\n\n/** @enumType */\nexport type ExposureWithLiterals = Exposure | 'ACCOUNT' | 'USER';\n\n/**\n * Provider-reported granted scopes, preserving the distinction between a provider that never reports\n * scopes and one that explicitly reports an empty set.\n */\nexport interface GrantedScopes {\n /** Whether the provider has reported a granted-scopes set for this credential. */\n reportingState?: ScopeReportingStateWithLiterals;\n /**\n * The scopes the provider reported. Meaningful only when reporting_state is REPORTED: an empty list\n * there means the provider explicitly reported no granted scopes (known-empty), not that reporting is\n * unknown.\n * @maxSize 40\n * @maxLength 70\n */\n scopes?: string[];\n}\n\nexport enum ScopeReportingState {\n /** The provider has not reported a granted-scopes set for this credential. */\n NOT_REPORTED = 'NOT_REPORTED',\n /** The provider reported a granted-scopes set, which may itself be empty. */\n REPORTED = 'REPORTED',\n}\n\n/** @enumType */\nexport type ScopeReportingStateWithLiterals =\n | ScopeReportingState\n | 'NOT_REPORTED'\n | 'REPORTED';\n\n/** Reused verbatim from wix.connectors.v1. */\nexport enum CredentialState {\n ACTIVE = 'ACTIVE',\n REVOKED = 'REVOKED',\n}\n\n/** @enumType */\nexport type CredentialStateWithLiterals =\n | CredentialState\n | 'ACTIVE'\n | 'REVOKED';\n\n/** Curated owner: the connector app plus CONNECTOR_CONFIG component a connection was created against. */\nexport interface PredefinedRegistration {\n /**\n * The connector app that declares the CONNECTOR_CONFIG component.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * The CONNECTOR_CONFIG component within that app — the stable address for the connector's config.\n * @format GUID\n * @immutable\n */\n componentId?: string;\n}\n\n/**\n * Dynamic owner: the wix.connectors.registry.v1.mcp_server_registration a connection was created\n * against, for a DCR connector reached by URL. Shared per provider rather than per app/component.\n */\nexport interface DynamicRegistration {\n /**\n * The provider-registry McpServerRegistration this connection was created against.\n * @format GUID\n * @immutable\n */\n registrationId?: string;\n}\n\n/** Which kind of owner this connection belongs to. */\nexport enum RegistrationType {\n /** Owned by a connector app/component (curated). */\n PREDEFINED = 'PREDEFINED',\n /** Owned by a provider registration (DCR). */\n DYNAMIC = 'DYNAMIC',\n}\n\n/** @enumType */\nexport type RegistrationTypeWithLiterals =\n | RegistrationType\n | 'PREDEFINED'\n | 'DYNAMIC';\n\nexport interface CreateConnectorRequest {\n /** Durable OAuth Connector to persist in the target account tenant. */\n connector?: Connector;\n}\n\nexport interface CreateConnectorResponse {\n /** The persisted Connector. */\n connector?: Connector;\n}\n\nexport interface GetConnectorRequest {\n /**\n * ID of the Connector to retrieve.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface GetConnectorResponse {\n /** The requested Connector. */\n connector?: Connector;\n}\n\nexport interface DeleteConnectorRequest {\n /**\n * ID of the Connector to move to the trash bin.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface DeleteConnectorResponse {}\n\nexport interface QueryConnectorsRequest {\n /** Filter, sort, and cursor paging arguments for Connectors in the target account tenant. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryConnectorsResponse {\n /** Connectors from the target account tenant. Protected fields require their own permissions. */\n connectors?: Connector[];\n /** Cursor information for the next or previous page. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface StartConnectRequest extends StartConnectRequestOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: StartConnectRequestRegistrationTypeWithLiterals;\n /**\n * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat\n * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty\n * default a oneof-owner request carries, so this optional field only caps length.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use owner.predefined_registration.component_id.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /**\n * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as\n * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the\n * Connector's consenting_user_id and the connection is then visible only to that user.\n */\n exposure?: ExposureWithLiterals;\n /**\n * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain\n * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing\n * page is used. Carried through the handshake; the same URL is used for both success and error\n * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so\n * this optional field only caps length here — the server-side allowlist is the real URL gate.\n * @maxLength 2048\n */\n returnUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectRequestOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n}\n\n/** Which kind of owner this connect targets. */\nexport enum StartConnectRequestRegistrationType {\n /** Curated owner (app_id + component_id). */\n PREDEFINED = 'PREDEFINED',\n /** Dynamic (DCR) owner (registration_id). */\n DYNAMIC = 'DYNAMIC',\n}\n\n/** @enumType */\nexport type StartConnectRequestRegistrationTypeWithLiterals =\n | StartConnectRequestRegistrationType\n | 'PREDEFINED'\n | 'DYNAMIC';\n\nexport interface StartConnectResponse\n extends StartConnectResponseNextActionOneOf {\n /** Redirect the caller's browser to complete the connect. */\n redirect?: Redirect;\n /** Nothing left to do — the connect is already finished. */\n completed?: Completed;\n /**\n * Deprecated: read `next_action.redirect.url` instead. Still populated whenever the next action IS\n * a redirect, so callers that have not migrated keep working; it is simply unable to express any\n * other outcome, which is why it is being replaced rather than extended.\n * @format WEB_URL\n * @deprecated\n * @replacedBy next_action.redirect.url\n * @targetRemovalDate 2027-06-30\n */\n authorizationUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectResponseNextActionOneOf {\n /** Redirect the caller's browser to complete the connect. */\n redirect?: Redirect;\n /** Nothing left to do — the connect is already finished. */\n completed?: Completed;\n}\n\n/** Redirects the caller's browser to a provider authorization URL. */\nexport interface Redirect {\n /**\n * Provider authorization URL to redirect the user's browser to.\n * @format WEB_URL\n */\n url?: string;\n}\n\n/**\n * The connect is already finished and the Connector exists; no user interaction happened or is needed.\n * Returned for a provider that requires no authorization at all, where there is no authorization URL\n * to visit and so no callback to return through.\n */\nexport interface Completed {\n /**\n * Id of the access key the resulting Connector is bound to.\n * @format GUID\n */\n accessKeyId?: string;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface DispatchRequest {\n /**\n * ID of the Connector to authorize in the caller's target account.\n * @format GUID\n */\n connectorId: string;\n /** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */\n providerRequest: RawHttpRequest;\n /**\n * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same\n * connector will not produce a second provider attempt through Wix. Scoped to the connector, so\n * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it\n * cannot guarantee the provider applied the effect at most once when an attempt's outcome is\n * unknown (timeout, connection reset). For that, include the provider's own idempotency header in\n * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the\n * original response, which Wix does not retain; callers needing it must store it themselves.\n * @maxLength 128\n */\n idempotencyKey?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface DispatchByAccessKeyRequest {\n /**\n * ID of the ConnectorAccessKey to dispatch under. Never authorization by itself — the caller's\n * Plazma grant on this method is what authorizes the call; this id only selects the credential.\n * @format GUID\n */\n accessKeyId?: string;\n /**\n * The connector app that declares the CONNECTOR_CONFIG component to authorize this dispatch\n * against. Supplied directly because there is no connector binding to resolve it from.\n * @format GUID\n */\n appId?: string;\n /**\n * The CONNECTOR_CONFIG component within that app, whose dispatch policy governs this request.\n * @format GUID\n */\n componentId?: string;\n /** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */\n providerRequest?: RawHttpRequest;\n /**\n * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same\n * access key will not produce a second provider attempt through Wix. Scoped to the access key,\n * so callers need only make it unique per access key. Guarantees at-most-once ATTEMPT by Wix — it\n * cannot guarantee the provider applied the effect at most once when an attempt's outcome is\n * unknown (timeout, connection reset). For that, include the provider's own idempotency header in\n * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the\n * original response, which Wix does not retain; callers needing it must store it themselves.\n * @maxLength 128\n */\n idempotencyKey?: string;\n}\n\nexport interface ListMcpToolsRequest {\n /**\n * ID of the Connector whose callable MCP tools are requested.\n * @format GUID\n */\n connectorId: string;\n}\n\nexport interface ListMcpToolsResponse {\n /**\n * The server's advertised tools filtered by the connector's allowlist. Capped to match mcp_config.allowed_tools' own maximum; the runtime\n * rejects a provider advertisement it cannot fit rather than returning an unbounded payload.\n * @maxSize 200\n */\n tools?: McpTool[];\n}\n\n/** One MCP tool as advertised by the connector's MCP server. */\nexport interface McpTool {\n /**\n * Tool name, exactly as the server advertises it.\n * @maxLength 128\n */\n name?: string;\n /**\n * Human- and model-readable description of what the tool does, as provided by the server.\n * @maxLength 10000\n */\n description?: string;\n /** JSON Schema of the tool's arguments, as provided by the server. */\n inputSchema?: Record<string, any> | null;\n}\n\n/**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n * @param connectorId - ID of the Connector to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:get_connector\n * @returns The requested Connector.\n * @fqn wix.connectors.v1.ConnectorsService.GetConnector\n */\nexport async function getConnector(\n connectorId: string\n): Promise<\n NonNullablePaths<\n Connector,\n | `predefinedRegistration.appId`\n | `predefinedRegistration.componentId`\n | `dynamicRegistration.registrationId`\n | `connectorSlug`\n | `exposure`\n | `credentialState`\n | `appId`\n | `componentId`\n | `registrationType`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.getConnector(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.connector!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n * @param connectorId - ID of the Connector to move to the trash bin.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:delete_connector\n * @fqn wix.connectors.v1.ConnectorsService.DeleteConnector\n */\nexport async function deleteConnector(connectorId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.deleteConnector(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n * @public\n * @documentationMaturity preview\n * @permissionId connectors:v1:connector:query_connectors\n * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors\n */\nexport function queryConnectors(): ConnectorsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Connector,\n 'CURSOR',\n QueryConnectorsRequest,\n QueryConnectorsResponse\n >({\n func: async (payload: QueryConnectorsRequest) => {\n const reqOpts =\n ambassadorWixConnectorsV1Connector.queryConnectors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryConnectorsRequest['query']) => {\n const args = [query, {}] as [QueryConnectorsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryConnectorsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.connectors,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ConnectorsQueryResult extends QueryCursorResult {\n items: Connector[];\n query: ConnectorsQueryBuilder;\n next: () => Promise<ConnectorsQueryResult>;\n prev: () => Promise<ConnectorsQueryResult>;\n}\n\nexport interface ConnectorsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'appId'\n | 'componentId',\n value: string\n ) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: any\n ) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType',\n value: boolean\n ) => ConnectorsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType'\n >\n ) => ConnectorsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'predefinedRegistration.appId'\n | 'predefinedRegistration.componentId'\n | 'dynamicRegistration.registrationId'\n | '_id'\n | 'connectorSlug'\n | 'exposure'\n | 'credentialState'\n | 'appId'\n | 'componentId'\n | 'registrationType'\n >\n ) => ConnectorsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ConnectorsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ConnectorsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ConnectorsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors\n * @requiredField query\n */\nexport async function typedQueryConnectors(\n query: ConnectorQuery\n): Promise<\n NonNullablePaths<\n QueryConnectorsResponse,\n | `connectors`\n | `connectors.${number}.predefinedRegistration.appId`\n | `connectors.${number}.predefinedRegistration.componentId`\n | `connectors.${number}.dynamicRegistration.registrationId`\n | `connectors.${number}.connectorSlug`\n | `connectors.${number}.exposure`\n | `connectors.${number}.credentialState`\n | `connectors.${number}.appId`\n | `connectors.${number}.componentId`\n | `connectors.${number}.registrationType`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.queryConnectors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ConnectorQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_id',\n 'appId',\n 'componentId',\n 'connectorSlug',\n 'credentialState',\n 'dynamicRegistration.registrationId',\n 'exposure',\n 'predefinedRegistration.appId',\n 'predefinedRegistration.componentId',\n 'registrationType'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Connector,\n ConnectorQuerySpec\n>;\nexport type ConnectorQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Connector,\n ConnectorQuerySpec,\n ConnectorQuery\n >(),\n};\n\n/**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n * @public\n * @documentationMaturity preview\n * @permissionId connectors:v1:connector:start_connect\n * @fqn wix.connectors.v1.ConnectorsService.StartConnect\n */\nexport async function startConnect(\n options?: StartConnectOptions\n): Promise<\n NonNullablePaths<\n StartConnectResponse,\n `redirect.url` | `completed.accessKeyId` | `authorizationUrl`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n predefinedRegistration: options?.predefinedRegistration,\n dynamicRegistration: options?.dynamicRegistration,\n registrationType: options?.registrationType,\n appId: options?.appId,\n componentId: options?.componentId,\n exposure: options?.exposure,\n returnUrl: options?.returnUrl,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.startConnect(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n predefinedRegistration: '$[0].predefinedRegistration',\n dynamicRegistration: '$[0].dynamicRegistration',\n registrationType: '$[0].registrationType',\n appId: '$[0].appId',\n componentId: '$[0].componentId',\n exposure: '$[0].exposure',\n returnUrl: '$[0].returnUrl',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface StartConnectOptions extends StartConnectOptionsOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n /** Non-secret discriminant of the owner kind, aligned with the oneof above. */\n registrationType?: StartConnectRequestRegistrationTypeWithLiterals;\n /**\n * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat\n * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty\n * default a oneof-owner request carries, so this optional field only caps length.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.app_id\n * @targetRemovalDate 2027-06-30\n */\n appId?: string;\n /**\n * Deprecated: use owner.predefined_registration.component_id.\n * @maxLength 80\n * @deprecated\n * @replacedBy predefined_registration.component_id\n * @targetRemovalDate 2027-06-30\n */\n componentId?: string;\n /**\n * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as\n * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the\n * Connector's consenting_user_id and the connection is then visible only to that user.\n */\n exposure?: ExposureWithLiterals;\n /**\n * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain\n * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing\n * page is used. Carried through the handshake; the same URL is used for both success and error\n * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so\n * this optional field only caps length here — the server-side allowlist is the real URL gate.\n * @maxLength 2048\n */\n returnUrl?: string;\n}\n\n/** @oneof */\nexport interface StartConnectOptionsOwnerOneOf {\n /** Curated connect: the connector app + CONNECTOR_CONFIG component. */\n predefinedRegistration?: PredefinedRegistration;\n /**\n * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth\n * config comes from the registration rather than a CONNECTOR_CONFIG component.\n */\n dynamicRegistration?: DynamicRegistration;\n}\n\n/**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n * @param connectorId - ID of the Connector to authorize in the caller's target account.\n * @param providerRequest - Raw provider request. Callers must not include credentials; Wix injects them at dispatch.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @requiredField providerRequest\n * @permissionId connectors:v1:connector:dispatcher:dispatch\n * @fqn wix.connectors.v1.ConnectorsDispatcherService.Dispatch\n */\nexport async function dispatcherDispatch(\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n providerRequest: providerRequest,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts =\n ambassadorWixConnectorsV1Connector.dispatcherDispatch(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n connectorId: '$[0]',\n providerRequest: '$[1]',\n idempotencyKey: '$[2].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['connectorId', 'providerRequest', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DispatcherDispatchOptions {\n /**\n * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same\n * connector will not produce a second provider attempt through Wix. Scoped to the connector, so\n * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it\n * cannot guarantee the provider applied the effect at most once when an attempt's outcome is\n * unknown (timeout, connection reset). For that, include the provider's own idempotency header in\n * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the\n * original response, which Wix does not retain; callers needing it must store it themselves.\n * @maxLength 128\n */\n idempotencyKey?: string;\n}\n\n/**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @param connectorId - ID of the Connector whose callable MCP tools are requested.\n * @internal\n * @documentationMaturity preview\n * @requiredField connectorId\n * @permissionId connectors:v1:connector:dispatcher:list_mcp_tools\n * @fqn wix.connectors.v1.ConnectorsDispatcherService.ListMcpTools\n * @deprecated\n */\nexport async function listMcpTools(\n connectorId: string\n): Promise<\n NonNullablePaths<\n ListMcpToolsResponse,\n `tools` | `tools.${number}.name` | `tools.${number}.description`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectorId: connectorId,\n });\n\n const reqOpts = ambassadorWixConnectorsV1Connector.listMcpTools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectorId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectorId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixConnectorsV1ConnectorsDispatcherServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixConnectorsV1ConnectorsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n {\n srcPath: '/connectors-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/connectors-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/connectors-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n _: [\n {\n srcPath: '/connectors/v1/connectors',\n destPath: '/v1/connectors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_connectors_connectors';\n\n/**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n */\nexport function getConnector(payload: object): RequestOptionsFactory<any> {\n function __getConnector({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'GET' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.GetConnector',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/{connectorId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'connector.createdDate' },\n { path: 'connector.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getConnector;\n}\n\n/**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n */\nexport function deleteConnector(payload: object): RequestOptionsFactory<any> {\n function __deleteConnector({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'DELETE' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.DeleteConnector',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/{connectorId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteConnector;\n}\n\n/**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n */\nexport function queryConnectors(payload: object): RequestOptionsFactory<any> {\n function __queryConnectors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.QueryConnectors',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'connectors.createdDate' },\n { path: 'connectors.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryConnectors;\n}\n\n/**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n */\nexport function startConnect(payload: object): RequestOptionsFactory<any> {\n function __startConnect({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsService.StartConnect',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsServiceUrl({\n protoPath: '/v1/connectors/start-connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __startConnect;\n}\n\n/**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n */\nexport function dispatcherDispatch(\n payload: object\n): RequestOptionsFactory<any> {\n function __dispatcherDispatch({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: [{ path: 'providerRequest.body' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'POST' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsDispatcherService.Dispatch',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({\n protoPath: '/v1/connectors/{connectorId}/dispatch',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __dispatcherDispatch;\n}\n\n/**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @deprecated\n */\nexport function listMcpTools(payload: object): RequestOptionsFactory<any> {\n function __listMcpTools({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.connectors.v1.connector',\n method: 'GET' as any,\n methodFqn: 'wix.connectors.v1.ConnectorsDispatcherService.ListMcpTools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({\n protoPath: '/v1/connectors/{connectorId}/mcp/tools',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listMcpTools;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Connector,\n ConnectorQuery,\n ConnectorsQueryBuilder,\n DispatcherDispatchOptions,\n ListMcpToolsResponse,\n QueryConnectorsResponse,\n RawHttpRequest,\n RawHttpResponse,\n StartConnectOptions,\n StartConnectResponse,\n deleteConnector as universalDeleteConnector,\n dispatcherDispatch as universalDispatcherDispatch,\n getConnector as universalGetConnector,\n listMcpTools as universalListMcpTools,\n queryConnectors as universalQueryConnectors,\n startConnect as universalStartConnect,\n typedQueryConnectors as universalTypedQueryConnectors,\n} from './connectors-v1-connector-connectors.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/connectors' };\n\n/** @internal */\nexport function getConnector(httpClient: HttpClient): GetConnectorSignature {\n return (connectorId: string) =>\n universalGetConnector(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetConnectorSignature {\n /**\n * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible\n * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT\n * Connectors are visible to authorized account callers.\n * @param - ID of the Connector to retrieve.\n * @returns The requested Connector.\n */\n (connectorId: string): Promise<\n NonNullablePaths<\n Connector,\n | `predefinedRegistration.appId`\n | `predefinedRegistration.componentId`\n | `dynamicRegistration.registrationId`\n | `connectorSlug`\n | `exposure`\n | `credentialState`\n | `appId`\n | `componentId`\n | `registrationType`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function deleteConnector(\n httpClient: HttpClient\n): DeleteConnectorSignature {\n return (connectorId: string) =>\n universalDeleteConnector(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteConnectorSignature {\n /**\n * Moves a Connector to the trash bin, disconnecting it from future use.\n *\n * Removing the binding does not revoke the provider authorization: the access key is shared, and other\n * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the\n * access key owner's job, not this method's.\n * @param - ID of the Connector to move to the trash bin.\n */\n (connectorId: string): Promise<void>;\n}\n\nexport function queryConnectors(\n httpClient: HttpClient\n): QueryConnectorsSignature {\n return () =>\n universalQueryConnectors(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryConnectorsSignature {\n /**\n * Lists Connectors only in the caller's target account tenant. USER Connectors are included\n * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.\n */\n (): ConnectorsQueryBuilder;\n}\n\nexport function typedQueryConnectors(\n httpClient: HttpClient\n): TypedQueryConnectorsSignature {\n return (query: ConnectorQuery) =>\n universalTypedQueryConnectors(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryConnectorsSignature {\n /** */\n (query: ConnectorQuery): Promise<\n NonNullablePaths<\n QueryConnectorsResponse,\n | `connectors`\n | `connectors.${number}.predefinedRegistration.appId`\n | `connectors.${number}.predefinedRegistration.componentId`\n | `connectors.${number}.dynamicRegistration.registrationId`\n | `connectors.${number}.connectorSlug`\n | `connectors.${number}.exposure`\n | `connectors.${number}.credentialState`\n | `connectors.${number}.appId`\n | `connectors.${number}.componentId`\n | `connectors.${number}.registrationType`,\n 5\n >\n >;\n}\n\nexport function startConnect(httpClient: HttpClient): StartConnectSignature {\n return (options?: StartConnectOptions) =>\n universalStartConnect(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface StartConnectSignature {\n /**\n * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.\n * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time\n * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a\n * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —\n * a Connector exists only after the OAuth callback completes. Does not install an app or call\n * any app-installation API.\n */\n (options?: StartConnectOptions): Promise<\n NonNullablePaths<\n StartConnectResponse,\n `redirect.url` | `completed.accessKeyId` | `authorizationUrl`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function dispatcherDispatch(\n httpClient: HttpClient\n): DispatcherDispatchSignature {\n return (\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n ) =>\n universalDispatcherDispatch(\n connectorId,\n providerRequest,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DispatcherDispatchSignature {\n /**\n * Dispatches one provider request using credentials owned and injected by Wix.\n *\n * The provider's answer is returned as-is, including a rejection. A rejection carrying\n * `WWW-Authenticate: Bearer error=\"insufficient_scope\"` (RFC 6750 §3) means the credential is\n * valid but the granted permissions do not cover the request: Wix reports it as a dispatch\n * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector\n * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint\n * the credential in that case, because the same grant would be issued again. The remedy is a\n * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.\n * @param - ID of the Connector to authorize in the caller's target account.\n * @param - Raw provider request. Callers must not include credentials; Wix injects them at dispatch.\n */\n (\n connectorId: string,\n providerRequest: RawHttpRequest,\n options?: DispatcherDispatchOptions\n ): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n >;\n}\n\n/** @internal */\nexport function listMcpTools(httpClient: HttpClient): ListMcpToolsSignature {\n return (connectorId: string) =>\n universalListMcpTools(\n connectorId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListMcpToolsSignature {\n /**\n * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly\n * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC\n * keeps working for existing callers: the server's advertised tools/list filtered by\n * ConnectorConfig.mcp_config.allowed_tools.\n * @param - ID of the Connector whose callable MCP tools are requested.\n * @deprecated\n */\n (connectorId: string): Promise<\n NonNullablePaths<\n ListMcpToolsResponse,\n `tools` | `tools.${number}.name` | `tools.${number}.description`,\n 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Completed,\n Connector,\n ConnectorQuerySpec,\n ConnectorRegistrationOneOf,\n ConnectorsQueryBuilder,\n ConnectorsQueryResult,\n CreateConnectorRequest,\n CreateConnectorResponse,\n CredentialState,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteConnectorRequest,\n DeleteConnectorResponse,\n DispatchByAccessKeyRequest,\n DispatchRequest,\n DispatcherDispatchOptions,\n DomainEvent,\n DomainEventBodyOneOf,\n DynamicRegistration,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Exposure,\n GetConnectorRequest,\n GetConnectorResponse,\n GrantedScopes,\n HeadersEntry,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListMcpToolsRequest,\n ListMcpToolsResponse,\n McpTool,\n MessageEnvelope,\n PathParametersEntry,\n PredefinedRegistration,\n QueryConnectorsRequest,\n QueryConnectorsResponse,\n QueryParametersEntry,\n RawHttpRequest,\n RawHttpResponse,\n Redirect,\n RegistrationType,\n RestoreInfo,\n ScopeReportingState,\n SortOrder,\n Sorting,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\n StartConnectRequest,\n StartConnectRequestOwnerOneOf,\n StartConnectRequestRegistrationType,\n StartConnectResponse,\n StartConnectResponseNextActionOneOf,\n WebhookIdentityType,\n utils,\n} from './connectors-v1-connector-connectors.universal.js';\n","import {\n getConnector as publicGetConnector,\n deleteConnector as publicDeleteConnector,\n queryConnectors as publicQueryConnectors,\n typedQueryConnectors as publicTypedQueryConnectors,\n startConnect as publicStartConnect,\n dispatcherDispatch as publicDispatcherDispatch,\n listMcpTools as publicListMcpTools,\n} from './connectors-v1-connector-connectors.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ConnectorQuery,\n ConnectorsQueryBuilder,\n typedQueryConnectors as universalTypedQueryConnectors,\n} from './connectors-v1-connector-connectors.universal.js';\n\nfunction customQueryConnectors(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryConnectors(httpClient)(),\n typedQueryFunction: (query: ConnectorQuery) =>\n publicTypedQueryConnectors(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ConnectorsQueryBuilder;\n function overloadedQuery(\n query: ConnectorQuery\n ): ReturnType<typeof universalTypedQueryConnectors>;\n function overloadedQuery(query?: ConnectorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\n/** @internal */\nexport const getConnector: MaybeContext<\n BuildRESTFunction<typeof publicGetConnector> & typeof publicGetConnector\n> = /*#__PURE__*/ createRESTModule(publicGetConnector);\n/** @internal */\nexport const deleteConnector: MaybeContext<\n BuildRESTFunction<typeof publicDeleteConnector> & typeof publicDeleteConnector\n> = /*#__PURE__*/ createRESTModule(publicDeleteConnector);\nexport const startConnect: MaybeContext<\n BuildRESTFunction<typeof publicStartConnect> & typeof publicStartConnect\n> = /*#__PURE__*/ createRESTModule(publicStartConnect);\n/** @internal */\nexport const dispatcherDispatch: MaybeContext<\n BuildRESTFunction<typeof publicDispatcherDispatch> &\n typeof publicDispatcherDispatch\n> = /*#__PURE__*/ createRESTModule(publicDispatcherDispatch);\n/** @internal */\nexport const listMcpTools: MaybeContext<\n BuildRESTFunction<typeof publicListMcpTools> & typeof publicListMcpTools\n> = /*#__PURE__*/ createRESTModule(publicListMcpTools);\nexport const queryConnectors: MaybeContext<\n BuildRESTFunction<typeof customQueryConnectors> & typeof customQueryConnectors\n> = /*#__PURE__*/ createRESTModule(customQueryConnectors);\n\nexport {\n Exposure,\n ScopeReportingState,\n CredentialState,\n RegistrationType,\n SortOrder,\n StartConnectRequestRegistrationType,\n WebhookIdentityType,\n} from './connectors-v1-connector-connectors.universal.js';\nexport {\n Connector,\n ConnectorRegistrationOneOf,\n GrantedScopes,\n PredefinedRegistration,\n DynamicRegistration,\n CreateConnectorRequest,\n CreateConnectorResponse,\n GetConnectorRequest,\n GetConnectorResponse,\n DeleteConnectorRequest,\n DeleteConnectorResponse,\n QueryConnectorsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryConnectorsResponse,\n CursorPagingMetadata,\n Cursors,\n StartConnectRequest,\n StartConnectRequestOwnerOneOf,\n StartConnectResponse,\n StartConnectResponseNextActionOneOf,\n Redirect,\n Completed,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n DispatchRequest,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n HeadersEntry,\n RawHttpResponse,\n DispatchByAccessKeyRequest,\n ListMcpToolsRequest,\n ListMcpToolsResponse,\n McpTool,\n ConnectorsQueryResult,\n ConnectorsQueryBuilder,\n ConnectorQuerySpec,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\n DispatcherDispatchOptions,\n} from './connectors-v1-connector-connectors.universal.js';\nexport { utils } from './connectors-v1-connector-connectors.universal.js';\nexport {\n ExposureWithLiterals,\n ScopeReportingStateWithLiterals,\n CredentialStateWithLiterals,\n RegistrationTypeWithLiterals,\n SortOrderWithLiterals,\n StartConnectRequestRegistrationTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n ConnectorQuery,\n} from './connectors-v1-connector-connectors.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,SAAS,2CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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,sBAA2B,UAAU,EAAE,KAAK;AAAA,IAC9C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA6B;AACpD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAGO,IAAMC,gBAEK,2DAAiBA,aAAkB;AAE9C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAE9C,IAAMC,sBAGK,2DAAiBA,mBAAwB;AAEpD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMN,mBAEK,2DAAiB,qBAAqB;","names":["deleteConnector","dispatcherDispatch","getConnector","listMcpTools","queryConnectors","startConnect","import_bytes","import_rest_modules","payload","import_transform_paths","Exposure","ScopeReportingState","CredentialState","RegistrationType","SortOrder","StartConnectRequestRegistrationType","WebhookIdentityType","getConnector","sdkTransformError","deleteConnector","queryConnectors","startConnect","dispatcherDispatch","listMcpTools","getConnector","deleteConnector","queryConnectors","typedQueryConnectors","startConnect","dispatcherDispatch","listMcpTools","import_rest_modules","queryConnectors","typedQueryConnectors","getConnector","deleteConnector","startConnect","dispatcherDispatch","listMcpTools"]}
|
|
@@ -47,12 +47,17 @@ interface Connector extends ConnectorRegistrationOneOf {
|
|
|
47
47
|
* decision (dispatch, revocation, anything that gates behavior) must keep reading
|
|
48
48
|
* connectors-access-keys-store synchronously. The same rule covers filtering by this field: a query
|
|
49
49
|
* for credential_state == ACTIVE returns what the platform last believed, never a permission to use
|
|
50
|
-
* those bindings. UNKNOWN_CREDENTIAL_STATE means
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
50
|
+
* those bindings. UNKNOWN_CREDENTIAL_STATE means the row predates this projection, or its creator's
|
|
51
|
+
* own upstream state was itself unknown at creation -- never a signal of a healthy connection either
|
|
52
|
+
* way; every new row otherwise gets the real value at creation.
|
|
53
|
+
* readOnly plus CreateConnector's WIX_APPS_ONLY audience are what protect this field: it is
|
|
54
|
+
* writable() only on that one RPC, so only oauth-handler can supply the real value at creation; every
|
|
55
|
+
* other create or update path still can't touch it. Deliberately NOT field_exposure = INTERNAL, so
|
|
56
|
+
* this field stays filterable/visible to the same external callers as SiteConnector's sibling field,
|
|
57
|
+
* which was never internal. When a push
|
|
58
|
+
* carries the source event's own timestamp, that timestamp is tracked on the domain row (not exposed
|
|
59
|
+
* on this contract) and a later push older than the stored value is dropped; a push with no timestamp
|
|
60
|
+
* only ever initializes a row that has never recorded one, never overwrites an already-timestamped
|
|
56
61
|
* snapshot.
|
|
57
62
|
* @readonly
|
|
58
63
|
*/
|
|
@@ -591,6 +596,38 @@ interface RawHttpResponse {
|
|
|
591
596
|
statusCode?: number | null;
|
|
592
597
|
headers?: HeadersEntry[];
|
|
593
598
|
}
|
|
599
|
+
interface DispatchByAccessKeyRequest {
|
|
600
|
+
/**
|
|
601
|
+
* ID of the ConnectorAccessKey to dispatch under. Never authorization by itself — the caller's
|
|
602
|
+
* Plazma grant on this method is what authorizes the call; this id only selects the credential.
|
|
603
|
+
* @format GUID
|
|
604
|
+
*/
|
|
605
|
+
accessKeyId?: string;
|
|
606
|
+
/**
|
|
607
|
+
* The connector app that declares the CONNECTOR_CONFIG component to authorize this dispatch
|
|
608
|
+
* against. Supplied directly because there is no connector binding to resolve it from.
|
|
609
|
+
* @format GUID
|
|
610
|
+
*/
|
|
611
|
+
appId?: string;
|
|
612
|
+
/**
|
|
613
|
+
* The CONNECTOR_CONFIG component within that app, whose dispatch policy governs this request.
|
|
614
|
+
* @format GUID
|
|
615
|
+
*/
|
|
616
|
+
componentId?: string;
|
|
617
|
+
/** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */
|
|
618
|
+
providerRequest?: RawHttpRequest;
|
|
619
|
+
/**
|
|
620
|
+
* Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
|
|
621
|
+
* access key will not produce a second provider attempt through Wix. Scoped to the access key,
|
|
622
|
+
* so callers need only make it unique per access key. Guarantees at-most-once ATTEMPT by Wix — it
|
|
623
|
+
* cannot guarantee the provider applied the effect at most once when an attempt's outcome is
|
|
624
|
+
* unknown (timeout, connection reset). For that, include the provider's own idempotency header in
|
|
625
|
+
* provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
|
|
626
|
+
* original response, which Wix does not retain; callers needing it must store it themselves.
|
|
627
|
+
* @maxLength 128
|
|
628
|
+
*/
|
|
629
|
+
idempotencyKey?: string;
|
|
630
|
+
}
|
|
594
631
|
interface ListMcpToolsRequest {
|
|
595
632
|
/**
|
|
596
633
|
* ID of the Connector whose callable MCP tools are requested.
|
|
@@ -859,4 +896,4 @@ interface DispatcherDispatchOptions {
|
|
|
859
896
|
idempotencyKey?: string;
|
|
860
897
|
}
|
|
861
898
|
|
|
862
|
-
export { type AccountInfo, type ActionEvent, type CommonQueryWithEntityContext, type Completed, type Connector, type ConnectorQuery, type ConnectorQuerySpec, type ConnectorRegistrationOneOf, type ConnectorsQueryBuilder, type ConnectorsQueryResult, type CreateConnectorRequest, type CreateConnectorResponse, CredentialState, type CredentialStateWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteConnectorRequest, type DeleteConnectorResponse, type DispatchRequest, type DispatcherDispatchOptions, type DomainEvent, type DomainEventBodyOneOf, type DynamicRegistration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Exposure, type ExposureWithLiterals, type GetConnectorRequest, type GetConnectorResponse, type GrantedScopes, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ListMcpToolsRequest, type ListMcpToolsResponse, type McpTool, type MessageEnvelope, type PathParametersEntry, type PredefinedRegistration, type QueryConnectorsRequest, type QueryConnectorsResponse, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, type Redirect, RegistrationType, type RegistrationTypeWithLiterals, type RestoreInfo, ScopeReportingState, type ScopeReportingStateWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type StartConnectOptions, type StartConnectOptionsOwnerOneOf, type StartConnectRequest, type StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, type StartConnectRequestRegistrationTypeWithLiterals, type StartConnectResponse, type StartConnectResponseNextActionOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryConnectors, startConnect, typedQueryConnectors, utils };
|
|
899
|
+
export { type AccountInfo, type ActionEvent, type CommonQueryWithEntityContext, type Completed, type Connector, type ConnectorQuery, type ConnectorQuerySpec, type ConnectorRegistrationOneOf, type ConnectorsQueryBuilder, type ConnectorsQueryResult, type CreateConnectorRequest, type CreateConnectorResponse, CredentialState, type CredentialStateWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteConnectorRequest, type DeleteConnectorResponse, type DispatchByAccessKeyRequest, type DispatchRequest, type DispatcherDispatchOptions, type DomainEvent, type DomainEventBodyOneOf, type DynamicRegistration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Exposure, type ExposureWithLiterals, type GetConnectorRequest, type GetConnectorResponse, type GrantedScopes, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ListMcpToolsRequest, type ListMcpToolsResponse, type McpTool, type MessageEnvelope, type PathParametersEntry, type PredefinedRegistration, type QueryConnectorsRequest, type QueryConnectorsResponse, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, type Redirect, RegistrationType, type RegistrationTypeWithLiterals, type RestoreInfo, ScopeReportingState, type ScopeReportingStateWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type StartConnectOptions, type StartConnectOptionsOwnerOneOf, type StartConnectRequest, type StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, type StartConnectRequestRegistrationTypeWithLiterals, type StartConnectResponse, type StartConnectResponseNextActionOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryConnectors, startConnect, typedQueryConnectors, utils };
|