@wix/auto_sdk_connectors_connectors 1.0.5 → 1.0.6

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.
@@ -45,6 +45,14 @@ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
45
45
  var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
46
46
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
47
47
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
48
+ var TRANSFORM_PATHS_0 = [
49
+ { path: "connector.createdDate" },
50
+ { path: "connector.updatedDate" }
51
+ ];
52
+ var TRANSFORM_PATHS_1 = [
53
+ { path: "connectors.createdDate" },
54
+ { path: "connectors.updatedDate" }
55
+ ];
48
56
  function resolveWixConnectorsV1ConnectorsServiceUrl(opts) {
49
57
  const domainToMappings = {
50
58
  "manage._base_domain_": [
@@ -122,10 +130,7 @@ function getConnector(payload) {
122
130
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
123
131
  {
124
132
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
125
- paths: [
126
- { path: "connector.createdDate" },
127
- { path: "connector.updatedDate" }
128
- ]
133
+ paths: TRANSFORM_PATHS_0
129
134
  }
130
135
  ])
131
136
  };
@@ -173,10 +178,7 @@ function queryConnectors(payload) {
173
178
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
174
179
  {
175
180
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
176
- paths: [
177
- { path: "connectors.createdDate" },
178
- { path: "connectors.updatedDate" }
179
- ]
181
+ paths: TRANSFORM_PATHS_1
180
182
  }
181
183
  ])
182
184
  };
@@ -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. 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 or a change to external_identity_label, so a scopes-only change at the shared access key\n * (neither of those) does not reach this field after creation -- it reflects scopes as of the last\n * push (a state transition or a label change), not necessarily the 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\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 1\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 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({ 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 1\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","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Connector,\n ConnectorQuery,\n ConnectorsQueryBuilder,\n QueryConnectorsResponse,\n StartConnectOptions,\n StartConnectResponse,\n deleteConnector as universalDeleteConnector,\n getConnector as universalGetConnector,\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 1\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 3\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 1\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 DomainEvent,\n DomainEventBodyOneOf,\n DynamicRegistration,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Exposure,\n GetConnectorRequest,\n GetConnectorResponse,\n GrantedScopes,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n PredefinedRegistration,\n QueryConnectorsRequest,\n QueryConnectorsResponse,\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} 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);\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 ConnectorsQueryResult,\n ConnectorsQueryBuilder,\n ConnectorQuerySpec,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\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,oBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,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,UAA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AA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC7HA,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;AAC9C,IAAMJ,mBAEK,2DAAiB,qBAAqB;","names":["deleteConnector","getConnector","queryConnectors","startConnect","import_rest_modules","payload","import_transform_paths","Exposure","ScopeReportingState","CredentialState","RegistrationType","SortOrder","StartConnectRequestRegistrationType","WebhookIdentityType","getConnector","sdkTransformError","deleteConnector","queryConnectors","startConnect","getConnector","deleteConnector","queryConnectors","typedQueryConnectors","startConnect","import_rest_modules","queryConnectors","typedQueryConnectors","getConnector","deleteConnector","startConnect"]}
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 or a change to external_identity_label, so a scopes-only change at the shared access key\n * (neither of those) does not reach this field after creation -- it reflects scopes as of the last\n * push (a state transition or a label change), not necessarily the 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 * Best-effort projection of the shared access key's external_identity_label, maintained by consuming\n * AccessKeyBindingPushed the same way as credential_state and granted_scopes -- see credential_state's\n * comment for the full advisory rule, which applies identically here. A human-readable label from the\n * provider (an org, workspace, or account name) that helps a user recognize which connection this is --\n * NEVER an identity. The identity is connector_external_id, which is immutable and INTERNAL precisely\n * because it is the identity; this field can lag, be blank, or go stale like every other advisory\n * projection, and must never be used as an authorization input or a dedup key.\n *\n * Deliberately NOT field_exposure = INTERNAL, unlike its neighbours connector_external_id and\n * consenting_user_id -- this field exists specifically so the callers this feature serves can read it.\n * credential_state carries the same explicit choice for the same reason. On a USER-exposed Connector,\n * ConnectorsService additionally omits this field from a read response to any caller other than the\n * consenting user, including a service identity admitted by mayRead's identities.service.nonEmpty\n * branch -- that redaction lives in application code, not in this contract. Never filterable or\n * sortable: querying connections by display name invites dedup-by-label, the mistake this comment\n * forbids.\n *\n * readOnly plus writable() only on CreateConnectorRequest.connector are what protect this field: only\n * that one RPC's caller can supply the real value at creation; every other create or update path still\n * can't touch it.\n * @maxLength 200\n * @readonly\n */\n externalIdentityLabel?: string;\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\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 | `externalIdentityLabel`,\n 1\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 | `connectors.${number}.externalIdentityLabel`,\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({ 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 1\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","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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\nconst TRANSFORM_PATHS_0 = [\n { path: 'connector.createdDate' },\n { path: 'connector.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [\n { path: 'connectors.createdDate' },\n { path: 'connectors.updatedDate' },\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: TRANSFORM_PATHS_0,\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: TRANSFORM_PATHS_1,\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Connector,\n ConnectorQuery,\n ConnectorsQueryBuilder,\n QueryConnectorsResponse,\n StartConnectOptions,\n StartConnectResponse,\n deleteConnector as universalDeleteConnector,\n getConnector as universalGetConnector,\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 | `externalIdentityLabel`,\n 1\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 | `connectors.${number}.externalIdentityLabel`,\n 3\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 1\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 DomainEvent,\n DomainEventBodyOneOf,\n DynamicRegistration,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Exposure,\n GetConnectorRequest,\n GetConnectorResponse,\n GrantedScopes,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n PredefinedRegistration,\n QueryConnectorsRequest,\n QueryConnectorsResponse,\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} 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);\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 ConnectorsQueryResult,\n ConnectorsQueryBuilder,\n ConnectorQuerySpec,\n StartConnectOptions,\n StartConnectOptionsOwnerOneOf,\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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;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1wCO,SAASI,cAAa,YAA+C;AAC1E,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,iBACd,YAC0B;AAC1B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAUO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CAAC,UACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC/HA,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;AAC9C,IAAMJ,mBAEK,2DAAiB,qBAAqB;","names":["deleteConnector","getConnector","queryConnectors","startConnect","import_rest_modules","payload","import_transform_paths","Exposure","ScopeReportingState","CredentialState","RegistrationType","SortOrder","StartConnectRequestRegistrationType","WebhookIdentityType","getConnector","sdkTransformError","deleteConnector","queryConnectors","startConnect","getConnector","deleteConnector","queryConnectors","typedQueryConnectors","startConnect","import_rest_modules","queryConnectors","typedQueryConnectors","getConnector","deleteConnector","startConnect"]}
@@ -83,6 +83,31 @@ interface Connector extends ConnectorRegistrationOneOf {
83
83
  componentId?: string;
84
84
  /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
85
85
  registrationType?: RegistrationTypeWithLiterals;
86
+ /**
87
+ * Best-effort projection of the shared access key's external_identity_label, maintained by consuming
88
+ * AccessKeyBindingPushed the same way as credential_state and granted_scopes -- see credential_state's
89
+ * comment for the full advisory rule, which applies identically here. A human-readable label from the
90
+ * provider (an org, workspace, or account name) that helps a user recognize which connection this is --
91
+ * NEVER an identity. The identity is connector_external_id, which is immutable and INTERNAL precisely
92
+ * because it is the identity; this field can lag, be blank, or go stale like every other advisory
93
+ * projection, and must never be used as an authorization input or a dedup key.
94
+ *
95
+ * Deliberately NOT field_exposure = INTERNAL, unlike its neighbours connector_external_id and
96
+ * consenting_user_id -- this field exists specifically so the callers this feature serves can read it.
97
+ * credential_state carries the same explicit choice for the same reason. On a USER-exposed Connector,
98
+ * ConnectorsService additionally omits this field from a read response to any caller other than the
99
+ * consenting user, including a service identity admitted by mayRead's identities.service.nonEmpty
100
+ * branch -- that redaction lives in application code, not in this contract. Never filterable or
101
+ * sortable: querying connections by display name invites dedup-by-label, the mistake this comment
102
+ * forbids.
103
+ *
104
+ * readOnly plus writable() only on CreateConnectorRequest.connector are what protect this field: only
105
+ * that one RPC's caller can supply the real value at creation; every other create or update path still
106
+ * can't touch it.
107
+ * @maxLength 200
108
+ * @readonly
109
+ */
110
+ externalIdentityLabel?: string;
86
111
  }
