@wix/auto_sdk_widgets_widget-store 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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +11 -0
  2. package/build/cjs/index.js +609 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +750 -0
  5. package/build/cjs/index.typings.js +529 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +531 -0
  8. package/build/cjs/meta.js +420 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +11 -0
  11. package/build/es/index.mjs +575 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +750 -0
  14. package/build/es/index.typings.mjs +494 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +531 -0
  17. package/build/es/meta.mjs +384 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +85 -0
  21. package/build/internal/cjs/index.js +609 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +831 -0
  24. package/build/internal/cjs/index.typings.js +529 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +531 -0
  27. package/build/internal/cjs/meta.js +420 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +85 -0
  30. package/build/internal/es/index.mjs +575 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +831 -0
  33. package/build/internal/es/index.typings.mjs +494 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +531 -0
  36. package/build/internal/es/meta.mjs +384 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +55 -0
@@ -0,0 +1,831 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
+
4
+ /** Registry entry describing a widget that can be offered within an app instance. */
5
+ interface Widget {
6
+ /**
7
+ * Widget ID.
8
+ * @format GUID
9
+ * @readonly
10
+ */
11
+ _id?: string | null;
12
+ /**
13
+ * Revision number, which increments by 1 each time the Widget is updated.
14
+ * @readonly
15
+ */
16
+ revision?: string | null;
17
+ /**
18
+ * Date and time the Widget was created.
19
+ * @readonly
20
+ */
21
+ _createdDate?: Date | null;
22
+ /**
23
+ * Date and time the Widget was last updated.
24
+ * @readonly
25
+ */
26
+ _updatedDate?: Date | null;
27
+ /**
28
+ * Stable machine-readable key for the widget.
29
+ * @minLength 1
30
+ * @maxLength 120
31
+ */
32
+ key?: string;
33
+ /**
34
+ * Human-readable widget name.
35
+ * @minLength 1
36
+ * @maxLength 120
37
+ */
38
+ displayName?: string;
39
+ /**
40
+ * Short explanation of what the widget does.
41
+ * @maxLength 1000
42
+ */
43
+ description?: string | null;
44
+ /**
45
+ * Platform or vendor that provides the widget.
46
+ * @minLength 1
47
+ * @maxLength 120
48
+ */
49
+ provider?: string;
50
+ /**
51
+ * Runtime used to execute the widget.
52
+ * @minLength 1
53
+ * @maxLength 120
54
+ */
55
+ runtime?: string;
56
+ /**
57
+ * Widget package or configuration version.
58
+ * @maxLength 80
59
+ */
60
+ version?: string | null;
61
+ /** Current lifecycle state of the widget. */
62
+ status?: WidgetStatusWithLiterals;
63
+ /**
64
+ * Capability identifiers supported by the widget.
65
+ * @maxSize 100
66
+ * @maxLength 120
67
+ */
68
+ capabilities?: string[];
69
+ /** Data Extensions. */
70
+ extendedFields?: ExtendedFields;
71
+ /** Tags. */
72
+ tags?: Tags;
73
+ }
74
+ declare enum WidgetStatus {
75
+ ACTIVE = "ACTIVE",
76
+ PAUSED = "PAUSED",
77
+ DEPRECATED = "DEPRECATED"
78
+ }
79
+ /** @enumType */
80
+ type WidgetStatusWithLiterals = WidgetStatus | 'ACTIVE' | 'PAUSED' | 'DEPRECATED';
81
+ interface ExtendedFields {
82
+ /**
83
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
84
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
85
+ *
86
+ * You can only access fields for which you have the appropriate permissions.
87
+ *
88
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
89
+ */
90
+ namespaces?: Record<string, Record<string, any>>;
91
+ }
92
+ /**
93
+ * Common object for tags.
94
+ * Should be use as in this example:
95
+ * message Foo {
96
+ * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo";
97
+ * string id = 1;
98
+ * ...
99
+ * Tags tags = 5
100
+ * }
101
+ *
102
+ * example of taggable entity
103
+ * {
104
+ * id: "123"
105
+ * tags: {
106
+ * public_tags: {
107
+ * tag_ids:["11","22"]
108
+ * },
109
+ * private_tags: {
110
+ * tag_ids: ["33", "44"]
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ interface Tags {
116
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
117
+ privateTags?: TagList;
118
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
119
+ publicTags?: TagList;
120
+ }
121
+ interface TagList {
122
+ /**
123
+ * List of tag IDs.
124
+ * @maxSize 100
125
+ * @maxLength 5
126
+ */
127
+ tagIds?: string[];
128
+ }
129
+ interface WidgetTagsModified {
130
+ /** Updated Widget. */
131
+ widget?: Widget;
132
+ /** Tags that were assigned to the Widget. */
133
+ assignedTags?: Tags;
134
+ /** Tags that were unassigned from the Widget. */
135
+ unassignedTags?: Tags;
136
+ }
137
+ interface CreateWidgetRequest {
138
+ /** Widget to be created. */
139
+ widget: Widget;
140
+ }
141
+ interface CreateWidgetResponse {
142
+ /** The created Widget. */
143
+ widget?: Widget;
144
+ }
145
+ interface GetWidgetRequest {
146
+ /**
147
+ * ID of the Widget to retrieve.
148
+ * @format GUID
149
+ */
150
+ widgetId: string;
151
+ }
152
+ interface GetWidgetResponse {
153
+ /** The requested Widget. */
154
+ widget?: Widget;
155
+ }
156
+ interface UpdateWidgetRequest {
157
+ /** Widget to be updated, may be partial. */
158
+ widget: Widget;
159
+ }
160
+ interface UpdateWidgetResponse {
161
+ /** Updated Widget. */
162
+ widget?: Widget;
163
+ }
164
+ interface DeleteWidgetRequest {
165
+ /**
166
+ * ID of the Widget to delete.
167
+ * @format GUID
168
+ */
169
+ widgetId: string;
170
+ }
171
+ interface DeleteWidgetResponse {
172
+ }
173
+ interface QueryWidgetsRequest {
174
+ /** WQL expression. */
175
+ query?: CursorQuery;
176
+ }
177
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
178
+ /**
179
+ * Cursor paging options.
180
+ *
181
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
182
+ */
183
+ cursorPaging?: CursorPaging;
184
+ /**
185
+ * Filter object.
186
+ *
187
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
188
+ */
189
+ filter?: Record<string, any> | null;
190
+ /**
191
+ * Sort object.
192
+ *
193
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
194
+ * @maxSize 5
195
+ */
196
+ sort?: Sorting[];
197
+ }
198
+ /** @oneof */
199
+ interface CursorQueryPagingMethodOneOf {
200
+ /**
201
+ * Cursor paging options.
202
+ *
203
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
204
+ */
205
+ cursorPaging?: CursorPaging;
206
+ }
207
+ interface Sorting {
208
+ /**
209
+ * Name of the field to sort by.
210
+ * @maxLength 512
211
+ */
212
+ fieldName?: string;
213
+ /** Sort order. */
214
+ order?: SortOrderWithLiterals;
215
+ }
216
+ declare enum SortOrder {
217
+ ASC = "ASC",
218
+ DESC = "DESC"
219
+ }
220
+ /** @enumType */
221
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
222
+ interface CursorPaging {
223
+ /**
224
+ * Maximum number of items to return in the results.
225
+ * @max 100
226
+ */
227
+ limit?: number | null;
228
+ /**
229
+ * Pointer to the next or previous page in the list of results.
230
+ *
231
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
232
+ * Not relevant for the first request.
233
+ * @maxLength 16000
234
+ */
235
+ cursor?: string | null;
236
+ }
237
+ interface QueryWidgetsResponse {
238
+ /** List of Widgets. */
239
+ widgets?: Widget[];
240
+ /** Paging metadata. */
241
+ pagingMetadata?: CursorPagingMetadata;
242
+ }
243
+ interface CursorPagingMetadata {
244
+ /** Number of items returned in current page. */
245
+ count?: number | null;
246
+ /** Cursor strings that point to the next page, previous page, or both. */
247
+ cursors?: Cursors;
248
+ /**
249
+ * Whether there are more pages to retrieve following the current page.
250
+ *
251
+ * + `true`: Another page of results can be retrieved.
252
+ * + `false`: This is the last page.
253
+ */
254
+ hasNext?: boolean | null;
255
+ }
256
+ interface Cursors {
257
+ /**
258
+ * Cursor string pointing to the next page in the list of results.
259
+ * @maxLength 16000
260
+ */
261
+ next?: string | null;
262
+ /**
263
+ * Cursor pointing to the previous page in the list of results.
264
+ * @maxLength 16000
265
+ */
266
+ prev?: string | null;
267
+ }
268
+ interface BulkUpdateWidgetTagsRequest {
269
+ /**
270
+ * IDs of Widgets whose tags will be updated.
271
+ * @minSize 1
272
+ * @maxSize 100
273
+ * @format GUID
274
+ */
275
+ widgetIds: string[];
276
+ /** Tags to assign. */
277
+ assignTags?: Tags;
278
+ /** Tags to unassign. */
279
+ unassignTags?: Tags;
280
+ }
281
+ interface BulkUpdateWidgetTagsResponse {
282
+ /**
283
+ * Results.
284
+ * @minSize 1
285
+ * @maxSize 100
286
+ */
287
+ results?: BulkUpdateWidgetTagsResult[];
288
+ /** Metadata regarding the bulk update operation. */
289
+ bulkActionMetadata?: BulkActionMetadata;
290
+ }
291
+ interface ItemMetadata {
292
+ /**
293
+ * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
294
+ * @format GUID
295
+ */
296
+ _id?: string | null;
297
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
298
+ originalIndex?: number;
299
+ /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
300
+ success?: boolean;
301
+ /** Details about the error in case of failure. */
302
+ error?: ApplicationError;
303
+ }
304
+ interface ApplicationError {
305
+ /** Error code. */
306
+ code?: string;
307
+ /** Description of the error. */
308
+ description?: string;
309
+ /** Data related to the error. */
310
+ data?: Record<string, any> | null;
311
+ }
312
+ interface BulkUpdateWidgetTagsResult {
313
+ /** Metadata regarding the specific single update operation. */
314
+ itemMetadata?: ItemMetadata;
315
+ }
316
+ interface BulkActionMetadata {
317
+ /** Number of items that were successfully processed. */
318
+ totalSuccesses?: number;
319
+ /** Number of items that couldn't be processed. */
320
+ totalFailures?: number;
321
+ /** Number of failures without details because detailed failure threshold was exceeded. */
322
+ undetailedFailures?: number;
323
+ }
324
+ interface BulkUpdateWidgetTagsByFilterRequest {
325
+ /** Filter that selects Widgets whose tags will be updated. */
326
+ filter: Record<string, any> | null;
327
+ /** Tags to assign. */
328
+ assignTags?: Tags;
329
+ /** Tags to unassign. */
330
+ unassignTags?: Tags;
331
+ }
332
+ interface BulkUpdateWidgetTagsByFilterResponse {
333
+ /**
334
+ * Job ID.
335
+ * @format GUID
336
+ */
337
+ jobId?: string;
338
+ }
339
+ interface DomainEvent extends DomainEventBodyOneOf {
340
+ createdEvent?: EntityCreatedEvent;
341
+ updatedEvent?: EntityUpdatedEvent;
342
+ deletedEvent?: EntityDeletedEvent;
343
+ actionEvent?: ActionEvent;
344
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
345
+ _id?: string;
346
+ /**
347
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
348
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
349
+ */
350
+ entityFqdn?: string;
351
+ /**
352
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
353
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
354
+ */
355
+ slug?: string;
356
+ /** ID of the entity associated with the event. */
357
+ entityId?: string;
358
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
359
+ eventTime?: Date | null;
360
+ /**
361
+ * Whether the event was triggered as a result of a privacy regulation application
362
+ * (for example, GDPR).
363
+ */
364
+ triggeredByAnonymizeRequest?: boolean | null;
365
+ /** If present, indicates the action that triggered the event. */
366
+ originatedFrom?: string | null;
367
+ /**
368
+ * 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.
369
+ * 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.
370
+ */
371
+ entityEventSequence?: string | null;
372
+ }
373
+ /** @oneof */
374
+ interface DomainEventBodyOneOf {
375
+ createdEvent?: EntityCreatedEvent;
376
+ updatedEvent?: EntityUpdatedEvent;
377
+ deletedEvent?: EntityDeletedEvent;
378
+ actionEvent?: ActionEvent;
379
+ }
380
+ interface EntityCreatedEvent {
381
+ entity?: string;
382
+ }
383
+ interface RestoreInfo {
384
+ deletedDate?: Date | null;
385
+ }
386
+ interface EntityUpdatedEvent {
387
+ /**
388
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
389
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
390
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
391
+ */
392
+ currentEntity?: string;
393
+ }
394
+ interface EntityDeletedEvent {
395
+ /** Entity that was deleted. */
396
+ deletedEntity?: string | null;
397
+ }
398
+ interface ActionEvent {
399
+ body?: string;
400
+ }
401
+ interface MessageEnvelope {
402
+ /**
403
+ * App instance ID.
404
+ * @format GUID
405
+ */
406
+ instanceId?: string | null;
407
+ /**
408
+ * Event type.
409
+ * @maxLength 150
410
+ */
411
+ eventType?: string;
412
+ /** The identification type and identity data. */
413
+ identity?: IdentificationData;
414
+ /** Stringify payload. */
415
+ data?: string;
416
+ /** Details related to the account */
417
+ accountInfo?: AccountInfo;
418
+ }
419
+ interface IdentificationData extends IdentificationDataIdOneOf {
420
+ /**
421
+ * ID of a site visitor that has not logged in to the site.
422
+ * @format GUID
423
+ */
424
+ anonymousVisitorId?: string;
425
+ /**
426
+ * ID of a site visitor that has logged in to the site.
427
+ * @format GUID
428
+ */
429
+ memberId?: string;
430
+ /**
431
+ * ID of a Wix user (site owner, contributor, etc.).
432
+ * @format GUID
433
+ */
434
+ wixUserId?: string;
435
+ /**
436
+ * ID of an app.
437
+ * @format GUID
438
+ */
439
+ appId?: string;
440
+ /** @readonly */
441
+ identityType?: WebhookIdentityTypeWithLiterals;
442
+ }
443
+ /** @oneof */
444
+ interface IdentificationDataIdOneOf {
445
+ /**
446
+ * ID of a site visitor that has not logged in to the site.
447
+ * @format GUID
448
+ */
449
+ anonymousVisitorId?: string;
450
+ /**
451
+ * ID of a site visitor that has logged in to the site.
452
+ * @format GUID
453
+ */
454
+ memberId?: string;
455
+ /**
456
+ * ID of a Wix user (site owner, contributor, etc.).
457
+ * @format GUID
458
+ */
459
+ wixUserId?: string;
460
+ /**
461
+ * ID of an app.
462
+ * @format GUID
463
+ */
464
+ appId?: string;
465
+ }
466
+ declare enum WebhookIdentityType {
467
+ UNKNOWN = "UNKNOWN",
468
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
469
+ MEMBER = "MEMBER",
470
+ WIX_USER = "WIX_USER",
471
+ APP = "APP"
472
+ }
473
+ /** @enumType */
474
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
475
+ interface AccountInfo {
476
+ /**
477
+ * ID of the Wix account associated with the event.
478
+ * @format GUID
479
+ */
480
+ accountId?: string | null;
481
+ /**
482
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
483
+ * @format GUID
484
+ */
485
+ parentAccountId?: string | null;
486
+ /**
487
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
488
+ * @format GUID
489
+ */
490
+ siteId?: string | null;
491
+ }
492
+ /** @docsIgnore */
493
+ type BulkUpdateWidgetTagsApplicationErrors = {
494
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
495
+ description?: string;
496
+ data?: Record<string, any>;
497
+ };
498
+ /** @docsIgnore */
499
+ type BulkUpdateWidgetTagsByFilterApplicationErrors = {
500
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
501
+ description?: string;
502
+ data?: Record<string, any>;
503
+ };
504
+ /**
505
+ * Creates a Widget.
506
+ * @param widget - Widget to be created.
507
+ * @internal
508
+ * @documentationMaturity preview
509
+ * @requiredField widget
510
+ * @requiredField widget.displayName
511
+ * @requiredField widget.key
512
+ * @requiredField widget.provider
513
+ * @requiredField widget.runtime
514
+ * @permissionId widgets:v1:widget:create_widget
515
+ * @returns The created Widget.
516
+ * @fqn wix.widgets.v1.WidgetStoreService.CreateWidget
517
+ */
518
+ declare function createWidget(widget: NonNullablePaths<Widget, `displayName` | `key` | `provider` | `runtime`, 2>): Promise<NonNullablePaths<Widget, `key` | `displayName` | `provider` | `runtime` | `status` | `capabilities` | `tags.privateTags.tagIds`, 4>>;
519
+ /**
520
+ * Retrieves a Widget.
521
+ * @param widgetId - ID of the Widget to retrieve.
522
+ * @internal
523
+ * @documentationMaturity preview
524
+ * @requiredField widgetId
525
+ * @permissionId widgets:v1:widget:get_widget
526
+ * @returns The requested Widget.
527
+ * @fqn wix.widgets.v1.WidgetStoreService.GetWidget
528
+ */
529
+ declare function getWidget(widgetId: string): Promise<NonNullablePaths<Widget, `key` | `displayName` | `provider` | `runtime` | `status` | `capabilities` | `tags.privateTags.tagIds`, 4>>;
530
+ /**
531
+ * Updates a Widget.
532
+ * @param _id - Widget ID.
533
+ * @internal
534
+ * @documentationMaturity preview
535
+ * @requiredField _id
536
+ * @requiredField widget
537
+ * @requiredField widget.revision
538
+ * @permissionId widgets:v1:widget:update_widget
539
+ * @returns Updated Widget.
540
+ * @fqn wix.widgets.v1.WidgetStoreService.UpdateWidget
541
+ */
542
+ declare function updateWidget(_id: string, widget: NonNullablePaths<UpdateWidget, `revision`, 2>): Promise<NonNullablePaths<Widget, `key` | `displayName` | `provider` | `runtime` | `status` | `capabilities` | `tags.privateTags.tagIds`, 4>>;
543
+ interface UpdateWidget {
544
+ /**
545
+ * Widget ID.
546
+ * @format GUID
547
+ * @readonly
548
+ */
549
+ _id?: string | null;
550
+ /**
551
+ * Revision number, which increments by 1 each time the Widget is updated.
552
+ * @readonly
553
+ */
554
+ revision?: string | null;
555
+ /**
556
+ * Date and time the Widget was created.
557
+ * @readonly
558
+ */
559
+ _createdDate?: Date | null;
560
+ /**
561
+ * Date and time the Widget was last updated.
562
+ * @readonly
563
+ */
564
+ _updatedDate?: Date | null;
565
+ /**
566
+ * Stable machine-readable key for the widget.
567
+ * @minLength 1
568
+ * @maxLength 120
569
+ */
570
+ key?: string;
571
+ /**
572
+ * Human-readable widget name.
573
+ * @minLength 1
574
+ * @maxLength 120
575
+ */
576
+ displayName?: string;
577
+ /**
578
+ * Short explanation of what the widget does.
579
+ * @maxLength 1000
580
+ */
581
+ description?: string | null;
582
+ /**
583
+ * Platform or vendor that provides the widget.
584
+ * @minLength 1
585
+ * @maxLength 120
586
+ */
587
+ provider?: string;
588
+ /**
589
+ * Runtime used to execute the widget.
590
+ * @minLength 1
591
+ * @maxLength 120
592
+ */
593
+ runtime?: string;
594
+ /**
595
+ * Widget package or configuration version.
596
+ * @maxLength 80
597
+ */
598
+ version?: string | null;
599
+ /** Current lifecycle state of the widget. */
600
+ status?: WidgetStatusWithLiterals;
601
+ /**
602
+ * Capability identifiers supported by the widget.
603
+ * @maxSize 100
604
+ * @maxLength 120
605
+ */
606
+ capabilities?: string[];
607
+ /** Data Extensions. */
608
+ extendedFields?: ExtendedFields;
609
+ /** Tags. */
610
+ tags?: Tags;
611
+ }
612
+ /**
613
+ * Deletes a Widget.
614
+ * @param widgetId - ID of the Widget to delete.
615
+ * @internal
616
+ * @documentationMaturity preview
617
+ * @requiredField widgetId
618
+ * @permissionId widgets:v1:widget:delete_widget
619
+ * @fqn wix.widgets.v1.WidgetStoreService.DeleteWidget
620
+ */
621
+ declare function deleteWidget(widgetId: string): Promise<void>;
622
+ /**
623
+ * Retrieves a list of Widgets by WQL query.
624
+ * @internal
625
+ * @documentationMaturity preview
626
+ * @permissionId widgets:v1:widget:query_widgets
627
+ * @fqn wix.widgets.v1.WidgetStoreService.QueryWidgets
628
+ */
629
+ declare function queryWidgets(): WidgetsQueryBuilder;
630
+ interface QueryCursorResult {
631
+ cursors: Cursors;
632
+ hasNext: () => boolean;
633
+ hasPrev: () => boolean;
634
+ length: number;
635
+ pageSize: number;
636
+ }
637
+ interface WidgetsQueryResult extends QueryCursorResult {
638
+ items: Widget[];
639
+ query: WidgetsQueryBuilder;
640
+ next: () => Promise<WidgetsQueryResult>;
641
+ prev: () => Promise<WidgetsQueryResult>;
642
+ }
643
+ interface WidgetsQueryBuilder {
644
+ /** @param propertyName - Property whose value is compared with `value`.
645
+ * @param value - Value to compare against.
646
+ * @documentationMaturity preview
647
+ */
648
+ eq: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => WidgetsQueryBuilder;
649
+ /** @param propertyName - Property whose value is compared with `value`.
650
+ * @param value - Value to compare against.
651
+ * @documentationMaturity preview
652
+ */
653
+ ne: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => WidgetsQueryBuilder;
654
+ /** @param propertyName - Property whose value is compared with `value`.
655
+ * @param value - Value to compare against.
656
+ * @documentationMaturity preview
657
+ */
658
+ ge: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version', value: any) => WidgetsQueryBuilder;
659
+ /** @param propertyName - Property whose value is compared with `value`.
660
+ * @param value - Value to compare against.
661
+ * @documentationMaturity preview
662
+ */
663
+ gt: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version', value: any) => WidgetsQueryBuilder;
664
+ /** @param propertyName - Property whose value is compared with `value`.
665
+ * @param value - Value to compare against.
666
+ * @documentationMaturity preview
667
+ */
668
+ le: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version', value: any) => WidgetsQueryBuilder;
669
+ /** @param propertyName - Property whose value is compared with `value`.
670
+ * @param value - Value to compare against.
671
+ * @documentationMaturity preview
672
+ */
673
+ lt: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version', value: any) => WidgetsQueryBuilder;
674
+ /** @param propertyName - Property whose value is compared with `string`.
675
+ * @param string - String to compare against. Case-insensitive.
676
+ * @documentationMaturity preview
677
+ */
678
+ startsWith: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version', value: string) => WidgetsQueryBuilder;
679
+ /** @param propertyName - Property whose value is compared with `values`.
680
+ * @param values - List of values to compare against.
681
+ * @documentationMaturity preview
682
+ */
683
+ hasSome: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any[]) => WidgetsQueryBuilder;
684
+ /** @param propertyName - Property whose value is compared with `values`.
685
+ * @param values - List of values to compare against.
686
+ * @documentationMaturity preview
687
+ */
688
+ hasAll: (propertyName: 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any[]) => WidgetsQueryBuilder;
689
+ /** @documentationMaturity preview */
690
+ in: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => WidgetsQueryBuilder;
691
+ /** @documentationMaturity preview */
692
+ exists: (propertyName: '_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: boolean) => WidgetsQueryBuilder;
693
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
694
+ * @documentationMaturity preview
695
+ */
696
+ ascending: (...propertyNames: Array<'_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds'>) => WidgetsQueryBuilder;
697
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
698
+ * @documentationMaturity preview
699
+ */
700
+ descending: (...propertyNames: Array<'_id' | 'key' | 'displayName' | 'provider' | 'runtime' | 'version' | 'status' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds'>) => WidgetsQueryBuilder;
701
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
702
+ * @documentationMaturity preview
703
+ */
704
+ limit: (limit: number) => WidgetsQueryBuilder;
705
+ /** @param cursor - A pointer to specific record
706
+ * @documentationMaturity preview
707
+ */
708
+ skipTo: (cursor: string) => WidgetsQueryBuilder;
709
+ /** @documentationMaturity preview */
710
+ find: () => Promise<WidgetsQueryResult>;
711
+ }
712
+ /**
713
+ * @hidden
714
+ * @fqn wix.widgets.v1.WidgetStoreService.QueryWidgets
715
+ * @requiredField query
716
+ */
717
+ declare function typedQueryWidgets(query: WidgetQuery): Promise<NonNullablePaths<QueryWidgetsResponse, `widgets` | `widgets.${number}.key` | `widgets.${number}.displayName` | `widgets.${number}.provider` | `widgets.${number}.runtime` | `widgets.${number}.status`, 4>>;
718
+ interface WidgetQuerySpec extends QuerySpec {
719
+ paging: 'cursor';
720
+ wql: [
721
+ {
722
+ fields: ['tags.privateTags.tagIds', 'tags.publicTags.tagIds'];
723
+ operators: ['$hasAll', '$hasSome'];
724
+ sort: 'BOTH';
725
+ },
726
+ {
727
+ fields: [
728
+ '_id',
729
+ 'displayName',
730
+ 'key',
731
+ 'provider',
732
+ 'runtime',
733
+ 'status',
734
+ 'version'
735
+ ];
736
+ operators: '*';
737
+ sort: 'BOTH';
738
+ }
739
+ ];
740
+ }
741
+ type CommonQueryWithEntityContext = Query<Widget, WidgetQuerySpec>;
742
+ type WidgetQuery = {
743
+ /**
744
+ Cursor paging options.
745
+
746
+ Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
747
+ */
748
+ cursorPaging?: {
749
+ /**
750
+ Maximum number of items to return in the results.
751
+ @max: 100
752
+ */
753
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
754
+ /**
755
+ Pointer to the next or previous page in the list of results.
756
+
757
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
758
+ Not relevant for the first request.
759
+ @maxLength: 16000
760
+ */
761
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
762
+ };
763
+ /**
764
+ Filter object.
765
+
766
+ Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
767
+ */
768
+ filter?: CommonQueryWithEntityContext['filter'] | null;
769
+ /**
770
+ Sort object.
771
+
772
+ Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
773
+ @maxSize: 5
774
+ */
775
+ sort?: {
776
+ /**
777
+ Name of the field to sort by.
778
+ @maxLength: 512
779
+ */
780
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
781
+ /**
782
+ Sort order.
783
+ */
784
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
785
+ }[];
786
+ };
787
+ declare const utils: {
788
+ query: {
789
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<Widget, WidgetQuerySpec, WidgetQuery>;
790
+ Filter: _wix_sdk_types.FilterFactory<Widget, WidgetQuerySpec>;
791
+ Sort: _wix_sdk_types.SortFactory<WidgetQuerySpec>;
792
+ };
793
+ };
794
+ /**
795
+ * Synchronously updates tags on multiple Widgets by ID.
796
+ * @param widgetIds - IDs of Widgets whose tags will be updated.
797
+ * @internal
798
+ * @documentationMaturity preview
799
+ * @requiredField widgetIds
800
+ * @permissionId widgets:v1:widget:bulk_update_widget_tags
801
+ * @fqn wix.widgets.v1.WidgetStoreService.BulkUpdateWidgetTags
802
+ */
803
+ declare function bulkUpdateWidgetTags(widgetIds: string[], options?: BulkUpdateWidgetTagsOptions): Promise<NonNullablePaths<BulkUpdateWidgetTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
804
+ __applicationErrorsType?: BulkUpdateWidgetTagsApplicationErrors;
805
+ }>;
806
+ interface BulkUpdateWidgetTagsOptions {
807
+ /** Tags to assign. */
808
+ assignTags?: Tags;
809
+ /** Tags to unassign. */
810
+ unassignTags?: Tags;
811
+ }
812
+ /**
813
+ * Asynchronously updates tags on Widgets matching the provided filter.
814
+ * @param filter - Filter that selects Widgets whose tags will be updated.
815
+ * @internal
816
+ * @documentationMaturity preview
817
+ * @requiredField filter
818
+ * @permissionId widgets:v1:widget:bulk_update_widget_tags_by_filter
819
+ * @fqn wix.widgets.v1.WidgetStoreService.BulkUpdateWidgetTagsByFilter
820
+ */
821
+ declare function bulkUpdateWidgetTagsByFilter(filter: Record<string, any>, options?: BulkUpdateWidgetTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateWidgetTagsByFilterResponse, `jobId`, 2> & {
822
+ __applicationErrorsType?: BulkUpdateWidgetTagsByFilterApplicationErrors;
823
+ }>;
824
+ interface BulkUpdateWidgetTagsByFilterOptions {
825
+ /** Tags to assign. */
826
+ assignTags?: Tags;
827
+ /** Tags to unassign. */
828
+ unassignTags?: Tags;
829
+ }
830
+
831
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkUpdateWidgetTagsApplicationErrors, type BulkUpdateWidgetTagsByFilterApplicationErrors, type BulkUpdateWidgetTagsByFilterOptions, type BulkUpdateWidgetTagsByFilterRequest, type BulkUpdateWidgetTagsByFilterResponse, type BulkUpdateWidgetTagsOptions, type BulkUpdateWidgetTagsRequest, type BulkUpdateWidgetTagsResponse, type BulkUpdateWidgetTagsResult, type CommonQueryWithEntityContext, type CreateWidgetRequest, type CreateWidgetResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteWidgetRequest, type DeleteWidgetResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetWidgetRequest, type GetWidgetResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type QueryWidgetsRequest, type QueryWidgetsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type TagList, type Tags, type UpdateWidget, type UpdateWidgetRequest, type UpdateWidgetResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type Widget, type WidgetQuery, type WidgetQuerySpec, WidgetStatus, type WidgetStatusWithLiterals, type WidgetTagsModified, type WidgetsQueryBuilder, type WidgetsQueryResult, bulkUpdateWidgetTags, bulkUpdateWidgetTagsByFilter, createWidget, deleteWidget, getWidget, queryWidgets, typedQueryWidgets, updateWidget, utils };