@wix/auto_sdk_connectors_connectors 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,89 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Connector, StartConnectOptions, StartConnectResponse, RawHttpRequest, DispatcherDispatchOptions, RawHttpResponse, ListMcpToolsResponse, ConnectorsQueryBuilder, ConnectorQuery, typedQueryConnectors } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, CommonQueryWithEntityContext, Completed, ConnectorQuerySpec, ConnectorRegistrationOneOf, ConnectorsQueryResult, CreateConnectorRequest, CreateConnectorResponse, CredentialState, CredentialStateWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteConnectorRequest, DeleteConnectorResponse, DispatchRequest, DomainEvent, DomainEventBodyOneOf, DynamicRegistration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Exposure, ExposureWithLiterals, GetConnectorRequest, GetConnectorResponse, GrantedScopes, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ListMcpToolsRequest, McpTool, MessageEnvelope, PathParametersEntry, PredefinedRegistration, QueryConnectorsRequest, QueryConnectorsResponse, QueryParametersEntry, Redirect, RegistrationType, RegistrationTypeWithLiterals, RestoreInfo, ScopeReportingState, ScopeReportingStateWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, StartConnectOptionsOwnerOneOf, StartConnectRequest, StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, StartConnectRequestRegistrationTypeWithLiterals, StartConnectResponseNextActionOneOf, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
4
+
5
+ /** @internal */
6
+ declare function getConnector$1(httpClient: HttpClient): GetConnectorSignature;
7
+ interface GetConnectorSignature {
8
+ /**
9
+ * Retrieves one Connector in the caller's target account tenant. USER Connectors are visible
10
+ * to their consenting user or to a server-signed app authorized by get_connector; ACCOUNT
11
+ * Connectors are visible to authorized account callers.
12
+ * @param - ID of the Connector to retrieve.
13
+ * @returns The requested Connector.
14
+ */
15
+ (connectorId: string): Promise<NonNullablePaths<Connector, `predefinedRegistration.appId` | `predefinedRegistration.componentId` | `dynamicRegistration.registrationId` | `connectorSlug` | `exposure` | `credentialState` | `appId` | `componentId` | `registrationType`, 3>>;
16
+ }
17
+ /** @internal */
18
+ declare function deleteConnector$1(httpClient: HttpClient): DeleteConnectorSignature;
19
+ interface DeleteConnectorSignature {
20
+ /**
21
+ * Moves a Connector to the trash bin, disconnecting it from future use.
22
+ *
23
+ * Removing the binding does not revoke the provider authorization: the access key is shared, and other
24
+ * account or site bindings may still depend on it. Reclaiming an unreferenced access key is the
25
+ * access key owner's job, not this method's.
26
+ * @param - ID of the Connector to move to the trash bin.
27
+ */
28
+ (connectorId: string): Promise<void>;
29
+ }
30
+ declare function startConnect$1(httpClient: HttpClient): StartConnectSignature;
31
+ interface StartConnectSignature {
32
+ /**
33
+ * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.
34
+ * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time
35
+ * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a
36
+ * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —
37
+ * a Connector exists only after the OAuth callback completes. Does not install an app or call
38
+ * any app-installation API.
39
+ */
40
+ (options?: StartConnectOptions): Promise<NonNullablePaths<StartConnectResponse, `redirect.url` | `completed.accessKeyId` | `authorizationUrl`, 3>>;
41
+ }
42
+ /** @internal */
43
+ declare function dispatcherDispatch$1(httpClient: HttpClient): DispatcherDispatchSignature;
44
+ interface DispatcherDispatchSignature {
45
+ /**
46
+ * Dispatches one provider request using credentials owned and injected by Wix.
47
+ *
48
+ * The provider's answer is returned as-is, including a rejection. A rejection carrying
49
+ * `WWW-Authenticate: Bearer error="insufficient_scope"` (RFC 6750 §3) means the credential is
50
+ * valid but the granted permissions do not cover the request: Wix reports it as a dispatch
51
+ * rejection with reason `insufficient_scope`, so a permission gap affecting a whole connector
52
+ * fleet is visible rather than showing up as an unexplained 403. Wix does not retry or re-mint
53
+ * the credential in that case, because the same grant would be issued again. The remedy is a
54
+ * full reconnect of the affected connector — see ConnectorConfig.OAuthConfig.default_scopes.
55
+ * @param - ID of the Connector to authorize in the caller's target account.
56
+ * @param - Raw provider request. Callers must not include credentials; Wix injects them at dispatch.
57
+ */
58
+ (connectorId: string, providerRequest: RawHttpRequest, options?: DispatcherDispatchOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
59
+ }
60
+ /** @internal */
61
+ declare function listMcpTools$1(httpClient: HttpClient): ListMcpToolsSignature;
62
+ interface ListMcpToolsSignature {
63
+ /**
64
+ * Deprecated: the MCP surface moved to connectors-mcp-proxy — speak MCP to it directly
65
+ * (its tools/list answer is filtered by the connector's allowlist the same way). This RPC
66
+ * keeps working for existing callers: the server's advertised tools/list filtered by
67
+ * ConnectorConfig.mcp_config.allowed_tools.
68
+ * @param - ID of the Connector whose callable MCP tools are requested.
69
+ * @deprecated
70
+ */
71
+ (connectorId: string): Promise<NonNullablePaths<ListMcpToolsResponse, `tools` | `tools.${number}.name` | `tools.${number}.description`, 4>>;
72
+ }
73
+
74
+ declare function customQueryConnectors(httpClient: HttpClient): {
75
+ (): ConnectorsQueryBuilder;
76
+ (query: ConnectorQuery): ReturnType<typeof typedQueryConnectors>;
77
+ };
78
+ /** @internal */
79
+ declare const getConnector: MaybeContext<BuildRESTFunction<typeof getConnector$1> & typeof getConnector$1>;
80
+ /** @internal */
81
+ declare const deleteConnector: MaybeContext<BuildRESTFunction<typeof deleteConnector$1> & typeof deleteConnector$1>;
82
+ declare const startConnect: MaybeContext<BuildRESTFunction<typeof startConnect$1> & typeof startConnect$1>;
83
+ /** @internal */
84
+ declare const dispatcherDispatch: MaybeContext<BuildRESTFunction<typeof dispatcherDispatch$1> & typeof dispatcherDispatch$1>;
85
+ /** @internal */
86
+ declare const listMcpTools: MaybeContext<BuildRESTFunction<typeof listMcpTools$1> & typeof listMcpTools$1>;
87
+ declare const queryConnectors: MaybeContext<BuildRESTFunction<typeof customQueryConnectors> & typeof customQueryConnectors>;
88
+
89
+ export { Connector, ConnectorQuery, ConnectorsQueryBuilder, DispatcherDispatchOptions, ListMcpToolsResponse, RawHttpRequest, RawHttpResponse, StartConnectOptions, StartConnectResponse, deleteConnector, dispatcherDispatch, getConnector, listMcpTools, queryConnectors, startConnect };