87
112
  /** @oneof */
88
113
  interface ConnectorRegistrationOneOf {
@@ -636,7 +661,7 @@ interface ConnectorsQueryBuilder {
636
661
  * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors
637
662
  * @requiredField query
638
663
  */
639
- declare function typedQueryConnectors(query: ConnectorQuery): Promise<NonNullablePaths<QueryConnectorsResponse, `connectors` | `connectors.${number}.predefinedRegistration.appId` | `connectors.${number}.predefinedRegistration.componentId` | `connectors.${number}.dynamicRegistration.registrationId` | `connectors.${number}.connectorSlug` | `connectors.${number}.exposure` | `connectors.${number}.credentialState` | `connectors.${number}.appId` | `connectors.${number}.componentId` | `connectors.${number}.registrationType`, 3>>;
664
+ declare function typedQueryConnectors(query: ConnectorQuery): Promise<NonNullablePaths<QueryConnectorsResponse, `connectors` | `connectors.${number}.predefinedRegistration.appId` | `connectors.${number}.predefinedRegistration.componentId` | `connectors.${number}.dynamicRegistration.registrationId` | `connectors.${number}.connectorSlug` | `connectors.${number}.exposure` | `connectors.${number}.credentialState` | `connectors.${number}.appId` | `connectors.${number}.componentId` | `connectors.${number}.registrationType` | `connectors.${number}.externalIdentityLabel`, 3>>;
640
665
  interface ConnectorQuerySpec extends QuerySpec {
641
666
  paging: 'cursor';
642
667
  wql: [
@@ -46,6 +46,14 @@ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
46
46
  var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
47
47
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
48
48
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
49
+ var TRANSFORM_PATHS_0 = [
50
+ { path: "connector.createdDate" },
51
+ { path: "connector.updatedDate" }
52
+ ];
53
+ var TRANSFORM_PATHS_1 = [
54
+ { path: "connectors.createdDate" },
55
+ { path: "connectors.updatedDate" }
56
+ ];
49
57
  function resolveWixConnectorsV1ConnectorsServiceUrl(opts) {
50
58
  const domainToMappings = {
51
59
  "manage._base_domain_": [
@@ -123,10 +131,7 @@ function getConnector(payload) {
123
131
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
124
132
  {
125
133
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
126
- paths: [
127
- { path: "connector.createdDate" },
128
- { path: "connector.updatedDate" }
129
- ]
134
+ paths: TRANSFORM_PATHS_0
130
135
  }
131
136
  ])
132
137
  };
@@ -174,10 +179,7 @@ function queryConnectors(payload) {
174
179
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
175
180
  {
176
181
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
177
- paths: [
178
- { path: "connectors.createdDate" },
179
- { path: "connectors.updatedDate" }
180
- ]
182
+ paths: TRANSFORM_PATHS_1
181
183
  }
182
184
  ])
183
185
  };