@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,752 @@
1
+ import { GetConnectorRequest as GetConnectorRequest$1, GetConnectorResponse as GetConnectorResponse$1, DeleteConnectorRequest as DeleteConnectorRequest$1, DeleteConnectorResponse as DeleteConnectorResponse$1, QueryConnectorsRequest as QueryConnectorsRequest$1, QueryConnectorsResponse as QueryConnectorsResponse$1, StartConnectRequest as StartConnectRequest$1, StartConnectResponse as StartConnectResponse$1, DispatchRequest as DispatchRequest$1, RawHttpResponse as RawHttpResponse$1, ListMcpToolsRequest as ListMcpToolsRequest$1, ListMcpToolsResponse as ListMcpToolsResponse$1 } from './index.typings.js';
2
+ import '@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
+ /**
41
+ * The provider-side subject this connection is about, and the value inbound webhook deliveries are
42
+ * attributed by: it must be byte-identical to what a delivery carries at the pointer the connector's
43
+ * WebhookConfig.provider_tenant_id_json_pointer names. Which value that is follows from where
44
+ * OAuthConfig.identity_operation.response_id_json_pointer points, so aim that pointer at whatever the
45
+ * provider's webhooks are about -- usually a workspace, team or installation rather than the individual
46
+ * user who consented. This PII also participates in the account-local uniqueness constraint.
47
+ *
48
+ * For a connector whose WebhookConfig declares verification_source = CONNECTOR_WIDE, a non-empty
49
+ * provider_tenant_id_json_pointer, and unique_callback_path = false, that byte-identity is a hard
50
+ * contract, not advice: connectors-webhooks uses this value as the provider tenant identity when it
51
+ * builds the shared-delivery fan-out route for this connector, so a mismatch means the account's
52
+ * deliveries verify but resolve no route and are refused. Config validation enforces the
53
+ * precondition of that contract: such a connector is rejected unless it also names
54
+ * OAuthConfig.identity_operation.response_id_json_pointer, because a connector that names no
55
+ * identity pointer produces no external id for a delivery to be matched against. The equivalence
56
+ * itself stays unvalidated and remains the responsibility of whoever configures the two pointers:
57
+ * they address different documents -- the provider's identity response and an inbound delivery
58
+ * body -- so only a live delivery can show that they select the same value.
59
+ * @internal
60
+ * @maxLength 200
61
+ */
62
+ connectorExternalId?: string;
63
+ /**
64
+ * Wix user who consented to this private Connector. Required when exposure is USER.
65
+ * @internal
66
+ * @format GUID
67
+ * @immutable
68
+ */
69
+ consentingUserId?: string;
70
+ /** Whether the Connector is account-owned or restricted to the consenting user. */
71
+ exposure?: ExposureWithLiterals;
72
+ /**
73
+ * Best-effort projection of the shared access key's granted scopes, maintained by consuming
74
+ * AccessKeyBindingPushed -- see credential_state's comment for the full advisory rule, which applies
75
+ * identically here. Carried as the GrantedScopes message rather than a bare repeated string so a
76
+ * provider that never reports scopes (reporting_state NOT_REPORTED) stays distinguishable from one
77
+ * that explicitly reported an empty set (REPORTED with no scopes); flattening the two would turn an
78
+ * unknown into a false negative for anyone reading this field. Server-owned: no create or update path
79
+ * accepts a caller-supplied value for it. The producer only emits AccessKeyBindingPushed on a
80
+ * credential_state transition, so a scopes-only change at the shared access key (no state transition)
81
+ * does not reach this field -- it reflects scopes as of the last state transition, not necessarily the
82
+ * shared key's current scopes.
83
+ * @internal
84
+ * @readonly
85
+ */
86
+ grantedScopes?: GrantedScopes;
87
+ /**
88
+ * Best-effort snapshot of the shared access key's credential_state, maintained by consuming
89
+ * AccessKeyBindingPushed off connectors-access-keys-store's own state-change events. NEVER a source
90
+ * of truth and NEVER an authorization input -- under event lag this can read ACTIVE while the key is
91
+ * REVOKED. It exists only to answer "what should be shown to the user"; every credential-usability
92
+ * decision (dispatch, revocation, anything that gates behavior) must keep reading
93
+ * connectors-access-keys-store synchronously. The same rule covers filtering by this field: a query
94
+ * for credential_state == ACTIVE returns what the platform last believed, never a permission to use
95
+ * those bindings. UNKNOWN_CREDENTIAL_STATE means no push has ever arrived for the bound access key --
96
+ * including every row that predates this projection -- and is never a signal of a healthy connection.
97
+ * Server-owned: no create or update path accepts a caller-supplied value for it. When a push carries
98
+ * the source event's own timestamp, that timestamp is tracked on the domain row (not exposed on this
99
+ * contract) and a later push older than the stored value is dropped; a push with no timestamp only
100
+ * ever initializes a row that has never recorded one, never overwrites an already-timestamped
101
+ * snapshot.
102
+ * @readonly
103
+ */
104
+ credentialState?: CredentialStateWithLiterals;
105
+ /**
106
+ * Deprecated: use registration.predefined_registration.app_id. Retained for callers still on the
107
+ * flat field. Empty for a dynamic (registration-owned) connector.
108
+ * @format GUID
109
+ * @immutable
110
+ * @deprecated
111
+ * @replacedBy predefined_registration.app_id
112
+ * @targetRemovalDate 2027-06-30
113
+ */
114
+ appId?: string;
115
+ /**
116
+ * Deprecated: use registration.predefined_registration.component_id.
117
+ * @format GUID
118
+ * @immutable
119
+ * @deprecated
120
+ * @replacedBy predefined_registration.component_id
121
+ * @targetRemovalDate 2027-06-30
122
+ */
123
+ componentId?: string;
124
+ /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
125
+ registrationType?: RegistrationTypeWithLiterals;
126
+ /**
127
+ * Shared access-key binding identity: the access key this connection is bound to. Within an
128
+ * account, one binding per scope is allowed, where an ACCOUNT connector uses the empty scope and a
129
+ * USER connector uses its consenting user -- so a key admits one account-wide binding alongside one
130
+ * binding per user in that account, and a second binding of the same key in the same scope within
131
+ * the same account is rejected; the same key may be bound again in a different account, since the
132
+ * index is scoped by tenant. Required on every connector: it backs the table's sole unique index,
133
+ * so a connector cannot be stored without one.
134
+ * @internal
135
+ * @format GUID
136
+ * @immutable
137
+ */
138
+ accessKeyId?: string | null;
139
+ }
140
+ /** @oneof */
141
+ interface ConnectorRegistrationOneOf {
142
+ /** Curated owner: the connector app + CONNECTOR_CONFIG component this connection was created against. */
143
+ predefinedRegistration?: PredefinedRegistration;
144
+ /** Dynamic owner: the provider registration this connection was created against. */
145
+ dynamicRegistration?: DynamicRegistration;
146
+ }
147
+ declare enum Exposure {
148
+ /** The Connector is owned and usable by its account. */
149
+ ACCOUNT = "ACCOUNT",
150
+ /** The Connector is restricted to its consenting user. */
151
+ USER = "USER"
152
+ }
153
+ /** @enumType */
154
+ type ExposureWithLiterals = Exposure | 'ACCOUNT' | 'USER';
155
+ /**
156
+ * Provider-reported granted scopes, preserving the distinction between a provider that never reports
157
+ * scopes and one that explicitly reports an empty set.
158
+ */
159
+ interface GrantedScopes {
160
+ /** Whether the provider has reported a granted-scopes set for this credential. */
161
+ reportingState?: ScopeReportingStateWithLiterals;
162
+ /**
163
+ * The scopes the provider reported. Meaningful only when reporting_state is REPORTED: an empty list
164
+ * there means the provider explicitly reported no granted scopes (known-empty), not that reporting is
165
+ * unknown.
166
+ * @maxSize 40
167
+ * @maxLength 70
168
+ */
169
+ scopes?: string[];
170
+ }
171
+ declare enum ScopeReportingState {
172
+ /** The provider has not reported a granted-scopes set for this credential. */
173
+ NOT_REPORTED = "NOT_REPORTED",
174
+ /** The provider reported a granted-scopes set, which may itself be empty. */
175
+ REPORTED = "REPORTED"
176
+ }
177
+ /** @enumType */
178
+ type ScopeReportingStateWithLiterals = ScopeReportingState | 'NOT_REPORTED' | 'REPORTED';
179
+ /** Reused verbatim from wix.connectors.v1. */
180
+ declare enum CredentialState {
181
+ ACTIVE = "ACTIVE",
182
+ REVOKED = "REVOKED"
183
+ }
184
+ /** @enumType */
185
+ type CredentialStateWithLiterals = CredentialState | 'ACTIVE' | 'REVOKED';
186
+ /** Curated owner: the connector app plus CONNECTOR_CONFIG component a connection was created against. */
187
+ interface PredefinedRegistration {
188
+ /**
189
+ * The connector app that declares the CONNECTOR_CONFIG component.
190
+ * @format GUID
191
+ * @immutable
192
+ */
193
+ appId?: string;
194
+ /**
195
+ * The CONNECTOR_CONFIG component within that app — the stable address for the connector's config.
196
+ * @format GUID
197
+ * @immutable
198
+ */
199
+ componentId?: string;
200
+ }
201
+ /**
202
+ * Dynamic owner: the wix.connectors.registry.v1.mcp_server_registration a connection was created
203
+ * against, for a DCR connector reached by URL. Shared per provider rather than per app/component.
204
+ */
205
+ interface DynamicRegistration {
206
+ /**
207
+ * The provider-registry McpServerRegistration this connection was created against.
208
+ * @format GUID
209
+ * @immutable
210
+ */
211
+ registrationId?: string;
212
+ }
213
+ /** Which kind of owner this connection belongs to. */
214
+ declare enum RegistrationType {
215
+ /** Owned by a connector app/component (curated). */
216
+ PREDEFINED = "PREDEFINED",
217
+ /** Owned by a provider registration (DCR). */
218
+ DYNAMIC = "DYNAMIC"
219
+ }
220
+ /** @enumType */
221
+ type RegistrationTypeWithLiterals = RegistrationType | 'PREDEFINED' | 'DYNAMIC';
222
+ interface CreateConnectorRequest {
223
+ /** Durable OAuth Connector to persist in the target account tenant. */
224
+ connector?: Connector;
225
+ }
226
+ interface CreateConnectorResponse {
227
+ /** The persisted Connector. */
228
+ connector?: Connector;
229
+ }
230
+ interface GetConnectorRequest {
231
+ /**
232
+ * ID of the Connector to retrieve.
233
+ * @format GUID
234
+ */
235
+ connectorId: string;
236
+ }
237
+ interface GetConnectorResponse {
238
+ /** The requested Connector. */
239
+ connector?: Connector;
240
+ }
241
+ interface DeleteConnectorRequest {
242
+ /**
243
+ * ID of the Connector to move to the trash bin.
244
+ * @format GUID
245
+ */
246
+ connectorId: string;
247
+ }
248
+ interface DeleteConnectorResponse {
249
+ }
250
+ interface QueryConnectorsRequest {
251
+ /** Filter, sort, and cursor paging arguments for Connectors in the target account tenant. */
252
+ query?: CursorQuery;
253
+ }
254
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
255
+ /**
256
+ * Cursor paging options.
257
+ *
258
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
259
+ */
260
+ cursorPaging?: CursorPaging;
261
+ /**
262
+ * Filter object.
263
+ *
264
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
265
+ */
266
+ filter?: Record<string, any> | null;
267
+ /**
268
+ * Sort object.
269
+ *
270
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
271
+ * @maxSize 5
272
+ */
273
+ sort?: Sorting[];
274
+ }
275
+ /** @oneof */
276
+ interface CursorQueryPagingMethodOneOf {
277
+ /**
278
+ * Cursor paging options.
279
+ *
280
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
281
+ */
282
+ cursorPaging?: CursorPaging;
283
+ }
284
+ interface Sorting {
285
+ /**
286
+ * Name of the field to sort by.
287
+ * @maxLength 512
288
+ */
289
+ fieldName?: string;
290
+ /** Sort order. */
291
+ order?: SortOrderWithLiterals;
292
+ }
293
+ declare enum SortOrder {
294
+ ASC = "ASC",
295
+ DESC = "DESC"
296
+ }
297
+ /** @enumType */
298
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
299
+ interface CursorPaging {
300
+ /**
301
+ * Maximum number of items to return in the results.
302
+ * @max 100
303
+ */
304
+ limit?: number | null;
305
+ /**
306
+ * Pointer to the next or previous page in the list of results.
307
+ *
308
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
309
+ * Not relevant for the first request.
310
+ * @maxLength 16000
311
+ */
312
+ cursor?: string | null;
313
+ }
314
+ interface QueryConnectorsResponse {
315
+ /** Connectors from the target account tenant. Protected fields require their own permissions. */
316
+ connectors?: Connector[];
317
+ /** Cursor information for the next or previous page. */
318
+ pagingMetadata?: CursorPagingMetadata;
319
+ }
320
+ interface CursorPagingMetadata {
321
+ /** Number of items returned in current page. */
322
+ count?: number | null;
323
+ /** Cursor strings that point to the next page, previous page, or both. */
324
+ cursors?: Cursors;
325
+ /**
326
+ * Whether there are more pages to retrieve following the current page.
327
+ *
328
+ * + `true`: Another page of results can be retrieved.
329
+ * + `false`: This is the last page.
330
+ */
331
+ hasNext?: boolean | null;
332
+ }
333
+ interface Cursors {
334
+ /**
335
+ * Cursor string pointing to the next page in the list of results.
336
+ * @maxLength 16000
337
+ */
338
+ next?: string | null;
339
+ /**
340
+ * Cursor pointing to the previous page in the list of results.
341
+ * @maxLength 16000
342
+ */
343
+ prev?: string | null;
344
+ }
345
+ interface StartConnectRequest extends StartConnectRequestOwnerOneOf {
346
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
347
+ predefinedRegistration?: PredefinedRegistration;
348
+ /**
349
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
350
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
351
+ */
352
+ dynamicRegistration?: DynamicRegistration;
353
+ /** Non-secret discriminant of the owner kind, aligned with the oneof above. */
354
+ registrationType?: StartConnectRequestRegistrationTypeWithLiterals;
355
+ /**
356
+ * Deprecated: use owner.predefined_registration.app_id. Retained for callers still on the flat
357
+ * field until they migrate to the owner oneof. Not GUID-typed: that format rejects the empty
358
+ * default a oneof-owner request carries, so this optional field only caps length.
359
+ * @maxLength 80
360
+ * @deprecated
361
+ * @replacedBy predefined_registration.app_id
362
+ * @targetRemovalDate 2027-06-30
363
+ */
364
+ appId?: string;
365
+ /**
366
+ * Deprecated: use owner.predefined_registration.component_id.
367
+ * @maxLength 80
368
+ * @deprecated
369
+ * @replacedBy predefined_registration.component_id
370
+ * @targetRemovalDate 2027-06-30
371
+ */
372
+ componentId?: string;
373
+ /**
374
+ * Requested exposure of the Connector this connect will produce. UNKNOWN_EXPOSURE is treated as
375
+ * ACCOUNT. USER requires an initiating Wix user identity on the call — its id is recorded as the
376
+ * Connector's consenting_user_id and the connection is then visible only to that user.
377
+ */
378
+ exposure?: ExposureWithLiterals;
379
+ /**
380
+ * Optional Wix URL to return the browser to after connect completes. Must pass the Wix-domain
381
+ * allowlist (validated server-side at GenerateAuthorizationUrl). When omitted, the fixed landing
382
+ * page is used. Carried through the handshake; the same URL is used for both success and error
383
+ * landings (with ?error= on failure). Not WEB_URL-typed: that format rejects the empty default, so
384
+ * this optional field only caps length here — the server-side allowlist is the real URL gate.
385
+ * @maxLength 2048
386
+ */
387
+ returnUrl?: string;
388
+ }
389
+ /** @oneof */
390
+ interface StartConnectRequestOwnerOneOf {
391
+ /** Curated connect: the connector app + CONNECTOR_CONFIG component. */
392
+ predefinedRegistration?: PredefinedRegistration;
393
+ /**
394
+ * Dynamic (DCR) connect: the provider-registry McpServerRegistration reached by URL; the OAuth
395
+ * config comes from the registration rather than a CONNECTOR_CONFIG component.
396
+ */
397
+ dynamicRegistration?: DynamicRegistration;
398
+ }
399
+ /** Which kind of owner this connect targets. */
400
+ declare enum StartConnectRequestRegistrationType {
401
+ /** Curated owner (app_id + component_id). */
402
+ PREDEFINED = "PREDEFINED",
403
+ /** Dynamic (DCR) owner (registration_id). */
404
+ DYNAMIC = "DYNAMIC"
405
+ }
406
+ /** @enumType */
407
+ type StartConnectRequestRegistrationTypeWithLiterals = StartConnectRequestRegistrationType | 'PREDEFINED' | 'DYNAMIC';
408
+ interface StartConnectResponse extends StartConnectResponseNextActionOneOf {
409
+ /** Redirect the caller's browser to complete the connect. */
410
+ redirect?: Redirect;
411
+ /** Nothing left to do — the connect is already finished. */
412
+ completed?: Completed;
413
+ /**
414
+ * Deprecated: read `next_action.redirect.url` instead. Still populated whenever the next action IS
415
+ * a redirect, so callers that have not migrated keep working; it is simply unable to express any
416
+ * other outcome, which is why it is being replaced rather than extended.
417
+ * @format WEB_URL
418
+ * @deprecated
419
+ * @replacedBy next_action.redirect.url
420
+ * @targetRemovalDate 2027-06-30
421
+ */
422
+ authorizationUrl?: string;
423
+ }
424
+ /** @oneof */
425
+ interface StartConnectResponseNextActionOneOf {
426
+ /** Redirect the caller's browser to complete the connect. */
427
+ redirect?: Redirect;
428
+ /** Nothing left to do — the connect is already finished. */
429
+ completed?: Completed;
430
+ }
431
+ /** Redirects the caller's browser to a provider authorization URL. */
432
+ interface Redirect {
433
+ /**
434
+ * Provider authorization URL to redirect the user's browser to.
435
+ * @format WEB_URL
436
+ */
437
+ url?: string;
438
+ }
439
+ /**
440
+ * The connect is already finished and the Connector exists; no user interaction happened or is needed.
441
+ * Returned for a provider that requires no authorization at all, where there is no authorization URL
442
+ * to visit and so no callback to return through.
443
+ */
444
+ interface Completed {
445
+ /**
446
+ * Id of the access key the resulting Connector is bound to.
447
+ * @format GUID
448
+ */
449
+ accessKeyId?: string;
450
+ }
451
+ interface DomainEvent extends DomainEventBodyOneOf {
452
+ createdEvent?: EntityCreatedEvent;
453
+ updatedEvent?: EntityUpdatedEvent;
454
+ deletedEvent?: EntityDeletedEvent;
455
+ actionEvent?: ActionEvent;
456
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
457
+ id?: string;
458
+ /**
459
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
460
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
461
+ */
462
+ entityFqdn?: string;
463
+ /**
464
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
465
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
466
+ */
467
+ slug?: string;
468
+ /** ID of the entity associated with the event. */
469
+ entityId?: string;
470
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
471
+ eventTime?: Date | null;
472
+ /**
473
+ * Whether the event was triggered as a result of a privacy regulation application
474
+ * (for example, GDPR).
475
+ */
476
+ triggeredByAnonymizeRequest?: boolean | null;
477
+ /** If present, indicates the action that triggered the event. */
478
+ originatedFrom?: string | null;
479
+ /**
480
+ * 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.
481
+ * 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.
482
+ */
483
+ entityEventSequence?: string | null;
484
+ }
485
+ /** @oneof */
486
+ interface DomainEventBodyOneOf {
487
+ createdEvent?: EntityCreatedEvent;
488
+ updatedEvent?: EntityUpdatedEvent;
489
+ deletedEvent?: EntityDeletedEvent;
490
+ actionEvent?: ActionEvent;
491
+ }
492
+ interface EntityCreatedEvent {
493
+ entityAsJson?: string;
494
+ /**
495
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
496
+ * @internal
497
+ */
498
+ triggeredByUndelete?: boolean | null;
499
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
500
+ restoreInfo?: RestoreInfo;
501
+ /**
502
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
503
+ * @internal
504
+ */
505
+ additionalMetadataAsJson?: string | null;
506
+ }
507
+ interface RestoreInfo {
508
+ deletedDate?: Date | null;
509
+ }
510
+ interface EntityUpdatedEvent {
511
+ /**
512
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
513
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
514
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
515
+ */
516
+ currentEntityAsJson?: string;
517
+ /**
518
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
519
+ * wont populate it / have any reference to it in the API.
520
+ * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
521
+ * the developer should send only the new (current) entity.
522
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
523
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
524
+ * @internal
525
+ * @deprecated
526
+ */
527
+ previousEntityAsJson?: string | null;
528
+ /**
529
+ * Map of fully qualified field paths to their previous values for fields that changed.
530
+ * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
531
+ * @internal
532
+ */
533
+ modifiedFields?: Record<string, any>;
534
+ /**
535
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
536
+ * @internal
537
+ */
538
+ additionalMetadataAsJson?: string | null;
539
+ }
540
+ interface EntityDeletedEvent {
541
+ /**
542
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
543
+ * @internal
544
+ */
545
+ movedToTrash?: boolean | null;
546
+ /** Entity that was deleted. */
547
+ deletedEntityAsJson?: string | null;
548
+ /**
549
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
550
+ * @internal
551
+ */
552
+ additionalMetadataAsJson?: string | null;
553
+ }
554
+ interface ActionEvent {
555
+ bodyAsJson?: string;
556
+ }
557
+ interface Empty {
558
+ }
559
+ interface MessageEnvelope {
560
+ /**
561
+ * App instance ID.
562
+ * @format GUID
563
+ */
564
+ instanceId?: string | null;
565
+ /**
566
+ * Event type.
567
+ * @maxLength 150
568
+ */
569
+ eventType?: string;
570
+ /** The identification type and identity data. */
571
+ identity?: IdentificationData;
572
+ /** Stringify payload. */
573
+ data?: string;
574
+ /** Details related to the account */
575
+ accountInfo?: AccountInfo;
576
+ }
577
+ interface IdentificationData extends IdentificationDataIdOneOf {
578
+ /**
579
+ * ID of a site visitor that has not logged in to the site.
580
+ * @format GUID
581
+ */
582
+ anonymousVisitorId?: string;
583
+ /**
584
+ * ID of a site visitor that has logged in to the site.
585
+ * @format GUID
586
+ */
587
+ memberId?: string;
588
+ /**
589
+ * ID of a Wix user (site owner, contributor, etc.).
590
+ * @format GUID
591
+ */
592
+ wixUserId?: string;
593
+ /**
594
+ * ID of an app.
595
+ * @format GUID
596
+ */
597
+ appId?: string;
598
+ /** @readonly */
599
+ identityType?: WebhookIdentityTypeWithLiterals;
600
+ }
601
+ /** @oneof */
602
+ interface IdentificationDataIdOneOf {
603
+ /**
604
+ * ID of a site visitor that has not logged in to the site.
605
+ * @format GUID
606
+ */
607
+ anonymousVisitorId?: string;
608
+ /**
609
+ * ID of a site visitor that has logged in to the site.
610
+ * @format GUID
611
+ */
612
+ memberId?: string;
613
+ /**
614
+ * ID of a Wix user (site owner, contributor, etc.).
615
+ * @format GUID
616
+ */
617
+ wixUserId?: string;
618
+ /**
619
+ * ID of an app.
620
+ * @format GUID
621
+ */
622
+ appId?: string;
623
+ }
624
+ declare enum WebhookIdentityType {
625
+ UNKNOWN = "UNKNOWN",
626
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
627
+ MEMBER = "MEMBER",
628
+ WIX_USER = "WIX_USER",
629
+ APP = "APP"
630
+ }
631
+ /** @enumType */
632
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
633
+ interface AccountInfo {
634
+ /**
635
+ * ID of the Wix account associated with the event.
636
+ * @format GUID
637
+ */
638
+ accountId?: string | null;
639
+ /**
640
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
641
+ * @format GUID
642
+ */
643
+ parentAccountId?: string | null;
644
+ /**
645
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
646
+ * @format GUID
647
+ */
648
+ siteId?: string | null;
649
+ }
650
+ interface DispatchRequest {
651
+ /**
652
+ * ID of the Connector to authorize in the caller's target account.
653
+ * @format GUID
654
+ */
655
+ connectorId: string;
656
+ /** Raw provider request. Callers must not include credentials; Wix injects them at dispatch. */
657
+ providerRequest: RawHttpRequest;
658
+ /**
659
+ * Optional caller-supplied key making a retry of this dispatch safe: the same key on the same
660
+ * connector will not produce a second provider attempt through Wix. Scoped to the connector, so
661
+ * callers need only make it unique per connector. Guarantees at-most-once ATTEMPT by Wix — it
662
+ * cannot guarantee the provider applied the effect at most once when an attempt's outcome is
663
+ * unknown (timeout, connection reset). For that, include the provider's own idempotency header in
664
+ * provider_request. A repeated key fails with a duplicate-dispatch error rather than replaying the
665
+ * original response, which Wix does not retain; callers needing it must store it themselves.
666
+ * @maxLength 128
667
+ */
668
+ idempotencyKey?: string;
669
+ }
670
+ interface RawHttpRequest {
671
+ body?: Uint8Array;
672
+ pathParams?: PathParametersEntry[];
673
+ queryParams?: QueryParametersEntry[];
674
+ headers?: HeadersEntry[];
675
+ method?: string;
676
+ rawPath?: string;
677
+ rawQuery?: string;
678
+ }
679
+ interface PathParametersEntry {
680
+ key?: string;
681
+ value?: string;
682
+ }
683
+ interface QueryParametersEntry {
684
+ key?: string;
685
+ value?: string;
686
+ }
687
+ interface HeadersEntry {
688
+ key?: string;
689
+ value?: string;
690
+ }
691
+ interface RawHttpResponse {
692
+ body?: Uint8Array;
693
+ statusCode?: number | null;
694
+ headers?: HeadersEntry[];
695
+ }
696
+ interface ListMcpToolsRequest {
697
+ /**
698
+ * ID of the Connector whose callable MCP tools are requested.
699
+ * @format GUID
700
+ */
701
+ connectorId: string;
702
+ }
703
+ interface ListMcpToolsResponse {
704
+ /**
705
+ * The server's advertised tools filtered by the connector's allowlist. Capped to match mcp_config.allowed_tools' own maximum; the runtime
706
+ * rejects a provider advertisement it cannot fit rather than returning an unbounded payload.
707
+ * @maxSize 200
708
+ */
709
+ tools?: McpTool[];
710
+ }
711
+ /** One MCP tool as advertised by the connector's MCP server. */
712
+ interface McpTool {
713
+ /**
714
+ * Tool name, exactly as the server advertises it.
715
+ * @maxLength 128
716
+ */
717
+ name?: string;
718
+ /**
719
+ * Human- and model-readable description of what the tool does, as provided by the server.
720
+ * @maxLength 10000
721
+ */
722
+ description?: string;
723
+ /** JSON Schema of the tool's arguments, as provided by the server. */
724
+ inputSchema?: Record<string, any> | null;
725
+ }
726
+
727
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
728
+ getUrl: (context: any) => string;
729
+ httpMethod: K;
730
+ path: string;
731
+ pathParams: M;
732
+ __requestType: T;
733
+ __originalRequestType: S;
734
+ __responseType: Q;
735
+ __originalResponseType: R;
736
+ };
737
+ declare function getConnector(): __PublicMethodMetaInfo<'GET', {
738
+ connectorId: string;
739
+ }, GetConnectorRequest$1, GetConnectorRequest, GetConnectorResponse$1, GetConnectorResponse>;
740
+ declare function deleteConnector(): __PublicMethodMetaInfo<'DELETE', {
741
+ connectorId: string;
742
+ }, DeleteConnectorRequest$1, DeleteConnectorRequest, DeleteConnectorResponse$1, DeleteConnectorResponse>;
743
+ declare function queryConnectors(): __PublicMethodMetaInfo<'POST', {}, QueryConnectorsRequest$1, QueryConnectorsRequest, QueryConnectorsResponse$1, QueryConnectorsResponse>;
744
+ declare function startConnect(): __PublicMethodMetaInfo<'POST', {}, StartConnectRequest$1, StartConnectRequest, StartConnectResponse$1, StartConnectResponse>;
745
+ declare function dispatcherDispatch(): __PublicMethodMetaInfo<'POST', {
746
+ connectorId: string;
747
+ }, DispatchRequest$1, DispatchRequest, RawHttpResponse$1, RawHttpResponse>;
748
+ declare function listMcpTools(): __PublicMethodMetaInfo<'GET', {
749
+ connectorId: string;
750
+ }, ListMcpToolsRequest$1, ListMcpToolsRequest, ListMcpToolsResponse$1, ListMcpToolsResponse>;
751
+
752
+ export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type Completed as CompletedOriginal, type Connector as ConnectorOriginal, type ConnectorRegistrationOneOf as ConnectorRegistrationOneOfOriginal, type CreateConnectorRequest as CreateConnectorRequestOriginal, type CreateConnectorResponse as CreateConnectorResponseOriginal, CredentialState as CredentialStateOriginal, type CredentialStateWithLiterals as CredentialStateWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteConnectorRequest as DeleteConnectorRequestOriginal, type DeleteConnectorResponse as DeleteConnectorResponseOriginal, type DispatchRequest as DispatchRequestOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type DynamicRegistration as DynamicRegistrationOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, Exposure as ExposureOriginal, type ExposureWithLiterals as ExposureWithLiteralsOriginal, type GetConnectorRequest as GetConnectorRequestOriginal, type GetConnectorResponse as GetConnectorResponseOriginal, type GrantedScopes as GrantedScopesOriginal, type HeadersEntry as HeadersEntryOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListMcpToolsRequest as ListMcpToolsRequestOriginal, type ListMcpToolsResponse as ListMcpToolsResponseOriginal, type McpTool as McpToolOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PathParametersEntry as PathParametersEntryOriginal, type PredefinedRegistration as PredefinedRegistrationOriginal, type QueryConnectorsRequest as QueryConnectorsRequestOriginal, type QueryConnectorsResponse as QueryConnectorsResponseOriginal, type QueryParametersEntry as QueryParametersEntryOriginal, type RawHttpRequest as RawHttpRequestOriginal, type RawHttpResponse as RawHttpResponseOriginal, type Redirect as RedirectOriginal, RegistrationType as RegistrationTypeOriginal, type RegistrationTypeWithLiterals as RegistrationTypeWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, ScopeReportingState as ScopeReportingStateOriginal, type ScopeReportingStateWithLiterals as ScopeReportingStateWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type StartConnectRequest as StartConnectRequestOriginal, type StartConnectRequestOwnerOneOf as StartConnectRequestOwnerOneOfOriginal, StartConnectRequestRegistrationType as StartConnectRequestRegistrationTypeOriginal, type StartConnectRequestRegistrationTypeWithLiterals as StartConnectRequestRegistrationTypeWithLiteralsOriginal, type StartConnectResponseNextActionOneOf as StartConnectResponseNextActionOneOfOriginal, type StartConnectResponse as StartConnectResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, deleteConnector, dispatcherDispatch, getConnector, listMcpTools, queryConnectors, startConnect };