@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,862 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
+
4
+ /**
5
+ * Not a taggable product resource: it carries no OAuth credential of its own (that lives on the
6
+ * shared wix.connectors_access_keys.v1.ConnectorAccessKey), only binding data.
7
+ */
8
+ interface Connector extends ConnectorRegistrationOneOf {
9
+ /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */
10
+ predefinedRegistration?: PredefinedRegistration;
11
+ /** Dynamic owner: the provider registration this connection was created against. */
12
+ dynamicRegistration?: DynamicRegistration;
13
+ /**
14
+ * SDL derives this entity's owner from identity.targetAccountId; do not add account_id.
15
+ * @format GUID
16
+ * @readonly
17
+ */
18
+ _id?: string | null;
19
+ /**
20
+ * Optimistic-lock revision assigned by SDL.
21
+ * @readonly
22
+ */
23
+ revision?: string | null;
24
+ /**
25
+ * Time at which SDL created the Connector.
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date | null;
29
+ /**
30
+ * Time at which SDL last updated the Connector.
31
+ * @readonly
32
+ */
33
+ _updatedDate?: Date | null;
34
+ /**
35
+ * Stable identifier of the connector implementation, for example "github".
36
+ * @maxLength 80
37
+ * @immutable
38
+ */
39
+ connectorSlug?: string;
40
+ /** Whether the Connector is account-owned or restricted to the consenting user. */
41
+ exposure?: ExposureWithLiterals;
42
+ /**
43
+ * Best-effort snapshot of the shared access key's credential_state, maintained by consuming
44
+ * AccessKeyBindingPushed off connectors-access-keys-store's own state-change events. NEVER a source
45
+ * of truth and NEVER an authorization input -- under event lag this can read ACTIVE while the key is
46
+ * REVOKED. It exists only to answer "what should be shown to the user"; every credential-usability
47
+ * decision (dispatch, revocation, anything that gates behavior) must keep reading
48
+ * connectors-access-keys-store synchronously. The same rule covers filtering by this field: a query
49
+ * for credential_state == ACTIVE returns what the platform last believed, never a permission to use
50
+ * those bindings. UNKNOWN_CREDENTIAL_STATE means no push has ever arrived for the bound access key --
51
+ * including every row that predates this projection -- and is never a signal of a healthy connection.
52
+ * Server-owned: no create or update path accepts a caller-supplied value for it. When a push carries
53
+ * the source event's own timestamp, that timestamp is tracked on the domain row (not exposed on this
54
+ * contract) and a later push older than the stored value is dropped; a push with no timestamp only
55
+ * ever initializes a row that has never recorded one, never overwrites an already-timestamped
56
+ * snapshot.
57
+ * @readonly
58
+ */
59
+ credentialState?: CredentialStateWithLiterals;
60
+ /**
61
+ * Deprecated: use registration.predefined_registration.app_id. Retained for callers still on the
62
+ * flat field. Empty for a dynamic (registration-owned) connector.
63
+ * @format GUID
64
+ * @immutable
65
+ * @deprecated
66
+ * @replacedBy predefined_registration.app_id
67
+ * @targetRemovalDate 2027-06-30
68
+ */
69
+ appId?: string;
70
+ /**
71
+ * Deprecated: use registration.predefined_registration.component_id.
72
+ * @format GUID
73
+ * @immutable
74
+ * @deprecated
75
+ * @replacedBy predefined_registration.component_id
76
+ * @targetRemovalDate 2027-06-30
77
+ */
78
+ componentId?: string;
79
+ /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
80
+ registrationType?: RegistrationTypeWithLiterals;
81
+ }
82
+ /** @oneof */
83
+ interface ConnectorRegistrationOneOf {
84
+ /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */
85
+ predefinedRegistration?: PredefinedRegistration;
86
+ /** Dynamic owner: the provider registration this connection was created against. */
87
+ dynamicRegistration?: DynamicRegistration;
88
+ }
89
+ declare enum Exposure {
90
+ /** The Connector is owned and usable by its account. */
91
+ ACCOUNT = "ACCOUNT",
92
+ /** The Connector is restricted to its consenting user. */
93
+ USER = "USER"
94
+ }
95
+ /** @enumType */
96
+ type ExposureWithLiterals = Exposure | 'ACCOUNT' | 'USER';
97
+ /**
98
+ * Provider-reported granted scopes, preserving the distinction between a provider that never reports
99
+ * scopes and one that explicitly reports an empty set.
100
+ */
101
+ interface GrantedScopes {
102
+ /** Whether the provider has reported a granted-scopes set for this credential. */
103
+ reportingState?: ScopeReportingStateWithLiterals;
104
+ /**
105
+ * The scopes the provider reported. Meaningful only when reporting_state is REPORTED: an empty list
106
+ * there means the provider explicitly reported no granted scopes (known-empty), not that reporting is
107
+ * unknown.
108
+ * @maxSize 40
109
+ * @maxLength 70
110
+ */
111
+ scopes?: string[];
112
+ }
113
+ declare enum ScopeReportingState {
114
+ /** The provider has not reported a granted-scopes set for this credential. */
115
+ NOT_REPORTED = "NOT_REPORTED",
116
+ /** The provider reported a granted-scopes set, which may itself be empty. */
117
+ REPORTED = "REPORTED"
118
+ }
119
+ /** @enumType */
120
+ type ScopeReportingStateWithLiterals = ScopeReportingState | 'NOT_REPORTED' | 'REPORTED';
121
+ /** Reused verbatim from wix.connectors.v1. */
122
+ declare enum CredentialState {
123
+ ACTIVE = "ACTIVE",
124
+ REVOKED = "REVOKED"
125
+ }
126
+ /** @enumType */
127
+ type CredentialStateWithLiterals = CredentialState | 'ACTIVE' | 'REVOKED';
128
+ /** Curated owner: the connector app plus CONNECTOR_CONFIG component a connection was created against. */
129
+ interface PredefinedRegistration {
130
+ /**
131
+ * The connector app that declares the CONNECTOR_CONFIG component.
132
+ * @format GUID
133
+ * @immutable
134
+ */
135
+ appId?: string;
136
+ /**
137
+ * The CONNECTOR_CONFIG component within that app — the stable address for the connector's config.
138
+ * @format GUID
139
+ * @immutable
140
+ */
141
+ componentId?: string;
142
+ }
143
+ /**
144
+ * Dynamic owner: the wix.connectors.registry.v1.mcp_server_registration a connection was created
145
+ * against, for a DCR connector reached by URL. Shared per provider rather than per app/component.
146
+ */
147
+ interface DynamicRegistration {
148
+ /**
149
+ * The provider-registry McpServerRegistration this connection was created against.
150
+ * @format GUID
151
+ * @immutable
152
+ */
153
+ registrationId?: string;
154
+ }
155
+ /** Which kind of owner this connection belongs to. */
156
+ declare enum RegistrationType {
157
+ /** Owned by a connector app/component (curated). */
158
+ PREDEFINED = "PREDEFINED",
159
+ /** Owned by a provider registration (DCR). */
160
+ DYNAMIC = "DYNAMIC"
161
+ }
162
+ /** @enumType */
163
+ type RegistrationTypeWithLiterals = RegistrationType | 'PREDEFINED' | 'DYNAMIC';
164
+ interface CreateConnectorRequest {
165
+ /** Durable OAuth Connector to persist in the target account tenant. */
166
+ connector?: Connector;
167
+ }
168
+ interface CreateConnectorResponse {
169
+ /** The persisted Connector. */
170
+ connector?: Connector;
171
+ }
172
+ interface GetConnectorRequest {
173
+ /**
174
+ * ID of the Connector to retrieve.
175
+ * @format GUID
176
+ */
177
+ connectorId: string;
178
+ }
179
+ interface GetConnectorResponse {
180
+ /** The requested Connector. */
181
+ connector?: Connector;
182
+ }
183
+ interface DeleteConnectorRequest {
184
+ /**
185
+ * ID of the Connector to move to the trash bin.
186
+ * @format GUID
187
+ */
188
+ connectorId: string;
189
+ }
190
+ interface DeleteConnectorResponse {
191
+ }
192
+ interface QueryConnectorsRequest {
193
+ /** Filter, sort, and cursor paging arguments for Connectors in the target account tenant. */
194
+ query?: CursorQuery;
195
+ }
196
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
197
+ /**
198
+ * Cursor paging options.
199
+ *
200
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
201
+ */
202
+ cursorPaging?: CursorPaging;
203
+ /**
204
+ * Filter object.
205
+ *
206
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
207
+ */
208
+ filter?: Record<string, any> | null;
209
+ /**
210
+ * Sort object.
211
+ *
212
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
213
+ * @maxSize 5
214
+ */
215
+ sort?: Sorting[];
216
+ }
217
+ /** @oneof */
218
+ interface CursorQueryPagingMethodOneOf {
219
+ /**
220
+ * Cursor paging options.
221
+ *
222
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
223
+ */
224
+ cursorPaging?: CursorPaging;
225
+ }
226
+ interface Sorting {
227
+ /**
228
+ * Name of the field to sort by.
229
+ * @maxLength 512
230
+ */
231
+ fieldName?: string;
232
+ /** Sort order. */
233
+ order?: SortOrderWithLiterals;
234
+ }
235
+ declare enum SortOrder {
236
+ ASC = "ASC",
237
+ DESC = "DESC"
238
+ }
239
+ /** @enumType */
240
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
241
+ interface CursorPaging {
242
+ /**
243
+ * Maximum number of items to return in the results.
244
+ * @max 100
245
+ */
246
+ limit?: number | null;
247
+ /**
248
+ * Pointer to the next or previous page in the list of results.
249
+ *
250
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
251
+ * Not relevant for the first request.
252
+ * @maxLength 16000
253
+ */
254
+ cursor?: string | null;
255
+ }
256
+ interface QueryConnectorsResponse {
257
+ /** Connectors from the target account tenant. Protected fields require their own permissions. */
258
+ connectors?: Connector[];
259
+ /** Cursor information for the next or previous page. */
260
+ pagingMetadata?: CursorPagingMetadata;
261
+ }
262
+ interface CursorPagingMetadata {
263
+ /** Number of items returned in current page. */
264
+ count?: number | null;
265
+ /** Cursor strings that point to the next page, previous page, or both. */
266
+ cursors?: Cursors;
267
+ /**
268
+ * Whether there are more pages to retrieve following the current page.
269
+ *
270
+ * + `true`: Another page of results can be retrieved.
271
+ * + `false`: This is the last page.
272
+ */
273
+ hasNext?: boolean | null;
274
+ }
275
+ interface Cursors {
276
+ /**
277
+ * Cursor string pointing to the next page in the list of results.
278
+ * @maxLength 16000
279
+ */
280
+ next?: string | null;
281
+ /**
282
+ * Cursor pointing to the previous page in the list of results.
283
+ * @maxLength 16000
284
+ */
285
+ prev?: string | null;
286
+ }
287
+ interface StartConnectRequest extends StartConnectRequestOwnerOneOf {
288
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
289
+ predefinedRegistration?: PredefinedRegistration;
290
+ /**
291
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
292
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
293
+ */
294
+ dynamicRegistration?: DynamicRegistration;
295
+ /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
296
+ registrationType?: StartConnectRequestRegistrationTypeWithLiterals;
297
+ /**
298
+ * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat
299
+ * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty
300
+ * default a oneof-owner request carries, so this optional field only caps length.
301
+ * @maxLength 80
302
+ * @deprecated
303
+ * @replacedBy predefined_registration.app_id
304
+ * @targetRemovalDate 2027-06-30
305
+ */
306
+ appId?: string;
307
+ /**
308
+ * Deprecated: use owner.predefined_registration.component_id.
309
+ * @maxLength 80
310
+ * @deprecated
311
+ * @replacedBy predefined_registration.component_id
312
+ * @targetRemovalDate 2027-06-30
313
+ */
314
+ componentId?: string;
315
+ /**
316
+ * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as
317
+ * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the
318
+ * Connector's consenting_user_id and the connection is then visible only to that user.
319
+ */
320
+ exposure?: ExposureWithLiterals;
321
+ /**
322
+ * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain
323
+ * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing
324
+ * page is used. Carried through the handshake; the same URL is used for both success and error
325
+ * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so
326
+ * this optional field only caps length here — the server-side allowlist is the real URL gate.
327
+ * @maxLength 2048
328
+ */
329
+ returnUrl?: string;
330
+ }
331
+ /** @oneof */
332
+ interface StartConnectRequestOwnerOneOf {
333
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
334
+ predefinedRegistration?: PredefinedRegistration;
335
+ /**
336
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
337
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
338
+ */
339
+ dynamicRegistration?: DynamicRegistration;
340
+ }
341
+ /** Which kind of owner this connect targets. */
342
+ declare enum StartConnectRequestRegistrationType {
343
+ /** Curated owner (app_id + component_id). */
344
+ PREDEFINED = "PREDEFINED",
345
+ /** Dynamic (DCR) owner (registration_id). */
346
+ DYNAMIC = "DYNAMIC"
347
+ }
348
+ /** @enumType */
349
+ type StartConnectRequestRegistrationTypeWithLiterals = StartConnectRequestRegistrationType | 'PREDEFINED' | 'DYNAMIC';
350
+ interface StartConnectResponse extends StartConnectResponseNextActionOneOf {
351
+ /** Redirect the caller's browser to complete the connect. */
352
+ redirect?: Redirect;
353
+ /** Nothing left to do — the connect is already finished. */
354
+ completed?: Completed;
355
+ /**
356
+ * Deprecated: read `next_action.redirect.url` instead. Still populated whenever the next action IS
357
+ * a redirect, so callers that have not migrated keep working; it is simply unable to express any
358
+ * other outcome, which is why it is being replaced rather than extended.
359
+ * @format WEB_URL
360
+ * @deprecated
361
+ * @replacedBy next_action.redirect.url
362
+ * @targetRemovalDate 2027-06-30
363
+ */
364
+ authorizationUrl?: string;
365
+ }
366
+ /** @oneof */
367
+ interface StartConnectResponseNextActionOneOf {
368
+ /** Redirect the caller's browser to complete the connect. */
369
+ redirect?: Redirect;
370
+ /** Nothing left to do — the connect is already finished. */
371
+ completed?: Completed;
372
+ }
373
+ /** Redirects the caller's browser to a provider authorization URL. */
374
+ interface Redirect {
375
+ /**
376
+ * Provider authorization URL to redirect the user's browser to.
377
+ * @format WEB_URL
378
+ */
379
+ url?: string;
380
+ }
381
+ /**
382
+ * The connect is already finished and the Connector exists; no user interaction happened or is needed.
383
+ * Returned for a provider that requires no authorization at all, where there is no authorization URL
384
+ * to visit and so no callback to return through.
385
+ */
386
+ interface Completed {
387
+ /**
388
+ * Id of the access key the resulting Connector is bound to.
389
+ * @format GUID
390
+ */
391
+ accessKeyId?: string;
392
+ }
393
+ interface DomainEvent extends DomainEventBodyOneOf {
394
+ createdEvent?: EntityCreatedEvent;
395
+ updatedEvent?: EntityUpdatedEvent;
396
+ deletedEvent?: EntityDeletedEvent;
397
+ actionEvent?: ActionEvent;
398
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
399
+ _id?: string;
400
+ /**
401
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
402
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
403
+ */
404
+ entityFqdn?: string;
405
+ /**
406
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
407
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
408
+ */
409
+ slug?: string;
410
+ /** ID of the entity associated with the event. */
411
+ entityId?: string;
412
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
413
+ eventTime?: Date | null;
414
+ /**
415
+ * Whether the event was triggered as a result of a privacy regulation application
416
+ * (for example, GDPR).
417
+ */
418
+ triggeredByAnonymizeRequest?: boolean | null;
419
+ /** If present, indicates the action that triggered the event. */
420
+ originatedFrom?: string | null;
421
+ /**
422
+ * 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.
423
+ * 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.
424
+ */
425
+ entityEventSequence?: string | null;
426
+ }
427
+ /** @oneof */
428
+ interface DomainEventBodyOneOf {
429
+ createdEvent?: EntityCreatedEvent;
430
+ updatedEvent?: EntityUpdatedEvent;
431
+ deletedEvent?: EntityDeletedEvent;
432
+ actionEvent?: ActionEvent;
433
+ }
434
+ interface EntityCreatedEvent {
435
+ entity?: string;
436
+ }
437
+ interface RestoreInfo {
438
+ deletedDate?: Date | null;
439
+ }
440
+ interface EntityUpdatedEvent {
441
+ /**
442
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
443
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
444
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
445
+ */
446
+ currentEntity?: string;
447
+ }
448
+ interface EntityDeletedEvent {
449
+ /** Entity that was deleted. */
450
+ deletedEntity?: string | null;
451
+ }
452
+ interface ActionEvent {
453
+ body?: string;
454
+ }
455
+ interface Empty {
456
+ }
457
+ interface MessageEnvelope {
458
+ /**
459
+ * App instance ID.
460
+ * @format GUID
461
+ */
462
+ instanceId?: string | null;
463
+ /**
464
+ * Event type.
465
+ * @maxLength 150
466
+ */
467
+ eventType?: string;
468
+ /** The identification type and identity data. */
469
+ identity?: IdentificationData;
470
+ /** Stringify payload. */
471
+ data?: string;
472
+ /** Details related to the account */
473
+ accountInfo?: AccountInfo;
474
+ }
475
+ interface IdentificationData extends IdentificationDataIdOneOf {
476
+ /**
477
+ * ID of a site visitor that has not logged in to the site.
478
+ * @format GUID
479
+ */
480
+ anonymousVisitorId?: string;
481
+ /**
482
+ * ID of a site visitor that has logged in to the site.
483
+ * @format GUID
484
+ */
485
+ memberId?: string;
486
+ /**
487
+ * ID of a Wix user (site owner, contributor, etc.).
488
+ * @format GUID
489
+ */
490
+ wixUserId?: string;
491
+ /**
492
+ * ID of an app.
493
+ * @format GUID
494
+ */
495
+ appId?: string;
496
+ /** @readonly */
497
+ identityType?: WebhookIdentityTypeWithLiterals;
498
+ }
499
+ /** @oneof */
500
+ interface IdentificationDataIdOneOf {
501
+ /**
502
+ * ID of a site visitor that has not logged in to the site.
503
+ * @format GUID
504
+ */
505
+ anonymousVisitorId?: string;
506
+ /**
507
+ * ID of a site visitor that has logged in to the site.
508
+ * @format GUID
509
+ */
510
+ memberId?: string;
511
+ /**
512
+ * ID of a Wix user (site owner, contributor, etc.).
513
+ * @format GUID
514
+ */
515
+ wixUserId?: string;
516
+ /**
517
+ * ID of an app.
518
+ * @format GUID
519
+ */
520
+ appId?: string;
521
+ }
522
+ declare enum WebhookIdentityType {
523
+ UNKNOWN = "UNKNOWN",
524
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
525
+ MEMBER = "MEMBER",
526
+ WIX_USER = "WIX_USER",
527
+ APP = "APP"
528
+ }
529
+ /** @enumType */
530
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
531
+ interface AccountInfo {
532
+ /**
533
+ * ID of the Wix account associated with the event.
534
+ * @format GUID
535
+ */
536
+ accountId?: string | null;
537
+ /**
538
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
539
+ * @format GUID
540
+ */
541
+ parentAccountId?: string | null;
542
+ /**
543
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
544
+ * @format GUID
545
+ */
546
+ siteId?: string | null;
547
+ }
548
+ interface DispatchRequest {
549
+ /**
550
+ * ID of the Connector to authorize in the caller's target account.
551
+ * @format GUID
552
+ */
553
+ connectorId: string;
554
+ /** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */
555
+ providerRequest: RawHttpRequest;
556
+ /**
557
+ * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
558
+ * connector will not produce a second provider attempt through Wix. Scoped to the connector, so
559
+ * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it
560
+ * cannot guarantee the provider applied the effect at most once when an attempt's outcome is
561
+ * unknown (timeout, connection reset). For that, include the provider's own idempotency header in
562
+ * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
563
+ * original response, which Wix does not retain; callers needing it must store it themselves.
564
+ * @maxLength 128
565
+ */
566
+ idempotencyKey?: string;
567
+ }
568
+ interface RawHttpRequest {
569
+ body?: Uint8Array;
570
+ pathParams?: PathParametersEntry[];
571
+ queryParams?: QueryParametersEntry[];
572
+ headers?: HeadersEntry[];
573
+ method?: string;
574
+ rawPath?: string;
575
+ rawQuery?: string;
576
+ }
577
+ interface PathParametersEntry {
578
+ key?: string;
579
+ value?: string;
580
+ }
581
+ interface QueryParametersEntry {
582
+ key?: string;
583
+ value?: string;
584
+ }
585
+ interface HeadersEntry {
586
+ key?: string;
587
+ value?: string;
588
+ }
589
+ interface RawHttpResponse {
590
+ body?: Uint8Array;
591
+ statusCode?: number | null;
592
+ headers?: HeadersEntry[];
593
+ }
594
+ interface ListMcpToolsRequest {
595
+ /**
596
+ * ID of the Connector whose callable MCP tools are requested.
597
+ * @format GUID
598
+ */
599
+ connectorId: string;
600
+ }
601
+ interface ListMcpToolsResponse {
602
+ /**
603
+ * The server's advertised tools filtered by the connector's allowlist. Capped to match mcp_config.allowed_tools' own maximum; the runtime
604
+ * rejects a provider advertisement it cannot fit rather than returning an unbounded payload.
605
+ * @maxSize 200
606
+ */
607
+ tools?: McpTool[];
608
+ }
609
+ /** One MCP tool as advertised by the connector's MCP server. */
610
+ interface McpTool {
611
+ /**
612
+ * Tool name, exactly as the server advertises it.
613
+ * @maxLength 128
614
+ */
615
+ name?: string;
616
+ /**
617
+ * Human- and model-readable description of what the tool does, as provided by the server.
618
+ * @maxLength 10000
619
+ */
620
+ description?: string;
621
+ /** JSON Schema of the tool's arguments, as provided by the server. */
622
+ inputSchema?: Record<string, any> | null;
623
+ }
624
+ /**
625
+ * Lists Connectors only in the caller's target account tenant. USER Connectors are included
626
+ * only for their consenting user; ACCOUNT Connectors are included for authorized account callers.
627
+ * @public
628
+ * @documentationMaturity preview
629
+ * @permissionId connectors:v1:connector:query_connectors
630
+ * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors
631
+ */
632
+ declare function queryConnectors(): ConnectorsQueryBuilder;
633
+ interface QueryCursorResult {
634
+ cursors: Cursors;
635
+ hasNext: () => boolean;
636
+ hasPrev: () => boolean;
637
+ length: number;
638
+ pageSize: number;
639
+ }
640
+ interface ConnectorsQueryResult extends QueryCursorResult {
641
+ items: Connector[];
642
+ query: ConnectorsQueryBuilder;
643
+ next: () => Promise<ConnectorsQueryResult>;
644
+ prev: () => Promise<ConnectorsQueryResult>;
645
+ }
646
+ interface ConnectorsQueryBuilder {
647
+ /** @param propertyName - Property whose value is compared with `value`.
648
+ * @param value - Value to compare against.
649
+ * @documentationMaturity preview
650
+ */
651
+ eq: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType', value: any) => ConnectorsQueryBuilder;
652
+ /** @param propertyName - Property whose value is compared with `value`.
653
+ * @param value - Value to compare against.
654
+ * @documentationMaturity preview
655
+ */
656
+ ne: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType', value: any) => ConnectorsQueryBuilder;
657
+ /** @param propertyName - Property whose value is compared with `value`.
658
+ * @param value - Value to compare against.
659
+ * @documentationMaturity preview
660
+ */
661
+ ge: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'appId' | 'componentId', value: any) => ConnectorsQueryBuilder;
662
+ /** @param propertyName - Property whose value is compared with `value`.
663
+ * @param value - Value to compare against.
664
+ * @documentationMaturity preview
665
+ */
666
+ gt: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'appId' | 'componentId', value: any) => ConnectorsQueryBuilder;
667
+ /** @param propertyName - Property whose value is compared with `value`.
668
+ * @param value - Value to compare against.
669
+ * @documentationMaturity preview
670
+ */
671
+ le: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'appId' | 'componentId', value: any) => ConnectorsQueryBuilder;
672
+ /** @param propertyName - Property whose value is compared with `value`.
673
+ * @param value - Value to compare against.
674
+ * @documentationMaturity preview
675
+ */
676
+ lt: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'appId' | 'componentId', value: any) => ConnectorsQueryBuilder;
677
+ /** @param propertyName - Property whose value is compared with `string`.
678
+ * @param string - String to compare against. Case-insensitive.
679
+ * @documentationMaturity preview
680
+ */
681
+ startsWith: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'appId' | 'componentId', value: string) => ConnectorsQueryBuilder;
682
+ /** @documentationMaturity preview */
683
+ in: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType', value: any) => ConnectorsQueryBuilder;
684
+ /** @documentationMaturity preview */
685
+ exists: (propertyName: 'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType', value: boolean) => ConnectorsQueryBuilder;
686
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
687
+ * @documentationMaturity preview
688
+ */
689
+ ascending: (...propertyNames: Array<'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType'>) => ConnectorsQueryBuilder;
690
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
691
+ * @documentationMaturity preview
692
+ */
693
+ descending: (...propertyNames: Array<'predefinedRegistration.appId' | 'predefinedRegistration.componentId' | 'dynamicRegistration.registrationId' | '_id' | 'connectorSlug' | 'exposure' | 'credentialState' | 'appId' | 'componentId' | 'registrationType'>) => ConnectorsQueryBuilder;
694
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
695
+ * @documentationMaturity preview
696
+ */
697
+ limit: (limit: number) => ConnectorsQueryBuilder;
698
+ /** @param cursor - A pointer to specific record
699
+ * @documentationMaturity preview
700
+ */
701
+ skipTo: (cursor: string) => ConnectorsQueryBuilder;
702
+ /** @documentationMaturity preview */
703
+ find: () => Promise<ConnectorsQueryResult>;
704
+ }
705
+ /**
706
+ * @hidden
707
+ * @fqn wix.connectors.v1.ConnectorsService.QueryConnectors
708
+ * @requiredField query
709
+ */
710
+ 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`, 5>>;
711
+ interface ConnectorQuerySpec extends QuerySpec {
712
+ paging: 'cursor';
713
+ wql: [
714
+ {
715
+ fields: [
716
+ '_id',
717
+ 'appId',
718
+ 'componentId',
719
+ 'connectorSlug',
720
+ 'credentialState',
721
+ 'dynamicRegistration.registrationId',
722
+ 'exposure',
723
+ 'predefinedRegistration.appId',
724
+ 'predefinedRegistration.componentId',
725
+ 'registrationType'
726
+ ];
727
+ operators: '*';
728
+ sort: 'BOTH';
729
+ }
730
+ ];
731
+ }
732
+ type CommonQueryWithEntityContext = Query<Connector, ConnectorQuerySpec>;
733
+ type ConnectorQuery = {
734
+ /**
735
+ Cursor paging options.
736
+
737
+ Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
738
+ */
739
+ cursorPaging?: {
740
+ /**
741
+ Maximum number of items to return in the results.
742
+ @max: 100
743
+ */
744
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
745
+ /**
746
+ Pointer to the next or previous page in the list of results.
747
+
748
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
749
+ Not relevant for the first request.
750
+ @maxLength: 16000
751
+ */
752
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
753
+ };
754
+ /**
755
+ Filter object.
756
+
757
+ Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
758
+ */
759
+ filter?: CommonQueryWithEntityContext['filter'] | null;
760
+ /**
761
+ Sort object.
762
+
763
+ Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
764
+ @maxSize: 5
765
+ */
766
+ sort?: {
767
+ /**
768
+ Name of the field to sort by.
769
+ @maxLength: 512
770
+ */
771
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
772
+ /**
773
+ Sort order.
774
+ */
775
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
776
+ }[];
777
+ };
778
+ declare const utils: {
779
+ query: _wix_sdk_types.QueryHelpers<Connector, ConnectorQuerySpec, ConnectorQuery>;
780
+ };
781
+ /**
782
+ * Starts an OAuth connect for a connector component, under the caller's identity.targetAccountId.
783
+ * Asks oauth-handler to generate the provider authorization URL: it mints an unguessable, one-time
784
+ * state, caches the trusted completion context (PKCE verifier when configured) in WixCache with a
785
+ * short TTL, and returns the URL to redirect the user's browser to. Does not create a Connector —
786
+ * a Connector exists only after the OAuth callback completes. Does not install an app or call
787
+ * any app-installation API.
788
+ * @public
789
+ * @documentationMaturity preview
790
+ * @permissionId connectors:v1:connector:start_connect
791
+ * @fqn wix.connectors.v1.ConnectorsService.StartConnect
792
+ */
793
+ declare function startConnect(options?: StartConnectOptions): Promise<NonNullablePaths<StartConnectResponse, `redirect.url` | `completed.accessKeyId` | `authorizationUrl`, 3>>;
794
+ interface StartConnectOptions extends StartConnectOptionsOwnerOneOf {
795
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
796
+ predefinedRegistration?: PredefinedRegistration;
797
+ /**
798
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
799
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
800
+ */
801
+ dynamicRegistration?: DynamicRegistration;
802
+ /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
803
+ registrationType?: StartConnectRequestRegistrationTypeWithLiterals;
804
+ /**
805
+ * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat
806
+ * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty
807
+ * default a oneof-owner request carries, so this optional field only caps length.
808
+ * @maxLength 80
809
+ * @deprecated
810
+ * @replacedBy predefined_registration.app_id
811
+ * @targetRemovalDate 2027-06-30
812
+ */
813
+ appId?: string;
814
+ /**
815
+ * Deprecated: use owner.predefined_registration.component_id.
816
+ * @maxLength 80
817
+ * @deprecated
818
+ * @replacedBy predefined_registration.component_id
819
+ * @targetRemovalDate 2027-06-30
820
+ */
821
+ componentId?: string;
822
+ /**
823
+ * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as
824
+ * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the
825
+ * Connector's consenting_user_id and the connection is then visible only to that user.
826
+ */
827
+ exposure?: ExposureWithLiterals;
828
+ /**
829
+ * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain
830
+ * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing
831
+ * page is used. Carried through the handshake; the same URL is used for both success and error
832
+ * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so
833
+ * this optional field only caps length here — the server-side allowlist is the real URL gate.
834
+ * @maxLength 2048
835
+ */
836
+ returnUrl?: string;
837
+ }
838
+ /** @oneof */
839
+ interface StartConnectOptionsOwnerOneOf {
840
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
841
+ predefinedRegistration?: PredefinedRegistration;
842
+ /**
843
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
844
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
845
+ */
846
+ dynamicRegistration?: DynamicRegistration;
847
+ }
848
+ interface DispatcherDispatchOptions {
849
+ /**
850
+ * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
851
+ * connector will not produce a second provider attempt through Wix. Scoped to the connector, so
852
+ * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it
853
+ * cannot guarantee the provider applied the effect at most once when an attempt's outcome is
854
+ * unknown (timeout, connection reset). For that, include the provider's own idempotency header in
855
+ * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
856
+ * original response, which Wix does not retain; callers needing it must store it themselves.
857
+ * @maxLength 128
858
+ */
859
+ idempotencyKey?: string;
860
+ }
861
+
862
+ export { type AccountInfo, type ActionEvent, type CommonQueryWithEntityContext, type Completed, type Connector, type ConnectorQuery, type ConnectorQuerySpec, type ConnectorRegistrationOneOf, type ConnectorsQueryBuilder, type ConnectorsQueryResult, type CreateConnectorRequest, type CreateConnectorResponse, CredentialState, type CredentialStateWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteConnectorRequest, type DeleteConnectorResponse, type DispatchRequest, type DispatcherDispatchOptions, type DomainEvent, type DomainEventBodyOneOf, type DynamicRegistration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Exposure, type ExposureWithLiterals, type GetConnectorRequest, type GetConnectorResponse, type GrantedScopes, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ListMcpToolsRequest, type ListMcpToolsResponse, type McpTool, type MessageEnvelope, type PathParametersEntry, type PredefinedRegistration, type QueryConnectorsRequest, type QueryConnectorsResponse, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, type Redirect, RegistrationType, type RegistrationTypeWithLiterals, type RestoreInfo, ScopeReportingState, type ScopeReportingStateWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type StartConnectOptions, type StartConnectOptionsOwnerOneOf, type StartConnectRequest, type StartConnectRequestOwnerOneOf, StartConnectRequestRegistrationType, type StartConnectRequestRegistrationTypeWithLiterals, type StartConnectResponse, type StartConnectResponseNextActionOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryConnectors, startConnect, typedQueryConnectors, utils };