@wix/auto_sdk_connectors_connectors 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +0 -138
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +3 -124
- package/build/cjs/index.typings.js +0 -120
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -116
- package/build/cjs/meta.js +0 -100
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +0 -136
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +3 -124
- package/build/es/index.typings.mjs +0 -118
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -116
- package/build/es/meta.mjs +0 -98
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -40
- package/build/internal/cjs/index.typings.d.ts +4 -159
- package/build/internal/cjs/meta.d.ts +2 -116
- package/build/internal/es/index.d.mts +5 -40
- package/build/internal/es/index.typings.d.mts +4 -159
- package/build/internal/es/meta.d.mts +2 -116
- package/package.json +2 -2
|
@@ -550,114 +550,6 @@ interface AccountInfo {
|
|
|
550
550
|
*/
|
|
551
551
|
siteId?: string | null;
|
|
552
552
|
}
|
|
553
|
-
interface DispatchRequest {
|
|
554
|
-
/**
|
|
555
|
-
* ID of the Connector to authorize in the caller's target account.
|
|
556
|
-
* @format GUID
|
|
557
|
-
*/
|
|
558
|
-
connectorId: string;
|
|
559
|
-
/** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */
|
|
560
|
-
providerRequest: RawHttpRequest;
|
|
561
|
-
/**
|
|
562
|
-
* Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
|
|
563
|
-
* connector will not produce a second provider attempt through Wix. Scoped to the connector, so
|
|
564
|
-
* callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it
|
|
565
|
-
* cannot guarantee the provider applied the effect at most once when an attempt's outcome is
|
|
566
|
-
* unknown (timeout, connection reset). For that, include the provider's own idempotency header in
|
|
567
|
-
* provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
|
|
568
|
-
* original response, which Wix does not retain; callers needing it must store it themselves.
|
|
569
|
-
* @maxLength 128
|
|
570
|
-
*/
|
|
571
|
-
idempotencyKey?: string;
|
|
572
|
-
}
|
|
573
|
-
interface RawHttpRequest {
|
|
574
|
-
body?: Uint8Array;
|
|
575
|
-
pathParams?: PathParametersEntry[];
|
|
576
|
-
queryParams?: QueryParametersEntry[];
|
|
577
|
-
headers?: HeadersEntry[];
|
|
578
|
-
method?: string;
|
|
579
|
-
rawPath?: string;
|
|
580
|
-
rawQuery?: string;
|
|
581
|
-
}
|
|
582
|
-
interface PathParametersEntry {
|
|
583
|
-
key?: string;
|
|
584
|
-
value?: string;
|
|
585
|
-
}
|
|
586
|
-
interface QueryParametersEntry {
|
|
587
|
-
key?: string;
|
|
588
|
-
value?: string;
|
|
589
|
-
}
|
|
590
|
-
interface HeadersEntry {
|
|
591
|
-
key?: string;
|
|
592
|
-
value?: string;
|
|
593
|
-
}
|
|
594
|
-
interface RawHttpResponse {
|
|
595
|
-
body?: Uint8Array;
|
|
596
|
-
statusCode?: number | null;
|
|
597
|
-
headers?: HeadersEntry[];
|
|
598
|
-
}
|
|
599
|
-
interface DispatchByAccessKeyRequest {
|
|
600
|
-
/**
|
|
601
|
-
* ID of the ConnectorAccessKey to dispatch under. Never authorization by itself — the caller's
|
|
602
|
-
* Plazma grant on this method is what authorizes the call; this id only selects the credential.
|
|
603
|
-
* @format GUID
|
|
604
|
-
*/
|
|
605
|
-
accessKeyId?: string;
|
|
606
|
-
/**
|
|
607
|
-
* The connector app that declares the CONNECTOR_CONFIG component to authorize this dispatch
|
|
608
|
-
* against. Supplied directly because there is no connector binding to resolve it from.
|
|
609
|
-
* @format GUID
|
|
610
|
-
*/
|
|
611
|
-
appId?: string;
|
|
612
|
-
/**
|
|
613
|
-
* The CONNECTOR_CONFIG component within that app, whose dispatch policy governs this request.
|
|
614
|
-
* @format GUID
|
|
615
|
-
*/
|
|
616
|
-
componentId?: string;
|
|
617
|
-
/** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */
|
|
618
|
-
providerRequest?: RawHttpRequest;
|
|
619
|
-
/**
|
|
620
|
-
* Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
|
|
621
|
-
* access key will not produce a second provider attempt through Wix. Scoped to the access key,
|
|
622
|
-
* so callers need only make it unique per access key. Guarantees at-most-once ATTEMPT by Wix — it
|
|
623
|
-
* cannot guarantee the provider applied the effect at most once when an attempt's outcome is
|
|
624
|
-
* unknown (timeout, connection reset). For that, include the provider's own idempotency header in
|
|
625
|
-
* provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
|
|
626
|
-
* original response, which Wix does not retain; callers needing it must store it themselves.
|
|
627
|
-
* @maxLength 128
|
|
628
|
-
*/
|
|
629
|
-
idempotencyKey?: string;
|
|
630
|
-
}
|
|
631
|
-
interface ListMcpToolsRequest {
|
|
632
|
-
/**
|
|
633
|
-
* ID of the Connector whose callable MCP tools are requested.
|
|
634
|
-
* @format GUID
|
|
635
|
-
*/
|
|
636
|
-
connectorId: string;
|
|
637
|
-
}
|
|
638
|
-
interface ListMcpToolsResponse {
|
|
639
|
-
/**
|
|
640
|
-
* The server's advertised tools filtered by the connector's allowlist. Capped to match mcp_config.allowed_tools' own maximum; the runtime
|
|
641
|
-
* rejects a provider advertisement it cannot fit rather than returning an unbounded payload.
|
|
642
|
-
* @maxSize 200
|
|
643
|
-
*/
|
|
644
|
-
tools?: McpTool[];
|
|
645
|
-
}
|
|
646
|
-
/** One MCP tool as advertised by the connector's MCP server. */
|
|
647
|
-
interface McpTool {
|
|
648
|
-
/**
|
|
649
|
-
* Tool name, exactly as the server advertises it.
|
|
650
|
-
* @maxLength 128
|
|
651
|
-
*/
|
|
652
|
-
name?: string;
|
|
653
|
-
/**
|
|
654
|
-
* Human- and model-readable description of what the tool does, as provided by the server.
|
|
655
|
-
* @maxLength 10000
|
|
656
|
-
*/
|
|
657
|
-
description?: string;
|
|
658
|
-
/** JSON Schema of the tool's arguments, as provided by the server. */
|
|
659
|
-
inputSchema?: Record<string, any> | null;
|
|
660
|
-
}
|
|
661
553
|
/**
|
|
662
554
|
* Lists Connectors only in the caller's target account tenant. USER Connectors are included
|
|
663
555
|
* only for their consenting user; ACCOUNT Connectors are included for authorized account callers.
|
|
@@ -744,7 +636,7 @@ interface ConnectorsQueryBuilder {
|
|
|
744
636
|
* @fqn wix.connectors.v1.ConnectorsService.QueryConnectors
|
|
745
637
|
* @requiredField query
|
|
746
638
|
*/
|
|
747
|
-
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`,
|
|
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>>;
|
|
748
640
|
interface ConnectorQuerySpec extends QuerySpec {
|
|
749
641
|
paging: 'cursor';
|
|
750
642
|
wql: [
|
|
@@ -827,7 +719,7 @@ declare const utils: {
|
|
|
827
719
|
* @permissionId connectors:v1:connector:start_connect
|
|
828
720
|
* @fqn wix.connectors.v1.ConnectorsService.StartConnect
|
|
829
721
|
*/
|
|
830
|
-
declare function startConnect(options?: StartConnectOptions): Promise<NonNullablePaths<StartConnectResponse, `redirect.url` | `completed.accessKeyId` | `authorizationUrl`,
|
|
722
|
+
declare function startConnect(options?: StartConnectOptions): Promise<NonNullablePaths<StartConnectResponse, `redirect.url` | `completed.accessKeyId` | `authorizationUrl`, 1>>;
|
|
831
723
|
interface StartConnectOptions extends StartConnectOptionsOwnerOneOf {
|
|
832
724
|
/** Curated connect: the connector app + CONNECTOR_CONFIG component. */
|
|
833
725
|
predefinedRegistration?: PredefinedRegistration;
|
|
@@ -882,18 +774,5 @@ interface StartConnectOptionsOwnerOneOf {
|
|
|
882
774
|
*/
|
|
883
775
|
dynamicRegistration?: DynamicRegistration;
|
|
884
776
|
}
|
|
885
|
-
interface DispatcherDispatchOptions {
|
|
886
|
-
/**
|
|
887
|
-
* Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
|
|
888
|
-
* connector will not produce a second provider attempt through Wix. Scoped to the connector, so
|
|
889
|
-
* callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it
|
|
890
|
-
* cannot guarantee the provider applied the effect at most once when an attempt's outcome is
|
|
891
|
-
* unknown (timeout, connection reset). For that, include the provider's own idempotency header in
|
|
892
|
-
* provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
|
|
893
|
-
* original response, which Wix does not retain; callers needing it must store it themselves.
|
|
894
|
-
* @maxLength 128
|
|
895
|
-
*/
|
|
896
|
-
idempotencyKey?: string;
|
|
897
|
-
}
|
|
898
777
|
|
|
899
|
-
export { type AccountInfo, type ActionEvent, type CommonQueryWithEntityContext, type Completed, type Connector, type ConnectorQuery, type ConnectorQuerySpec, type ConnectorRegistrationOneOf, type ConnectorsQueryBuilder, type ConnectorsQueryResult, type CreateConnectorRequest, type CreateConnectorResponse, CredentialState, type CredentialStateWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteConnectorRequest, type DeleteConnectorResponse, type
|
|
778
|
+
export { type AccountInfo, type ActionEvent, type CommonQueryWithEntityContext, type Completed, type Connector, type ConnectorQuery, type ConnectorQuerySpec, type ConnectorRegistrationOneOf, type ConnectorsQueryBuilder, type ConnectorsQueryResult, type CreateConnectorRequest, type CreateConnectorResponse, CredentialState, type CredentialStateWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteConnectorRequest, type DeleteConnectorResponse, type DomainEvent, type DomainEventBodyOneOf, type DynamicRegistration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Exposure, type ExposureWithLiterals, type GetConnectorRequest, type GetConnectorResponse, type GrantedScopes, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type PredefinedRegistration, type QueryConnectorsRequest, type QueryConnectorsResponse, type Redirect, RegistrationType, type RegistrationTypeWithLiterals, type RestoreInfo, ScopeReportingState, type ScopeReportingStateWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type StartConnectOptions, type StartConnectOptionsOwnerOneOf, type StartConnectRequest, type StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, type StartConnectRequestRegistrationTypeWithLiterals, type StartConnectResponse, type StartConnectResponseNextActionOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryConnectors, startConnect, typedQueryConnectors, utils };
|
|
@@ -28,9 +28,7 @@ __export(index_typings_exports, {
|
|
|
28
28
|
StartConnectRequestRegistrationType: () => StartConnectRequestRegistrationType,
|
|
29
29
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
30
30
|
deleteConnector: () => deleteConnector2,
|
|
31
|
-
dispatcherDispatch: () => dispatcherDispatch2,
|
|
32
31
|
getConnector: () => getConnector2,
|
|
33
|
-
listMcpTools: () => listMcpTools2,
|
|
34
32
|
queryConnectors: () => queryConnectors2,
|
|
35
33
|
startConnect: () => startConnect2,
|
|
36
34
|
typedQueryConnectors: () => typedQueryConnectors,
|
|
@@ -45,15 +43,9 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
|
|
|
45
43
|
|
|
46
44
|
// src/connectors-v1-connector-connectors.http.ts
|
|
47
45
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
48
|
-
var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
|
|
49
|
-
var import_bytes2 = require("@wix/sdk-runtime/transformations/bytes");
|
|
50
46
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
51
47
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
52
48
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
53
|
-
function resolveWixConnectorsV1ConnectorsDispatcherServiceUrl(opts) {
|
|
54
|
-
const domainToMappings = {};
|
|
55
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
56
|
-
}
|
|
57
49
|
function resolveWixConnectorsV1ConnectorsServiceUrl(opts) {
|
|
58
50
|
const domainToMappings = {
|
|
59
51
|
"manage._base_domain_": [
|
|
@@ -214,60 +206,6 @@ function startConnect(payload) {
|
|
|
214
206
|
}
|
|
215
207
|
return __startConnect;
|
|
216
208
|
}
|
|
217
|
-
function dispatcherDispatch(payload) {
|
|
218
|
-
function __dispatcherDispatch({ host }) {
|
|
219
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
220
|
-
{
|
|
221
|
-
transformFn: import_bytes.transformSDKBytesToRESTBytes,
|
|
222
|
-
paths: [{ path: "providerRequest.body" }]
|
|
223
|
-
}
|
|
224
|
-
]);
|
|
225
|
-
const metadata = {
|
|
226
|
-
entityFqdn: "wix.connectors.v1.connector",
|
|
227
|
-
method: "POST",
|
|
228
|
-
methodFqn: "wix.connectors.v1.ConnectorsDispatcherService.Dispatch",
|
|
229
|
-
packageName: PACKAGE_NAME,
|
|
230
|
-
migrationOptions: {
|
|
231
|
-
optInTransformResponse: true
|
|
232
|
-
},
|
|
233
|
-
url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({
|
|
234
|
-
protoPath: "/v1/connectors/{connectorId}/dispatch",
|
|
235
|
-
data: serializedData,
|
|
236
|
-
host
|
|
237
|
-
}),
|
|
238
|
-
data: serializedData,
|
|
239
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
240
|
-
{
|
|
241
|
-
transformFn: import_bytes2.transformRESTBytesToSDKBytes,
|
|
242
|
-
paths: [{ path: "body" }]
|
|
243
|
-
}
|
|
244
|
-
])
|
|
245
|
-
};
|
|
246
|
-
return metadata;
|
|
247
|
-
}
|
|
248
|
-
return __dispatcherDispatch;
|
|
249
|
-
}
|
|
250
|
-
function listMcpTools(payload) {
|
|
251
|
-
function __listMcpTools({ host }) {
|
|
252
|
-
const metadata = {
|
|
253
|
-
entityFqdn: "wix.connectors.v1.connector",
|
|
254
|
-
method: "GET",
|
|
255
|
-
methodFqn: "wix.connectors.v1.ConnectorsDispatcherService.ListMcpTools",
|
|
256
|
-
packageName: PACKAGE_NAME,
|
|
257
|
-
migrationOptions: {
|
|
258
|
-
optInTransformResponse: true
|
|
259
|
-
},
|
|
260
|
-
url: resolveWixConnectorsV1ConnectorsDispatcherServiceUrl({
|
|
261
|
-
protoPath: "/v1/connectors/{connectorId}/mcp/tools",
|
|
262
|
-
data: payload,
|
|
263
|
-
host
|
|
264
|
-
}),
|
|
265
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
266
|
-
};
|
|
267
|
-
return metadata;
|
|
268
|
-
}
|
|
269
|
-
return __listMcpTools;
|
|
270
|
-
}
|
|
271
209
|
|
|
272
210
|
// src/connectors-v1-connector-connectors.universal.ts
|
|
273
211
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -467,62 +405,6 @@ async function startConnect2(options) {
|
|
|
467
405
|
throw transformedError;
|
|
468
406
|
}
|
|
469
407
|
}
|
|
470
|
-
async function dispatcherDispatch2(connectorId, providerRequest, options) {
|
|
471
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
472
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
473
|
-
connectorId,
|
|
474
|
-
providerRequest,
|
|
475
|
-
idempotencyKey: options?.idempotencyKey
|
|
476
|
-
});
|
|
477
|
-
const reqOpts = dispatcherDispatch(payload);
|
|
478
|
-
sideEffects?.onSiteCall?.();
|
|
479
|
-
try {
|
|
480
|
-
const result = await httpClient.request(reqOpts);
|
|
481
|
-
sideEffects?.onSuccess?.(result);
|
|
482
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
483
|
-
} catch (err) {
|
|
484
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
485
|
-
err,
|
|
486
|
-
{
|
|
487
|
-
spreadPathsToArguments: {},
|
|
488
|
-
explicitPathsToArguments: {
|
|
489
|
-
connectorId: "$[0]",
|
|
490
|
-
providerRequest: "$[1]",
|
|
491
|
-
idempotencyKey: "$[2].idempotencyKey"
|
|
492
|
-
},
|
|
493
|
-
singleArgumentUnchanged: false
|
|
494
|
-
},
|
|
495
|
-
["connectorId", "providerRequest", "options"]
|
|
496
|
-
);
|
|
497
|
-
sideEffects?.onError?.(err);
|
|
498
|
-
throw transformedError;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
async function listMcpTools2(connectorId) {
|
|
502
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
503
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
504
|
-
connectorId
|
|
505
|
-
});
|
|
506
|
-
const reqOpts = listMcpTools(payload);
|
|
507
|
-
sideEffects?.onSiteCall?.();
|
|
508
|
-
try {
|
|
509
|
-
const result = await httpClient.request(reqOpts);
|
|
510
|
-
sideEffects?.onSuccess?.(result);
|
|
511
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
512
|
-
} catch (err) {
|
|
513
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
514
|
-
err,
|
|
515
|
-
{
|
|
516
|
-
spreadPathsToArguments: {},
|
|
517
|
-
explicitPathsToArguments: { connectorId: "$[0]" },
|
|
518
|
-
singleArgumentUnchanged: false
|
|
519
|
-
},
|
|
520
|
-
["connectorId"]
|
|
521
|
-
);
|
|
522
|
-
sideEffects?.onError?.(err);
|
|
523
|
-
throw transformedError;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
408
|
// Annotate the CommonJS export names for ESM import in node:
|
|
527
409
|
0 && (module.exports = {
|
|
528
410
|
CredentialState,
|
|
@@ -533,9 +415,7 @@ async function listMcpTools2(connectorId) {
|
|
|
533
415
|
StartConnectRequestRegistrationType,
|
|
534
416
|
WebhookIdentityType,
|
|
535
417
|
deleteConnector,
|
|
536
|
-
dispatcherDispatch,
|
|
537
418
|
getConnector,
|
|
538
|
-
listMcpTools,
|
|
539
419
|
queryConnectors,
|
|
540
420
|
startConnect,
|
|
541
421
|
typedQueryConnectors,
|