@wix/portfolio 1.0.57 → 1.0.59

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,1845 @@
1
+ /** Collection is the main entity of CollectionsService */
2
+ interface Collection {
3
+ /**
4
+ * Collection ID
5
+ * @readonly
6
+ */
7
+ _id?: string | null;
8
+ /**
9
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision
10
+ * @readonly
11
+ */
12
+ revision?: string | null;
13
+ title?: string | null;
14
+ description?: string | null;
15
+ /** Url of Collection */
16
+ slug?: string | null;
17
+ /** Collection's cover photo */
18
+ coverImage?: Image$3;
19
+ /** Indicates if the collection is hidden from Portfolio */
20
+ hidden?: boolean | null;
21
+ /** if not present in an update it means the collection will be added as currentTimestamp - as the last collection */
22
+ sortOrder?: number | null;
23
+ /**
24
+ * Represents the time this Collection was created
25
+ * @readonly
26
+ */
27
+ _createdDate?: Date;
28
+ /**
29
+ * Represents the time this Collection was last updated
30
+ * @readonly
31
+ */
32
+ _updatedDate?: Date;
33
+ /**
34
+ * Url and relative url of Collection - in order to receive this field in READ requests you will need to pass the `include_page_url` field as part of request
35
+ * @readonly
36
+ */
37
+ url?: string;
38
+ seoData?: SeoSchema$2;
39
+ }
40
+ interface Image$3 {
41
+ /** Image info - Wix Media Image. */
42
+ imageInfo?: string;
43
+ /** Focal point of the image. */
44
+ focalPoint?: Point$3;
45
+ }
46
+ interface Point$3 {
47
+ /** X-coordinate of the focal point. */
48
+ x?: number;
49
+ /** Y-coordinate of the focal point. */
50
+ y?: number;
51
+ }
52
+ /**
53
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
54
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
55
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
56
+ */
57
+ interface SeoSchema$2 {
58
+ /** SEO tag information. */
59
+ tags?: Tag$2[];
60
+ /** SEO general settings. */
61
+ settings?: Settings$2;
62
+ }
63
+ interface Keyword$2 {
64
+ /** Keyword value. */
65
+ term?: string;
66
+ /** Whether the keyword is the main focus keyword. */
67
+ isMain?: boolean;
68
+ }
69
+ interface Tag$2 {
70
+ /**
71
+ * SEO tag type.
72
+ *
73
+ *
74
+ * Supported values: `title`, `meta`, `script`, `link`.
75
+ */
76
+ type?: string;
77
+ /**
78
+ * A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
79
+ * For example: `{'name': 'description', 'content': 'the description itself'}`.
80
+ */
81
+ props?: Record<string, any> | null;
82
+ /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
83
+ meta?: Record<string, any> | null;
84
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
85
+ children?: string;
86
+ /** Whether the tag is a custom tag. */
87
+ custom?: boolean;
88
+ /** Whether the tag is disabled. */
89
+ disabled?: boolean;
90
+ }
91
+ interface Settings$2 {
92
+ /**
93
+ * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
94
+ *
95
+ *
96
+ * Default: `false` (Auto Redirect is enabled.)
97
+ */
98
+ preventAutoRedirect?: boolean;
99
+ /** User-selected keyword terms for a specific page. */
100
+ keywords?: Keyword$2[];
101
+ }
102
+ interface CursorPaging$1 {
103
+ /** Maximum number of items to return in the results. */
104
+ limit?: number | null;
105
+ /**
106
+ * Pointer to the next or previous page in the list of results.
107
+ *
108
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
109
+ * Not relevant for the first request.
110
+ */
111
+ cursor?: string | null;
112
+ }
113
+ interface ListCollectionsResponse {
114
+ /** Retrieved Collections */
115
+ collections?: Collection[];
116
+ /** Paging metadata */
117
+ metadata?: PagingMetadataV2$2;
118
+ }
119
+ interface PagingMetadataV2$2 {
120
+ /** Number of items returned in the response. */
121
+ count?: number | null;
122
+ /** Offset that was requested. */
123
+ offset?: number | null;
124
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
125
+ total?: number | null;
126
+ /** Flag that indicates the server failed to calculate the `total` field. */
127
+ tooManyToCount?: boolean | null;
128
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
129
+ cursors?: Cursors$3;
130
+ }
131
+ interface Cursors$3 {
132
+ /** Cursor string pointing to the next page in the list of results. */
133
+ next?: string | null;
134
+ /** Cursor pointing to the previous page in the list of results. */
135
+ prev?: string | null;
136
+ }
137
+ interface DeleteCollectionResponse {
138
+ /** Id of the Deleted Collection */
139
+ collectionId?: string;
140
+ }
141
+ interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
142
+ /** ID of a site visitor that has not logged in to the site. */
143
+ anonymousVisitorId?: string;
144
+ /** ID of a site visitor that has logged in to the site. */
145
+ memberId?: string;
146
+ /** ID of a Wix user (site owner, contributor, etc.). */
147
+ wixUserId?: string;
148
+ /** ID of an app. */
149
+ appId?: string;
150
+ /** @readonly */
151
+ identityType?: WebhookIdentityType$3;
152
+ }
153
+ /** @oneof */
154
+ interface IdentificationDataIdOneOf$3 {
155
+ /** ID of a site visitor that has not logged in to the site. */
156
+ anonymousVisitorId?: string;
157
+ /** ID of a site visitor that has logged in to the site. */
158
+ memberId?: string;
159
+ /** ID of a Wix user (site owner, contributor, etc.). */
160
+ wixUserId?: string;
161
+ /** ID of an app. */
162
+ appId?: string;
163
+ }
164
+ declare enum WebhookIdentityType$3 {
165
+ UNKNOWN = "UNKNOWN",
166
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
167
+ MEMBER = "MEMBER",
168
+ WIX_USER = "WIX_USER",
169
+ APP = "APP"
170
+ }
171
+ interface ListCollectionsResponseNonNullableFields {
172
+ collections: {
173
+ coverImage?: {
174
+ imageInfo: string;
175
+ focalPoint?: {
176
+ x: number;
177
+ y: number;
178
+ };
179
+ };
180
+ url: string;
181
+ seoData?: {
182
+ tags: {
183
+ type: string;
184
+ children: string;
185
+ custom: boolean;
186
+ disabled: boolean;
187
+ }[];
188
+ settings?: {
189
+ preventAutoRedirect: boolean;
190
+ keywords: {
191
+ term: string;
192
+ isMain: boolean;
193
+ }[];
194
+ };
195
+ };
196
+ }[];
197
+ }
198
+ interface DeleteCollectionResponseNonNullableFields {
199
+ collectionId: string;
200
+ }
201
+ interface BaseEventMetadata$3 {
202
+ /** App instance ID. */
203
+ instanceId?: string | null;
204
+ /** Event type. */
205
+ eventType?: string;
206
+ /** The identification type and identity data. */
207
+ identity?: IdentificationData$3;
208
+ }
209
+ interface EventMetadata$3 extends BaseEventMetadata$3 {
210
+ /**
211
+ * Unique event ID.
212
+ * Allows clients to ignore duplicate webhooks.
213
+ */
214
+ _id?: string;
215
+ /**
216
+ * Assumes actions are also always typed to an entity_type
217
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
218
+ */
219
+ entityFqdn?: string;
220
+ /**
221
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
222
+ * This is although the created/updated/deleted notion is duplication of the oneof types
223
+ * Example: created/updated/deleted/started/completed/email_opened
224
+ */
225
+ slug?: string;
226
+ /** ID of the entity associated with the event. */
227
+ entityId?: string;
228
+ /** Event timestamp. */
229
+ eventTime?: Date;
230
+ /**
231
+ * Whether the event was triggered as a result of a privacy regulation application
232
+ * (for example, GDPR).
233
+ */
234
+ triggeredByAnonymizeRequest?: boolean | null;
235
+ /** If present, indicates the action that triggered the event. */
236
+ originatedFrom?: string | null;
237
+ /**
238
+ * A sequence number defining the order of updates to the underlying entity.
239
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
240
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
241
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
242
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
243
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
244
+ */
245
+ entityEventSequence?: string | null;
246
+ }
247
+ interface CollectionCreatedEnvelope {
248
+ entity: Collection;
249
+ metadata: EventMetadata$3;
250
+ }
251
+ interface CollectionUpdatedEnvelope {
252
+ entity: Collection;
253
+ metadata: EventMetadata$3;
254
+ }
255
+ interface CollectionDeletedEnvelope {
256
+ metadata: EventMetadata$3;
257
+ }
258
+ interface GetCollectionOptions {
259
+ includePageUrl?: boolean | null;
260
+ }
261
+ interface ListCollectionsOptions {
262
+ /** Maximum limit per response is 100, in first request cursor is None */
263
+ paging?: CursorPaging$1;
264
+ includePageUrl?: boolean | null;
265
+ }
266
+ interface UpdateCollection {
267
+ /**
268
+ * Collection ID
269
+ * @readonly
270
+ */
271
+ _id?: string | null;
272
+ /**
273
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision
274
+ * @readonly
275
+ */
276
+ revision?: string | null;
277
+ title?: string | null;
278
+ description?: string | null;
279
+ /** Url of Collection */
280
+ slug?: string | null;
281
+ /** Collection's cover photo */
282
+ coverImage?: Image$3;
283
+ /** Indicates if the collection is hidden from Portfolio */
284
+ hidden?: boolean | null;
285
+ /** if not present in an update it means the collection will be added as currentTimestamp - as the last collection */
286
+ sortOrder?: number | null;
287
+ /**
288
+ * Represents the time this Collection was created
289
+ * @readonly
290
+ */
291
+ _createdDate?: Date;
292
+ /**
293
+ * Represents the time this Collection was last updated
294
+ * @readonly
295
+ */
296
+ _updatedDate?: Date;
297
+ /**
298
+ * Url and relative url of Collection - in order to receive this field in READ requests you will need to pass the `include_page_url` field as part of request
299
+ * @readonly
300
+ */
301
+ url?: string;
302
+ seoData?: SeoSchema$2;
303
+ }
304
+ interface QueryCollectionsOptions {
305
+ includePageUrl?: boolean | null | undefined;
306
+ }
307
+ interface QueryCursorResult$2 {
308
+ cursors: Cursors$3;
309
+ hasNext: () => boolean;
310
+ hasPrev: () => boolean;
311
+ length: number;
312
+ pageSize: number;
313
+ }
314
+ interface CollectionsQueryResult extends QueryCursorResult$2 {
315
+ items: Collection[];
316
+ query: CollectionsQueryBuilder;
317
+ next: () => Promise<CollectionsQueryResult>;
318
+ prev: () => Promise<CollectionsQueryResult>;
319
+ }
320
+ interface CollectionsQueryBuilder {
321
+ /** @param propertyName - Property whose value is compared with `value`.
322
+ * @param value - Value to compare against.
323
+ * @documentationMaturity preview
324
+ */
325
+ eq: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
326
+ /** @param propertyName - Property whose value is compared with `value`.
327
+ * @param value - Value to compare against.
328
+ * @documentationMaturity preview
329
+ */
330
+ ne: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
331
+ /** @param propertyName - Property whose value is compared with `value`.
332
+ * @param value - Value to compare against.
333
+ * @documentationMaturity preview
334
+ */
335
+ ge: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
336
+ /** @param propertyName - Property whose value is compared with `value`.
337
+ * @param value - Value to compare against.
338
+ * @documentationMaturity preview
339
+ */
340
+ gt: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
341
+ /** @param propertyName - Property whose value is compared with `value`.
342
+ * @param value - Value to compare against.
343
+ * @documentationMaturity preview
344
+ */
345
+ le: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
346
+ /** @param propertyName - Property whose value is compared with `value`.
347
+ * @param value - Value to compare against.
348
+ * @documentationMaturity preview
349
+ */
350
+ lt: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
351
+ /** @param propertyName - Property whose value is compared with `string`.
352
+ * @param string - String to compare against. Case-insensitive.
353
+ * @documentationMaturity preview
354
+ */
355
+ startsWith: (propertyName: '_id' | 'title' | 'description' | 'slug', value: string) => CollectionsQueryBuilder;
356
+ /** @param propertyName - Property whose value is compared with `values`.
357
+ * @param values - List of values to compare against.
358
+ * @documentationMaturity preview
359
+ */
360
+ hasSome: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any[]) => CollectionsQueryBuilder;
361
+ /** @documentationMaturity preview */
362
+ in: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
363
+ /** @documentationMaturity preview */
364
+ exists: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: boolean) => CollectionsQueryBuilder;
365
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
366
+ * @documentationMaturity preview
367
+ */
368
+ ascending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder;
369
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
370
+ * @documentationMaturity preview
371
+ */
372
+ descending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder;
373
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
374
+ * @documentationMaturity preview
375
+ */
376
+ limit: (limit: number) => CollectionsQueryBuilder;
377
+ /** @param cursor - A pointer to specific record
378
+ * @documentationMaturity preview
379
+ */
380
+ skipTo: (cursor: string) => CollectionsQueryBuilder;
381
+ /** @documentationMaturity preview */
382
+ find: () => Promise<CollectionsQueryResult>;
383
+ }
384
+
385
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
386
+ interface HttpClient {
387
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
388
+ }
389
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
390
+ type HttpResponse<T = any> = {
391
+ data: T;
392
+ status: number;
393
+ statusText: string;
394
+ headers: any;
395
+ request?: any;
396
+ };
397
+ type RequestOptions<_TResponse = any, Data = any> = {
398
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
399
+ url: string;
400
+ data?: Data;
401
+ params?: URLSearchParams;
402
+ } & APIMetadata;
403
+ type APIMetadata = {
404
+ methodFqn?: string;
405
+ entityFqdn?: string;
406
+ packageName?: string;
407
+ };
408
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
409
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
410
+ __type: 'event-definition';
411
+ type: Type;
412
+ isDomainEvent?: boolean;
413
+ transformations?: unknown;
414
+ __payload: Payload;
415
+ };
416
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
417
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
418
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
419
+
420
+ declare function createCollection$1(httpClient: HttpClient): (collection: Collection) => Promise<Collection & {
421
+ coverImage?: {
422
+ imageInfo: string;
423
+ focalPoint?: {
424
+ x: number;
425
+ y: number;
426
+ } | undefined;
427
+ } | undefined;
428
+ url: string;
429
+ seoData?: {
430
+ tags: {
431
+ type: string;
432
+ children: string;
433
+ custom: boolean;
434
+ disabled: boolean;
435
+ }[];
436
+ settings?: {
437
+ preventAutoRedirect: boolean;
438
+ keywords: {
439
+ term: string;
440
+ isMain: boolean;
441
+ }[];
442
+ } | undefined;
443
+ } | undefined;
444
+ }>;
445
+ declare function getCollection$1(httpClient: HttpClient): (collectionId: string, options?: GetCollectionOptions) => Promise<Collection & {
446
+ coverImage?: {
447
+ imageInfo: string;
448
+ focalPoint?: {
449
+ x: number;
450
+ y: number;
451
+ } | undefined;
452
+ } | undefined;
453
+ url: string;
454
+ seoData?: {
455
+ tags: {
456
+ type: string;
457
+ children: string;
458
+ custom: boolean;
459
+ disabled: boolean;
460
+ }[];
461
+ settings?: {
462
+ preventAutoRedirect: boolean;
463
+ keywords: {
464
+ term: string;
465
+ isMain: boolean;
466
+ }[];
467
+ } | undefined;
468
+ } | undefined;
469
+ }>;
470
+ declare function listCollections$1(httpClient: HttpClient): (options?: ListCollectionsOptions) => Promise<ListCollectionsResponse & ListCollectionsResponseNonNullableFields>;
471
+ declare function updateCollection$1(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<Collection & {
472
+ coverImage?: {
473
+ imageInfo: string;
474
+ focalPoint?: {
475
+ x: number;
476
+ y: number;
477
+ } | undefined;
478
+ } | undefined;
479
+ url: string;
480
+ seoData?: {
481
+ tags: {
482
+ type: string;
483
+ children: string;
484
+ custom: boolean;
485
+ disabled: boolean;
486
+ }[];
487
+ settings?: {
488
+ preventAutoRedirect: boolean;
489
+ keywords: {
490
+ term: string;
491
+ isMain: boolean;
492
+ }[];
493
+ } | undefined;
494
+ } | undefined;
495
+ }>;
496
+ declare function deleteCollection$1(httpClient: HttpClient): (collectionId: string) => Promise<DeleteCollectionResponse & DeleteCollectionResponseNonNullableFields>;
497
+ declare function queryCollections$1(httpClient: HttpClient): (options?: QueryCollectionsOptions) => CollectionsQueryBuilder;
498
+ declare const onCollectionCreated$1: EventDefinition<CollectionCreatedEnvelope, "wix.portfolio.collections.v1.collection_created">;
499
+ declare const onCollectionUpdated$1: EventDefinition<CollectionUpdatedEnvelope, "wix.portfolio.collections.v1.collection_updated">;
500
+ declare const onCollectionDeleted$1: EventDefinition<CollectionDeletedEnvelope, "wix.portfolio.collections.v1.collection_deleted">;
501
+
502
+ declare const createCollection: BuildRESTFunction<typeof createCollection$1>;
503
+ declare const getCollection: BuildRESTFunction<typeof getCollection$1>;
504
+ declare const listCollections: BuildRESTFunction<typeof listCollections$1>;
505
+ declare const updateCollection: BuildRESTFunction<typeof updateCollection$1>;
506
+ declare const deleteCollection: BuildRESTFunction<typeof deleteCollection$1>;
507
+ declare const queryCollections: BuildRESTFunction<typeof queryCollections$1>;
508
+ declare const onCollectionCreated: BuildEventDefinition<typeof onCollectionCreated$1>;
509
+ declare const onCollectionUpdated: BuildEventDefinition<typeof onCollectionUpdated$1>;
510
+ declare const onCollectionDeleted: BuildEventDefinition<typeof onCollectionDeleted$1>;
511
+
512
+ declare const context$3_createCollection: typeof createCollection;
513
+ declare const context$3_deleteCollection: typeof deleteCollection;
514
+ declare const context$3_getCollection: typeof getCollection;
515
+ declare const context$3_listCollections: typeof listCollections;
516
+ declare const context$3_onCollectionCreated: typeof onCollectionCreated;
517
+ declare const context$3_onCollectionDeleted: typeof onCollectionDeleted;
518
+ declare const context$3_onCollectionUpdated: typeof onCollectionUpdated;
519
+ declare const context$3_queryCollections: typeof queryCollections;
520
+ declare const context$3_updateCollection: typeof updateCollection;
521
+ declare namespace context$3 {
522
+ export { context$3_createCollection as createCollection, context$3_deleteCollection as deleteCollection, context$3_getCollection as getCollection, context$3_listCollections as listCollections, context$3_onCollectionCreated as onCollectionCreated, context$3_onCollectionDeleted as onCollectionDeleted, context$3_onCollectionUpdated as onCollectionUpdated, context$3_queryCollections as queryCollections, context$3_updateCollection as updateCollection };
523
+ }
524
+
525
+ /** ProjectItem is the main entity of ProjectItemsService */
526
+ interface Item extends ItemMetadataOneOf {
527
+ /** Information about the image. */
528
+ image?: Image$2;
529
+ /** Information about the video. */
530
+ video?: Video$2;
531
+ /**
532
+ * Id of the Project the items are part of
533
+ * Project must exist before adding items to it. project can be created/updated/deleted using this //TODO
534
+ */
535
+ projectId?: string | null;
536
+ /**
537
+ * Item ID.
538
+ * @readonly
539
+ */
540
+ _id?: string | null;
541
+ /**
542
+ * Index that determines which position a media item is displayed in the gallery. <br />
543
+ *
544
+ * Default: [Epoch](https://www.epoch101.com/) timestamp. <br /> //TODO: decide if needed, what happens if user add an item without sortOrder? do we give it the default timestamp? if not, does sorting by sortOrder will work when no sortOrder?
545
+ */
546
+ sortOrder?: number | null;
547
+ /** Item title. */
548
+ title?: string | null;
549
+ /** Item description. */
550
+ description?: string | null;
551
+ /**
552
+ * Item data type. One of:
553
+ * <br />
554
+ * +`"IMAGE"`
555
+ * <br />
556
+ * +`"VIDEO"`
557
+ * @readonly
558
+ */
559
+ type?: Type;
560
+ /**
561
+ * Date and time the item was created.
562
+ * @readonly
563
+ */
564
+ _createdDate?: Date;
565
+ /**
566
+ * Date and time the item was last updated.
567
+ * @readonly
568
+ */
569
+ _updatedDate?: Date;
570
+ /** Link from the item. */
571
+ link?: Link;
572
+ }
573
+ /** @oneof */
574
+ interface ItemMetadataOneOf {
575
+ /** Information about the image. */
576
+ image?: Image$2;
577
+ /** Information about the video. */
578
+ video?: Video$2;
579
+ }
580
+ declare enum Type {
581
+ UNDEFINED = "UNDEFINED",
582
+ IMAGE = "IMAGE",
583
+ VIDEO = "VIDEO"
584
+ }
585
+ interface Image$2 {
586
+ /** Image info - Wix Media Image. */
587
+ imageInfo?: string;
588
+ /** Focal point of the image. */
589
+ focalPoint?: Point$2;
590
+ }
591
+ interface Point$2 {
592
+ /** X-coordinate of the focal point. */
593
+ x?: number;
594
+ /** Y-coordinate of the focal point. */
595
+ y?: number;
596
+ }
597
+ interface Video$2 {
598
+ /** Video info - Wix Media Image. */
599
+ videoInfo?: string;
600
+ /** Manually defined Video duration in milliseconds. */
601
+ durationInMillis?: number | null;
602
+ }
603
+ interface Link {
604
+ /** Display text of the link. */
605
+ text?: string | null;
606
+ /** Target URL of the link. */
607
+ url?: string | null;
608
+ /**
609
+ * Whether the link opens in a new tab or window. One of:
610
+ * * `'_blank'`: The link opens in a new tab or window.
611
+ * * `'_self'`: The link opens in the same tab or window.
612
+ */
613
+ target?: string | null;
614
+ }
615
+ interface Paging {
616
+ /** Number of items to load. */
617
+ limit?: number | null;
618
+ /** Number of items to skip in the current sort order. */
619
+ offset?: number | null;
620
+ }
621
+ interface ListProjectItemsResponse {
622
+ /** ProjectItems retrieved */
623
+ items?: Item[];
624
+ /**
625
+ * Paging metadata
626
+ * @deprecated
627
+ */
628
+ pagingMetadataV2?: PagingMetadataV2$1;
629
+ /** Paging metadata */
630
+ metadata?: PagingMetadataV2$1;
631
+ }
632
+ interface PagingMetadataV2$1 {
633
+ /** Number of items returned in the response. */
634
+ count?: number | null;
635
+ /** Offset that was requested. */
636
+ offset?: number | null;
637
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
638
+ total?: number | null;
639
+ /** Flag that indicates the server failed to calculate the `total` field. */
640
+ tooManyToCount?: boolean | null;
641
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
642
+ cursors?: Cursors$2;
643
+ }
644
+ interface Cursors$2 {
645
+ /** Cursor string pointing to the next page in the list of results. */
646
+ next?: string | null;
647
+ /** Cursor pointing to the previous page in the list of results. */
648
+ prev?: string | null;
649
+ }
650
+ interface DeleteProjectItemResponse {
651
+ /** Id of the Project the item is part of */
652
+ projectId?: string;
653
+ /** Id of deleted item */
654
+ itemId?: string;
655
+ }
656
+ interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
657
+ /** ID of a site visitor that has not logged in to the site. */
658
+ anonymousVisitorId?: string;
659
+ /** ID of a site visitor that has logged in to the site. */
660
+ memberId?: string;
661
+ /** ID of a Wix user (site owner, contributor, etc.). */
662
+ wixUserId?: string;
663
+ /** ID of an app. */
664
+ appId?: string;
665
+ /** @readonly */
666
+ identityType?: WebhookIdentityType$2;
667
+ }
668
+ /** @oneof */
669
+ interface IdentificationDataIdOneOf$2 {
670
+ /** ID of a site visitor that has not logged in to the site. */
671
+ anonymousVisitorId?: string;
672
+ /** ID of a site visitor that has logged in to the site. */
673
+ memberId?: string;
674
+ /** ID of a Wix user (site owner, contributor, etc.). */
675
+ wixUserId?: string;
676
+ /** ID of an app. */
677
+ appId?: string;
678
+ }
679
+ declare enum WebhookIdentityType$2 {
680
+ UNKNOWN = "UNKNOWN",
681
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
682
+ MEMBER = "MEMBER",
683
+ WIX_USER = "WIX_USER",
684
+ APP = "APP"
685
+ }
686
+ interface ListProjectItemsResponseNonNullableFields {
687
+ items: {
688
+ image?: {
689
+ imageInfo: string;
690
+ focalPoint?: {
691
+ x: number;
692
+ y: number;
693
+ };
694
+ };
695
+ video?: {
696
+ videoInfo: string;
697
+ };
698
+ type: Type;
699
+ }[];
700
+ }
701
+ interface DeleteProjectItemResponseNonNullableFields {
702
+ projectId: string;
703
+ itemId: string;
704
+ }
705
+ interface BaseEventMetadata$2 {
706
+ /** App instance ID. */
707
+ instanceId?: string | null;
708
+ /** Event type. */
709
+ eventType?: string;
710
+ /** The identification type and identity data. */
711
+ identity?: IdentificationData$2;
712
+ }
713
+ interface EventMetadata$2 extends BaseEventMetadata$2 {
714
+ /**
715
+ * Unique event ID.
716
+ * Allows clients to ignore duplicate webhooks.
717
+ */
718
+ _id?: string;
719
+ /**
720
+ * Assumes actions are also always typed to an entity_type
721
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
722
+ */
723
+ entityFqdn?: string;
724
+ /**
725
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
726
+ * This is although the created/updated/deleted notion is duplication of the oneof types
727
+ * Example: created/updated/deleted/started/completed/email_opened
728
+ */
729
+ slug?: string;
730
+ /** ID of the entity associated with the event. */
731
+ entityId?: string;
732
+ /** Event timestamp. */
733
+ eventTime?: Date;
734
+ /**
735
+ * Whether the event was triggered as a result of a privacy regulation application
736
+ * (for example, GDPR).
737
+ */
738
+ triggeredByAnonymizeRequest?: boolean | null;
739
+ /** If present, indicates the action that triggered the event. */
740
+ originatedFrom?: string | null;
741
+ /**
742
+ * A sequence number defining the order of updates to the underlying entity.
743
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
744
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
745
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
746
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
747
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
748
+ */
749
+ entityEventSequence?: string | null;
750
+ }
751
+ interface ProjectItemCreatedEnvelope {
752
+ entity: Item;
753
+ metadata: EventMetadata$2;
754
+ }
755
+ interface ProjectItemUpdatedEnvelope {
756
+ entity: Item;
757
+ metadata: EventMetadata$2;
758
+ }
759
+ interface ProjectItemDeletedEnvelope {
760
+ metadata: EventMetadata$2;
761
+ }
762
+ interface ListProjectItemsOptions {
763
+ /** limit and offset for ProjectItems - maximum limit is 200 per request, default is 50 */
764
+ paging?: Paging;
765
+ }
766
+ interface UpdateProjectItem {
767
+ /** Information about the image. */
768
+ image?: Image$2;
769
+ /** Information about the video. */
770
+ video?: Video$2;
771
+ /**
772
+ * Id of the Project the items are part of
773
+ * Project must exist before adding items to it. project can be created/updated/deleted using this //TODO
774
+ */
775
+ projectId?: string | null;
776
+ /**
777
+ * Item ID.
778
+ * @readonly
779
+ */
780
+ _id?: string | null;
781
+ /**
782
+ * Index that determines which position a media item is displayed in the gallery. <br />
783
+ *
784
+ * Default: [Epoch](https://www.epoch101.com/) timestamp. <br /> //TODO: decide if needed, what happens if user add an item without sortOrder? do we give it the default timestamp? if not, does sorting by sortOrder will work when no sortOrder?
785
+ */
786
+ sortOrder?: number | null;
787
+ /** Item title. */
788
+ title?: string | null;
789
+ /** Item description. */
790
+ description?: string | null;
791
+ /**
792
+ * Item data type. One of:
793
+ * <br />
794
+ * +`"IMAGE"`
795
+ * <br />
796
+ * +`"VIDEO"`
797
+ * @readonly
798
+ */
799
+ type?: Type;
800
+ /**
801
+ * Date and time the item was created.
802
+ * @readonly
803
+ */
804
+ _createdDate?: Date;
805
+ /**
806
+ * Date and time the item was last updated.
807
+ * @readonly
808
+ */
809
+ _updatedDate?: Date;
810
+ /** Link from the item. */
811
+ link?: Link;
812
+ }
813
+
814
+ declare function createProjectItem$1(httpClient: HttpClient): (item: Item) => Promise<Item & {
815
+ image?: {
816
+ imageInfo: string;
817
+ focalPoint?: {
818
+ x: number;
819
+ y: number;
820
+ } | undefined;
821
+ } | undefined;
822
+ video?: {
823
+ videoInfo: string;
824
+ } | undefined;
825
+ type: Type;
826
+ }>;
827
+ declare function getProjectItem$1(httpClient: HttpClient): (itemId: string) => Promise<Item & {
828
+ image?: {
829
+ imageInfo: string;
830
+ focalPoint?: {
831
+ x: number;
832
+ y: number;
833
+ } | undefined;
834
+ } | undefined;
835
+ video?: {
836
+ videoInfo: string;
837
+ } | undefined;
838
+ type: Type;
839
+ }>;
840
+ declare function listProjectItems$1(httpClient: HttpClient): (projectId: string, options?: ListProjectItemsOptions) => Promise<ListProjectItemsResponse & ListProjectItemsResponseNonNullableFields>;
841
+ declare function updateProjectItem$1(httpClient: HttpClient): (_id: string | null, item: UpdateProjectItem) => Promise<Item & {
842
+ image?: {
843
+ imageInfo: string;
844
+ focalPoint?: {
845
+ x: number;
846
+ y: number;
847
+ } | undefined;
848
+ } | undefined;
849
+ video?: {
850
+ videoInfo: string;
851
+ } | undefined;
852
+ type: Type;
853
+ }>;
854
+ declare function deleteProjectItem$1(httpClient: HttpClient): (itemId: string) => Promise<DeleteProjectItemResponse & DeleteProjectItemResponseNonNullableFields>;
855
+ declare const onProjectItemCreated$1: EventDefinition<ProjectItemCreatedEnvelope, "wix.portfolio.project_items.v1.project_item_created">;
856
+ declare const onProjectItemUpdated$1: EventDefinition<ProjectItemUpdatedEnvelope, "wix.portfolio.project_items.v1.project_item_updated">;
857
+ declare const onProjectItemDeleted$1: EventDefinition<ProjectItemDeletedEnvelope, "wix.portfolio.project_items.v1.project_item_deleted">;
858
+
859
+ declare const createProjectItem: BuildRESTFunction<typeof createProjectItem$1>;
860
+ declare const getProjectItem: BuildRESTFunction<typeof getProjectItem$1>;
861
+ declare const listProjectItems: BuildRESTFunction<typeof listProjectItems$1>;
862
+ declare const updateProjectItem: BuildRESTFunction<typeof updateProjectItem$1>;
863
+ declare const deleteProjectItem: BuildRESTFunction<typeof deleteProjectItem$1>;
864
+ declare const onProjectItemCreated: BuildEventDefinition<typeof onProjectItemCreated$1>;
865
+ declare const onProjectItemUpdated: BuildEventDefinition<typeof onProjectItemUpdated$1>;
866
+ declare const onProjectItemDeleted: BuildEventDefinition<typeof onProjectItemDeleted$1>;
867
+
868
+ declare const context$2_createProjectItem: typeof createProjectItem;
869
+ declare const context$2_deleteProjectItem: typeof deleteProjectItem;
870
+ declare const context$2_getProjectItem: typeof getProjectItem;
871
+ declare const context$2_listProjectItems: typeof listProjectItems;
872
+ declare const context$2_onProjectItemCreated: typeof onProjectItemCreated;
873
+ declare const context$2_onProjectItemDeleted: typeof onProjectItemDeleted;
874
+ declare const context$2_onProjectItemUpdated: typeof onProjectItemUpdated;
875
+ declare const context$2_updateProjectItem: typeof updateProjectItem;
876
+ declare namespace context$2 {
877
+ export { context$2_createProjectItem as createProjectItem, context$2_deleteProjectItem as deleteProjectItem, context$2_getProjectItem as getProjectItem, context$2_listProjectItems as listProjectItems, context$2_onProjectItemCreated as onProjectItemCreated, context$2_onProjectItemDeleted as onProjectItemDeleted, context$2_onProjectItemUpdated as onProjectItemUpdated, context$2_updateProjectItem as updateProjectItem };
878
+ }
879
+
880
+ /** Project is the main entity of ProjectsService */
881
+ interface Project$1 extends ProjectCoverOneOf$1 {
882
+ /** project's cover photo */
883
+ coverImage?: Image$1;
884
+ /** project's cover video */
885
+ coverVideo?: Video$1;
886
+ /**
887
+ * Project ID
888
+ * @readonly
889
+ */
890
+ _id?: string | null;
891
+ /**
892
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision
893
+ * @readonly
894
+ */
895
+ revision?: string | null;
896
+ title?: string | null;
897
+ description?: string | null;
898
+ /** indicates if the project should be hidden from Portfolio */
899
+ hidden?: boolean | null;
900
+ /** Collections must exist to be added to a project. can be created/updated/deleted using this //TODO */
901
+ collectionIds?: string[];
902
+ /** Custom project details */
903
+ details?: ProjectDetail$1[];
904
+ slug?: string | null;
905
+ /**
906
+ * Represents the time this Project was created
907
+ * @readonly
908
+ */
909
+ _createdDate?: Date;
910
+ /**
911
+ * Represents the time this Project was last updated
912
+ * @readonly
913
+ */
914
+ _updatedDate?: Date;
915
+ /**
916
+ * Url and relative url of Project - in order to receive this field in READ requests you will need to pass the `include_page_url` field as part of request
917
+ * @readonly
918
+ */
919
+ url?: string;
920
+ seoData?: SeoSchema$1;
921
+ /**
922
+ * indicates if the project is synced from external platform (via integration page) and therefore will be updated from the external platform on daily basis
923
+ * @readonly
924
+ */
925
+ syncedProject?: boolean | null;
926
+ }
927
+ /** @oneof */
928
+ interface ProjectCoverOneOf$1 {
929
+ /** project's cover photo */
930
+ coverImage?: Image$1;
931
+ /** project's cover video */
932
+ coverVideo?: Video$1;
933
+ }
934
+ interface Image$1 {
935
+ /** Image info - Wix Media Image. */
936
+ imageInfo?: string;
937
+ /** Focal point of the image. */
938
+ focalPoint?: Point$1;
939
+ }
940
+ interface Point$1 {
941
+ /** X-coordinate of the focal point. */
942
+ x?: number;
943
+ /** Y-coordinate of the focal point. */
944
+ y?: number;
945
+ }
946
+ interface Video$1 {
947
+ /** Video info - Wix Media Image. */
948
+ videoInfo?: string;
949
+ /** Manually defined Video duration in milliseconds. */
950
+ durationInMillis?: number | null;
951
+ }
952
+ interface ProjectDetail$1 extends ProjectDetailValueOneOf$1 {
953
+ text?: string;
954
+ link?: DetailsLink$1;
955
+ label?: string;
956
+ }
957
+ /** @oneof */
958
+ interface ProjectDetailValueOneOf$1 {
959
+ text?: string;
960
+ link?: DetailsLink$1;
961
+ }
962
+ interface DetailsLink$1 {
963
+ text?: string | null;
964
+ /** link to external source */
965
+ url?: string | null;
966
+ /**
967
+ * Whether the link opens in a new tab or window. One of:
968
+ * * `'_blank'`: The link opens in a new tab or window.
969
+ * * `'_self'`: The link opens in the same tab or window.
970
+ */
971
+ target?: string | null;
972
+ }
973
+ /**
974
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
975
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
976
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
977
+ */
978
+ interface SeoSchema$1 {
979
+ /** SEO tag information. */
980
+ tags?: Tag$1[];
981
+ /** SEO general settings. */
982
+ settings?: Settings$1;
983
+ }
984
+ interface Keyword$1 {
985
+ /** Keyword value. */
986
+ term?: string;
987
+ /** Whether the keyword is the main focus keyword. */
988
+ isMain?: boolean;
989
+ }
990
+ interface Tag$1 {
991
+ /**
992
+ * SEO tag type.
993
+ *
994
+ *
995
+ * Supported values: `title`, `meta`, `script`, `link`.
996
+ */
997
+ type?: string;
998
+ /**
999
+ * A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
1000
+ * For example: `{'name': 'description', 'content': 'the description itself'}`.
1001
+ */
1002
+ props?: Record<string, any> | null;
1003
+ /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
1004
+ meta?: Record<string, any> | null;
1005
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
1006
+ children?: string;
1007
+ /** Whether the tag is a custom tag. */
1008
+ custom?: boolean;
1009
+ /** Whether the tag is disabled. */
1010
+ disabled?: boolean;
1011
+ }
1012
+ interface Settings$1 {
1013
+ /**
1014
+ * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
1015
+ *
1016
+ *
1017
+ * Default: `false` (Auto Redirect is enabled.)
1018
+ */
1019
+ preventAutoRedirect?: boolean;
1020
+ /** User-selected keyword terms for a specific page. */
1021
+ keywords?: Keyword$1[];
1022
+ }
1023
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
1024
+ /** ID of a site visitor that has not logged in to the site. */
1025
+ anonymousVisitorId?: string;
1026
+ /** ID of a site visitor that has logged in to the site. */
1027
+ memberId?: string;
1028
+ /** ID of a Wix user (site owner, contributor, etc.). */
1029
+ wixUserId?: string;
1030
+ /** ID of an app. */
1031
+ appId?: string;
1032
+ /** @readonly */
1033
+ identityType?: WebhookIdentityType$1;
1034
+ }
1035
+ /** @oneof */
1036
+ interface IdentificationDataIdOneOf$1 {
1037
+ /** ID of a site visitor that has not logged in to the site. */
1038
+ anonymousVisitorId?: string;
1039
+ /** ID of a site visitor that has logged in to the site. */
1040
+ memberId?: string;
1041
+ /** ID of a Wix user (site owner, contributor, etc.). */
1042
+ wixUserId?: string;
1043
+ /** ID of an app. */
1044
+ appId?: string;
1045
+ }
1046
+ declare enum WebhookIdentityType$1 {
1047
+ UNKNOWN = "UNKNOWN",
1048
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1049
+ MEMBER = "MEMBER",
1050
+ WIX_USER = "WIX_USER",
1051
+ APP = "APP"
1052
+ }
1053
+ interface CursorPaging {
1054
+ /** Maximum number of items to return in the results. */
1055
+ limit?: number | null;
1056
+ /**
1057
+ * Pointer to the next or previous page in the list of results.
1058
+ *
1059
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1060
+ * Not relevant for the first request.
1061
+ */
1062
+ cursor?: string | null;
1063
+ }
1064
+ interface ListProjectsResponse {
1065
+ /** The retrieved Projects */
1066
+ projects?: Project$1[];
1067
+ /** Paging metadata */
1068
+ metadata?: PagingMetadataV2;
1069
+ }
1070
+ interface PagingMetadataV2 {
1071
+ /** Number of items returned in the response. */
1072
+ count?: number | null;
1073
+ /** Offset that was requested. */
1074
+ offset?: number | null;
1075
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1076
+ total?: number | null;
1077
+ /** Flag that indicates the server failed to calculate the `total` field. */
1078
+ tooManyToCount?: boolean | null;
1079
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1080
+ cursors?: Cursors$1;
1081
+ }
1082
+ interface Cursors$1 {
1083
+ /** Cursor string pointing to the next page in the list of results. */
1084
+ next?: string | null;
1085
+ /** Cursor pointing to the previous page in the list of results. */
1086
+ prev?: string | null;
1087
+ }
1088
+ interface DeleteProjectResponse {
1089
+ /** Id of the deleted Project */
1090
+ projectId?: string;
1091
+ }
1092
+ interface ListProjectsResponseNonNullableFields {
1093
+ projects: {
1094
+ coverImage?: {
1095
+ imageInfo: string;
1096
+ focalPoint?: {
1097
+ x: number;
1098
+ y: number;
1099
+ };
1100
+ };
1101
+ coverVideo?: {
1102
+ videoInfo: string;
1103
+ };
1104
+ collectionIds: string[];
1105
+ details: {
1106
+ text: string;
1107
+ label: string;
1108
+ }[];
1109
+ url: string;
1110
+ seoData?: {
1111
+ tags: {
1112
+ type: string;
1113
+ children: string;
1114
+ custom: boolean;
1115
+ disabled: boolean;
1116
+ }[];
1117
+ settings?: {
1118
+ preventAutoRedirect: boolean;
1119
+ keywords: {
1120
+ term: string;
1121
+ isMain: boolean;
1122
+ }[];
1123
+ };
1124
+ };
1125
+ }[];
1126
+ }
1127
+ interface DeleteProjectResponseNonNullableFields {
1128
+ projectId: string;
1129
+ }
1130
+ interface BaseEventMetadata$1 {
1131
+ /** App instance ID. */
1132
+ instanceId?: string | null;
1133
+ /** Event type. */
1134
+ eventType?: string;
1135
+ /** The identification type and identity data. */
1136
+ identity?: IdentificationData$1;
1137
+ }
1138
+ interface EventMetadata$1 extends BaseEventMetadata$1 {
1139
+ /**
1140
+ * Unique event ID.
1141
+ * Allows clients to ignore duplicate webhooks.
1142
+ */
1143
+ _id?: string;
1144
+ /**
1145
+ * Assumes actions are also always typed to an entity_type
1146
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1147
+ */
1148
+ entityFqdn?: string;
1149
+ /**
1150
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1151
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1152
+ * Example: created/updated/deleted/started/completed/email_opened
1153
+ */
1154
+ slug?: string;
1155
+ /** ID of the entity associated with the event. */
1156
+ entityId?: string;
1157
+ /** Event timestamp. */
1158
+ eventTime?: Date;
1159
+ /**
1160
+ * Whether the event was triggered as a result of a privacy regulation application
1161
+ * (for example, GDPR).
1162
+ */
1163
+ triggeredByAnonymizeRequest?: boolean | null;
1164
+ /** If present, indicates the action that triggered the event. */
1165
+ originatedFrom?: string | null;
1166
+ /**
1167
+ * A sequence number defining the order of updates to the underlying entity.
1168
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1169
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1170
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1171
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1172
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1173
+ */
1174
+ entityEventSequence?: string | null;
1175
+ }
1176
+ interface ProjectCreatedEnvelope {
1177
+ entity: Project$1;
1178
+ metadata: EventMetadata$1;
1179
+ }
1180
+ interface ProjectUpdatedEnvelope {
1181
+ entity: Project$1;
1182
+ metadata: EventMetadata$1;
1183
+ }
1184
+ interface ProjectDeletedEnvelope {
1185
+ metadata: EventMetadata$1;
1186
+ }
1187
+ interface GetProjectOptions {
1188
+ includePageUrl?: boolean | null;
1189
+ }
1190
+ interface ListProjectsOptions {
1191
+ /** Projects limit per response is maximum 100, In the first request the cursor is None */
1192
+ paging?: CursorPaging;
1193
+ includePageUrl?: boolean | null;
1194
+ }
1195
+ interface UpdateProject {
1196
+ /** project's cover photo */
1197
+ coverImage?: Image$1;
1198
+ /** project's cover video */
1199
+ coverVideo?: Video$1;
1200
+ /**
1201
+ * Project ID
1202
+ * @readonly
1203
+ */
1204
+ _id?: string | null;
1205
+ /**
1206
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision
1207
+ * @readonly
1208
+ */
1209
+ revision?: string | null;
1210
+ title?: string | null;
1211
+ description?: string | null;
1212
+ /** indicates if the project should be hidden from Portfolio */
1213
+ hidden?: boolean | null;
1214
+ /** Collections must exist to be added to a project. can be created/updated/deleted using this //TODO */
1215
+ collectionIds?: string[];
1216
+ /** Custom project details */
1217
+ details?: ProjectDetail$1[];
1218
+ slug?: string | null;
1219
+ /**
1220
+ * Represents the time this Project was created
1221
+ * @readonly
1222
+ */
1223
+ _createdDate?: Date;
1224
+ /**
1225
+ * Represents the time this Project was last updated
1226
+ * @readonly
1227
+ */
1228
+ _updatedDate?: Date;
1229
+ /**
1230
+ * Url and relative url of Project - in order to receive this field in READ requests you will need to pass the `include_page_url` field as part of request
1231
+ * @readonly
1232
+ */
1233
+ url?: string;
1234
+ seoData?: SeoSchema$1;
1235
+ /**
1236
+ * indicates if the project is synced from external platform (via integration page) and therefore will be updated from the external platform on daily basis
1237
+ * @readonly
1238
+ */
1239
+ syncedProject?: boolean | null;
1240
+ }
1241
+ interface QueryProjectsOptions {
1242
+ includePageUrl?: boolean | null | undefined;
1243
+ }
1244
+ interface QueryCursorResult$1 {
1245
+ cursors: Cursors$1;
1246
+ hasNext: () => boolean;
1247
+ hasPrev: () => boolean;
1248
+ length: number;
1249
+ pageSize: number;
1250
+ }
1251
+ interface ProjectsQueryResult extends QueryCursorResult$1 {
1252
+ items: Project$1[];
1253
+ query: ProjectsQueryBuilder;
1254
+ next: () => Promise<ProjectsQueryResult>;
1255
+ prev: () => Promise<ProjectsQueryResult>;
1256
+ }
1257
+ interface ProjectsQueryBuilder {
1258
+ /** @param propertyName - Property whose value is compared with `value`.
1259
+ * @param value - Value to compare against.
1260
+ * @documentationMaturity preview
1261
+ */
1262
+ eq: (propertyName: '_id' | 'title' | 'description' | 'hidden' | 'collectionIds' | 'slug' | '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1263
+ /** @param propertyName - Property whose value is compared with `value`.
1264
+ * @param value - Value to compare against.
1265
+ * @documentationMaturity preview
1266
+ */
1267
+ ne: (propertyName: '_id' | 'title' | 'description' | 'hidden' | 'collectionIds' | 'slug' | '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1268
+ /** @param propertyName - Property whose value is compared with `value`.
1269
+ * @param value - Value to compare against.
1270
+ * @documentationMaturity preview
1271
+ */
1272
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1273
+ /** @param propertyName - Property whose value is compared with `value`.
1274
+ * @param value - Value to compare against.
1275
+ * @documentationMaturity preview
1276
+ */
1277
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1278
+ /** @param propertyName - Property whose value is compared with `value`.
1279
+ * @param value - Value to compare against.
1280
+ * @documentationMaturity preview
1281
+ */
1282
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1283
+ /** @param propertyName - Property whose value is compared with `value`.
1284
+ * @param value - Value to compare against.
1285
+ * @documentationMaturity preview
1286
+ */
1287
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1288
+ /** @param propertyName - Property whose value is compared with `string`.
1289
+ * @param string - String to compare against. Case-insensitive.
1290
+ * @documentationMaturity preview
1291
+ */
1292
+ startsWith: (propertyName: '_id' | 'title' | 'description' | 'slug', value: string) => ProjectsQueryBuilder;
1293
+ /** @param propertyName - Property whose value is compared with `values`.
1294
+ * @param values - List of values to compare against.
1295
+ * @documentationMaturity preview
1296
+ */
1297
+ hasSome: (propertyName: '_id' | 'title' | 'description' | 'hidden' | 'collectionIds' | 'slug' | '_createdDate' | '_updatedDate', value: any[]) => ProjectsQueryBuilder;
1298
+ /** @param propertyName - Property whose value is compared with `values`.
1299
+ * @param values - List of values to compare against.
1300
+ * @documentationMaturity preview
1301
+ */
1302
+ hasAll: (propertyName: 'collectionIds', value: any[]) => ProjectsQueryBuilder;
1303
+ /** @documentationMaturity preview */
1304
+ in: (propertyName: '_id' | 'title' | 'description' | 'hidden' | 'collectionIds' | 'slug' | '_createdDate' | '_updatedDate', value: any) => ProjectsQueryBuilder;
1305
+ /** @documentationMaturity preview */
1306
+ exists: (propertyName: '_id' | 'title' | 'description' | 'hidden' | 'collectionIds' | 'slug' | '_createdDate' | '_updatedDate', value: boolean) => ProjectsQueryBuilder;
1307
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1308
+ * @documentationMaturity preview
1309
+ */
1310
+ ascending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | '_createdDate' | '_updatedDate'>) => ProjectsQueryBuilder;
1311
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1312
+ * @documentationMaturity preview
1313
+ */
1314
+ descending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | '_createdDate' | '_updatedDate'>) => ProjectsQueryBuilder;
1315
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1316
+ * @documentationMaturity preview
1317
+ */
1318
+ limit: (limit: number) => ProjectsQueryBuilder;
1319
+ /** @param cursor - A pointer to specific record
1320
+ * @documentationMaturity preview
1321
+ */
1322
+ skipTo: (cursor: string) => ProjectsQueryBuilder;
1323
+ /** @documentationMaturity preview */
1324
+ find: () => Promise<ProjectsQueryResult>;
1325
+ }
1326
+
1327
+ declare function createProject$1(httpClient: HttpClient): (project: Project$1) => Promise<Project$1 & {
1328
+ coverImage?: {
1329
+ imageInfo: string;
1330
+ focalPoint?: {
1331
+ x: number;
1332
+ y: number;
1333
+ } | undefined;
1334
+ } | undefined;
1335
+ coverVideo?: {
1336
+ videoInfo: string;
1337
+ } | undefined;
1338
+ collectionIds: string[];
1339
+ details: {
1340
+ text: string;
1341
+ label: string;
1342
+ }[];
1343
+ url: string;
1344
+ seoData?: {
1345
+ tags: {
1346
+ type: string;
1347
+ children: string;
1348
+ custom: boolean;
1349
+ disabled: boolean;
1350
+ }[];
1351
+ settings?: {
1352
+ preventAutoRedirect: boolean;
1353
+ keywords: {
1354
+ term: string;
1355
+ isMain: boolean;
1356
+ }[];
1357
+ } | undefined;
1358
+ } | undefined;
1359
+ }>;
1360
+ declare function getProject$1(httpClient: HttpClient): (projectId: string, options?: GetProjectOptions) => Promise<Project$1 & {
1361
+ coverImage?: {
1362
+ imageInfo: string;
1363
+ focalPoint?: {
1364
+ x: number;
1365
+ y: number;
1366
+ } | undefined;
1367
+ } | undefined;
1368
+ coverVideo?: {
1369
+ videoInfo: string;
1370
+ } | undefined;
1371
+ collectionIds: string[];
1372
+ details: {
1373
+ text: string;
1374
+ label: string;
1375
+ }[];
1376
+ url: string;
1377
+ seoData?: {
1378
+ tags: {
1379
+ type: string;
1380
+ children: string;
1381
+ custom: boolean;
1382
+ disabled: boolean;
1383
+ }[];
1384
+ settings?: {
1385
+ preventAutoRedirect: boolean;
1386
+ keywords: {
1387
+ term: string;
1388
+ isMain: boolean;
1389
+ }[];
1390
+ } | undefined;
1391
+ } | undefined;
1392
+ }>;
1393
+ declare function listProjects$1(httpClient: HttpClient): (options?: ListProjectsOptions) => Promise<ListProjectsResponse & ListProjectsResponseNonNullableFields>;
1394
+ declare function updateProject$1(httpClient: HttpClient): (_id: string | null, project: UpdateProject) => Promise<Project$1 & {
1395
+ coverImage?: {
1396
+ imageInfo: string;
1397
+ focalPoint?: {
1398
+ x: number;
1399
+ y: number;
1400
+ } | undefined;
1401
+ } | undefined;
1402
+ coverVideo?: {
1403
+ videoInfo: string;
1404
+ } | undefined;
1405
+ collectionIds: string[];
1406
+ details: {
1407
+ text: string;
1408
+ label: string;
1409
+ }[];
1410
+ url: string;
1411
+ seoData?: {
1412
+ tags: {
1413
+ type: string;
1414
+ children: string;
1415
+ custom: boolean;
1416
+ disabled: boolean;
1417
+ }[];
1418
+ settings?: {
1419
+ preventAutoRedirect: boolean;
1420
+ keywords: {
1421
+ term: string;
1422
+ isMain: boolean;
1423
+ }[];
1424
+ } | undefined;
1425
+ } | undefined;
1426
+ }>;
1427
+ declare function deleteProject$1(httpClient: HttpClient): (projectId: string) => Promise<DeleteProjectResponse & DeleteProjectResponseNonNullableFields>;
1428
+ declare function queryProjects$1(httpClient: HttpClient): (options?: QueryProjectsOptions) => ProjectsQueryBuilder;
1429
+ declare const onProjectCreated$1: EventDefinition<ProjectCreatedEnvelope, "wix.portfolio.projects.v1.project_created">;
1430
+ declare const onProjectUpdated$1: EventDefinition<ProjectUpdatedEnvelope, "wix.portfolio.projects.v1.project_updated">;
1431
+ declare const onProjectDeleted$1: EventDefinition<ProjectDeletedEnvelope, "wix.portfolio.projects.v1.project_deleted">;
1432
+
1433
+ declare const createProject: BuildRESTFunction<typeof createProject$1>;
1434
+ declare const getProject: BuildRESTFunction<typeof getProject$1>;
1435
+ declare const listProjects: BuildRESTFunction<typeof listProjects$1>;
1436
+ declare const updateProject: BuildRESTFunction<typeof updateProject$1>;
1437
+ declare const deleteProject: BuildRESTFunction<typeof deleteProject$1>;
1438
+ declare const queryProjects: BuildRESTFunction<typeof queryProjects$1>;
1439
+ declare const onProjectCreated: BuildEventDefinition<typeof onProjectCreated$1>;
1440
+ declare const onProjectUpdated: BuildEventDefinition<typeof onProjectUpdated$1>;
1441
+ declare const onProjectDeleted: BuildEventDefinition<typeof onProjectDeleted$1>;
1442
+
1443
+ declare const context$1_createProject: typeof createProject;
1444
+ declare const context$1_deleteProject: typeof deleteProject;
1445
+ declare const context$1_getProject: typeof getProject;
1446
+ declare const context$1_listProjects: typeof listProjects;
1447
+ declare const context$1_onProjectCreated: typeof onProjectCreated;
1448
+ declare const context$1_onProjectDeleted: typeof onProjectDeleted;
1449
+ declare const context$1_onProjectUpdated: typeof onProjectUpdated;
1450
+ declare const context$1_queryProjects: typeof queryProjects;
1451
+ declare const context$1_updateProject: typeof updateProject;
1452
+ declare namespace context$1 {
1453
+ export { context$1_createProject as createProject, context$1_deleteProject as deleteProject, context$1_getProject as getProject, context$1_listProjects as listProjects, context$1_onProjectCreated as onProjectCreated, context$1_onProjectDeleted as onProjectDeleted, context$1_onProjectUpdated as onProjectUpdated, context$1_queryProjects as queryProjects, context$1_updateProject as updateProject };
1454
+ }
1455
+
1456
+ interface ProjectInCollection {
1457
+ /** Collection ID */
1458
+ collectionId?: string;
1459
+ /** Project */
1460
+ project?: Project;
1461
+ /** The sort order of the project in the given Collection */
1462
+ sortOrder?: number | null;
1463
+ }
1464
+ /** Project is the main entity of ProjectsService */
1465
+ interface Project extends ProjectCoverOneOf {
1466
+ /** project's cover photo */
1467
+ coverImage?: Image;
1468
+ /** project's cover video */
1469
+ coverVideo?: Video;
1470
+ /**
1471
+ * Project ID
1472
+ * @readonly
1473
+ */
1474
+ _id?: string | null;
1475
+ /**
1476
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision
1477
+ * @readonly
1478
+ */
1479
+ revision?: string | null;
1480
+ title?: string | null;
1481
+ description?: string | null;
1482
+ /** indicates if the project should be hidden from Portfolio */
1483
+ hidden?: boolean | null;
1484
+ /** Collections must exist to be added to a project. can be created/updated/deleted using this //TODO */
1485
+ collectionIds?: string[];
1486
+ /** Custom project details */
1487
+ details?: ProjectDetail[];
1488
+ slug?: string | null;
1489
+ /**
1490
+ * Represents the time this Project was created
1491
+ * @readonly
1492
+ */
1493
+ _createdDate?: Date;
1494
+ /**
1495
+ * Represents the time this Project was last updated
1496
+ * @readonly
1497
+ */
1498
+ _updatedDate?: Date;
1499
+ /**
1500
+ * Url and relative url of Project - in order to receive this field in READ requests you will need to pass the `include_page_url` field as part of request
1501
+ * @readonly
1502
+ */
1503
+ url?: string;
1504
+ seoData?: SeoSchema;
1505
+ /**
1506
+ * indicates if the project is synced from external platform (via integration page) and therefore will be updated from the external platform on daily basis
1507
+ * @readonly
1508
+ */
1509
+ syncedProject?: boolean | null;
1510
+ }
1511
+ /** @oneof */
1512
+ interface ProjectCoverOneOf {
1513
+ /** project's cover photo */
1514
+ coverImage?: Image;
1515
+ /** project's cover video */
1516
+ coverVideo?: Video;
1517
+ }
1518
+ interface Image {
1519
+ /** Image info - Wix Media Image. */
1520
+ imageInfo?: string;
1521
+ /** Focal point of the image. */
1522
+ focalPoint?: Point;
1523
+ }
1524
+ interface Point {
1525
+ /** X-coordinate of the focal point. */
1526
+ x?: number;
1527
+ /** Y-coordinate of the focal point. */
1528
+ y?: number;
1529
+ }
1530
+ interface Video {
1531
+ /** Video info - Wix Media Image. */
1532
+ videoInfo?: string;
1533
+ /** Manually defined Video duration in milliseconds. */
1534
+ durationInMillis?: number | null;
1535
+ }
1536
+ interface ProjectDetail extends ProjectDetailValueOneOf {
1537
+ text?: string;
1538
+ link?: DetailsLink;
1539
+ label?: string;
1540
+ }
1541
+ /** @oneof */
1542
+ interface ProjectDetailValueOneOf {
1543
+ text?: string;
1544
+ link?: DetailsLink;
1545
+ }
1546
+ interface DetailsLink {
1547
+ text?: string | null;
1548
+ /** link to external source */
1549
+ url?: string | null;
1550
+ /**
1551
+ * Whether the link opens in a new tab or window. One of:
1552
+ * * `'_blank'`: The link opens in a new tab or window.
1553
+ * * `'_self'`: The link opens in the same tab or window.
1554
+ */
1555
+ target?: string | null;
1556
+ }
1557
+ /**
1558
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
1559
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
1560
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
1561
+ */
1562
+ interface SeoSchema {
1563
+ /** SEO tag information. */
1564
+ tags?: Tag[];
1565
+ /** SEO general settings. */
1566
+ settings?: Settings;
1567
+ }
1568
+ interface Keyword {
1569
+ /** Keyword value. */
1570
+ term?: string;
1571
+ /** Whether the keyword is the main focus keyword. */
1572
+ isMain?: boolean;
1573
+ }
1574
+ interface Tag {
1575
+ /**
1576
+ * SEO tag type.
1577
+ *
1578
+ *
1579
+ * Supported values: `title`, `meta`, `script`, `link`.
1580
+ */
1581
+ type?: string;
1582
+ /**
1583
+ * A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
1584
+ * For example: `{'name': 'description', 'content': 'the description itself'}`.
1585
+ */
1586
+ props?: Record<string, any> | null;
1587
+ /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
1588
+ meta?: Record<string, any> | null;
1589
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
1590
+ children?: string;
1591
+ /** Whether the tag is a custom tag. */
1592
+ custom?: boolean;
1593
+ /** Whether the tag is disabled. */
1594
+ disabled?: boolean;
1595
+ }
1596
+ interface Settings {
1597
+ /**
1598
+ * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
1599
+ *
1600
+ *
1601
+ * Default: `false` (Auto Redirect is enabled.)
1602
+ */
1603
+ preventAutoRedirect?: boolean;
1604
+ /** User-selected keyword terms for a specific page. */
1605
+ keywords?: Keyword[];
1606
+ }
1607
+ interface Cursors {
1608
+ /** Cursor string pointing to the next page in the list of results. */
1609
+ next?: string | null;
1610
+ /** Cursor pointing to the previous page in the list of results. */
1611
+ prev?: string | null;
1612
+ }
1613
+ interface UpdateProjectOrderInCollectionResponse {
1614
+ /** project with new sort order set */
1615
+ projectInCollection?: ProjectInCollection;
1616
+ }
1617
+ interface ProjectOrderInCollectionUpdatedEvent {
1618
+ /** Id of the Project to update its order */
1619
+ projectId?: string;
1620
+ /** Id of the collection in which the project will be re-ordered */
1621
+ collectionId?: string;
1622
+ /** The new sort order of the project in the given collection */
1623
+ sortOrder?: number | null;
1624
+ }
1625
+ interface IdentificationData extends IdentificationDataIdOneOf {
1626
+ /** ID of a site visitor that has not logged in to the site. */
1627
+ anonymousVisitorId?: string;
1628
+ /** ID of a site visitor that has logged in to the site. */
1629
+ memberId?: string;
1630
+ /** ID of a Wix user (site owner, contributor, etc.). */
1631
+ wixUserId?: string;
1632
+ /** ID of an app. */
1633
+ appId?: string;
1634
+ /** @readonly */
1635
+ identityType?: WebhookIdentityType;
1636
+ }
1637
+ /** @oneof */
1638
+ interface IdentificationDataIdOneOf {
1639
+ /** ID of a site visitor that has not logged in to the site. */
1640
+ anonymousVisitorId?: string;
1641
+ /** ID of a site visitor that has logged in to the site. */
1642
+ memberId?: string;
1643
+ /** ID of a Wix user (site owner, contributor, etc.). */
1644
+ wixUserId?: string;
1645
+ /** ID of an app. */
1646
+ appId?: string;
1647
+ }
1648
+ declare enum WebhookIdentityType {
1649
+ UNKNOWN = "UNKNOWN",
1650
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1651
+ MEMBER = "MEMBER",
1652
+ WIX_USER = "WIX_USER",
1653
+ APP = "APP"
1654
+ }
1655
+ interface UpdateProjectOrderInCollectionResponseNonNullableFields {
1656
+ projectInCollection?: {
1657
+ collectionId: string;
1658
+ project?: {
1659
+ coverImage?: {
1660
+ imageInfo: string;
1661
+ focalPoint?: {
1662
+ x: number;
1663
+ y: number;
1664
+ };
1665
+ };
1666
+ coverVideo?: {
1667
+ videoInfo: string;
1668
+ };
1669
+ collectionIds: string[];
1670
+ details: {
1671
+ text: string;
1672
+ label: string;
1673
+ }[];
1674
+ url: string;
1675
+ seoData?: {
1676
+ tags: {
1677
+ type: string;
1678
+ children: string;
1679
+ custom: boolean;
1680
+ disabled: boolean;
1681
+ }[];
1682
+ settings?: {
1683
+ preventAutoRedirect: boolean;
1684
+ keywords: {
1685
+ term: string;
1686
+ isMain: boolean;
1687
+ }[];
1688
+ };
1689
+ };
1690
+ };
1691
+ };
1692
+ }
1693
+ interface BaseEventMetadata {
1694
+ /** App instance ID. */
1695
+ instanceId?: string | null;
1696
+ /** Event type. */
1697
+ eventType?: string;
1698
+ /** The identification type and identity data. */
1699
+ identity?: IdentificationData;
1700
+ }
1701
+ interface EventMetadata extends BaseEventMetadata {
1702
+ /**
1703
+ * Unique event ID.
1704
+ * Allows clients to ignore duplicate webhooks.
1705
+ */
1706
+ _id?: string;
1707
+ /**
1708
+ * Assumes actions are also always typed to an entity_type
1709
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1710
+ */
1711
+ entityFqdn?: string;
1712
+ /**
1713
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1714
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1715
+ * Example: created/updated/deleted/started/completed/email_opened
1716
+ */
1717
+ slug?: string;
1718
+ /** ID of the entity associated with the event. */
1719
+ entityId?: string;
1720
+ /** Event timestamp. */
1721
+ eventTime?: Date;
1722
+ /**
1723
+ * Whether the event was triggered as a result of a privacy regulation application
1724
+ * (for example, GDPR).
1725
+ */
1726
+ triggeredByAnonymizeRequest?: boolean | null;
1727
+ /** If present, indicates the action that triggered the event. */
1728
+ originatedFrom?: string | null;
1729
+ /**
1730
+ * A sequence number defining the order of updates to the underlying entity.
1731
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1732
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1733
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1734
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1735
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1736
+ */
1737
+ entityEventSequence?: string | null;
1738
+ }
1739
+ interface ProjectInCollectionProjectOrderInCollectionUpdatedEnvelope {
1740
+ data: ProjectOrderInCollectionUpdatedEvent;
1741
+ metadata: EventMetadata;
1742
+ }
1743
+ interface QueryProjectInCollectionsOptions {
1744
+ includePageUrl?: boolean | null | undefined;
1745
+ }
1746
+ interface QueryCursorResult {
1747
+ cursors: Cursors;
1748
+ hasNext: () => boolean;
1749
+ hasPrev: () => boolean;
1750
+ length: number;
1751
+ pageSize: number;
1752
+ }
1753
+ interface ProjectInCollectionsQueryResult extends QueryCursorResult {
1754
+ items: ProjectInCollection[];
1755
+ query: ProjectInCollectionsQueryBuilder;
1756
+ next: () => Promise<ProjectInCollectionsQueryResult>;
1757
+ prev: () => Promise<ProjectInCollectionsQueryResult>;
1758
+ }
1759
+ interface ProjectInCollectionsQueryBuilder {
1760
+ /** @param propertyName - Property whose value is compared with `value`.
1761
+ * @param value - Value to compare against.
1762
+ * @documentationMaturity preview
1763
+ */
1764
+ eq: (propertyName: 'collectionId' | 'project.id' | 'project.hidden' | 'project.slug' | 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1765
+ /** @param propertyName - Property whose value is compared with `value`.
1766
+ * @param value - Value to compare against.
1767
+ * @documentationMaturity preview
1768
+ */
1769
+ ne: (propertyName: 'collectionId' | 'project.id' | 'project.hidden' | 'project.slug' | 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1770
+ /** @param propertyName - Property whose value is compared with `value`.
1771
+ * @param value - Value to compare against.
1772
+ * @documentationMaturity preview
1773
+ */
1774
+ ge: (propertyName: 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1775
+ /** @param propertyName - Property whose value is compared with `value`.
1776
+ * @param value - Value to compare against.
1777
+ * @documentationMaturity preview
1778
+ */
1779
+ gt: (propertyName: 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1780
+ /** @param propertyName - Property whose value is compared with `value`.
1781
+ * @param value - Value to compare against.
1782
+ * @documentationMaturity preview
1783
+ */
1784
+ le: (propertyName: 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1785
+ /** @param propertyName - Property whose value is compared with `value`.
1786
+ * @param value - Value to compare against.
1787
+ * @documentationMaturity preview
1788
+ */
1789
+ lt: (propertyName: 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1790
+ /** @param propertyName - Property whose value is compared with `string`.
1791
+ * @param string - String to compare against. Case-insensitive.
1792
+ * @documentationMaturity preview
1793
+ */
1794
+ startsWith: (propertyName: 'collectionId' | 'project.id' | 'project.slug', value: string) => ProjectInCollectionsQueryBuilder;
1795
+ /** @param propertyName - Property whose value is compared with `values`.
1796
+ * @param values - List of values to compare against.
1797
+ * @documentationMaturity preview
1798
+ */
1799
+ hasSome: (propertyName: 'collectionId' | 'project.id' | 'project.hidden' | 'project.slug' | 'sortOrder', value: any[]) => ProjectInCollectionsQueryBuilder;
1800
+ /** @documentationMaturity preview */
1801
+ in: (propertyName: 'collectionId' | 'project.id' | 'project.hidden' | 'project.slug' | 'sortOrder', value: any) => ProjectInCollectionsQueryBuilder;
1802
+ /** @documentationMaturity preview */
1803
+ exists: (propertyName: 'collectionId' | 'project.id' | 'project.hidden' | 'project.slug' | 'sortOrder', value: boolean) => ProjectInCollectionsQueryBuilder;
1804
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1805
+ * @documentationMaturity preview
1806
+ */
1807
+ ascending: (...propertyNames: Array<'collectionId' | 'project.id' | 'project.slug' | 'sortOrder'>) => ProjectInCollectionsQueryBuilder;
1808
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1809
+ * @documentationMaturity preview
1810
+ */
1811
+ descending: (...propertyNames: Array<'collectionId' | 'project.id' | 'project.slug' | 'sortOrder'>) => ProjectInCollectionsQueryBuilder;
1812
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1813
+ * @documentationMaturity preview
1814
+ */
1815
+ limit: (limit: number) => ProjectInCollectionsQueryBuilder;
1816
+ /** @param cursor - A pointer to specific record
1817
+ * @documentationMaturity preview
1818
+ */
1819
+ skipTo: (cursor: string) => ProjectInCollectionsQueryBuilder;
1820
+ /** @documentationMaturity preview */
1821
+ find: () => Promise<ProjectInCollectionsQueryResult>;
1822
+ }
1823
+ interface UpdateProjectOrderInCollectionIdentifiers {
1824
+ /** Id of the Project to update its order */
1825
+ projectId: string;
1826
+ /** Id of the collection in which the project will be re-ordered */
1827
+ collectionId: string;
1828
+ }
1829
+
1830
+ declare function queryProjectInCollections$1(httpClient: HttpClient): (options?: QueryProjectInCollectionsOptions) => ProjectInCollectionsQueryBuilder;
1831
+ declare function updateProjectOrderInCollection$1(httpClient: HttpClient): (identifiers: UpdateProjectOrderInCollectionIdentifiers, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse & UpdateProjectOrderInCollectionResponseNonNullableFields>;
1832
+ declare const onProjectInCollectionProjectOrderInCollectionUpdatedEvent$1: EventDefinition<ProjectInCollectionProjectOrderInCollectionUpdatedEnvelope, "wix.portfolio.projects.v1.project_in_collection_project_order_in_collection_updated_event">;
1833
+
1834
+ declare const queryProjectInCollections: BuildRESTFunction<typeof queryProjectInCollections$1>;
1835
+ declare const updateProjectOrderInCollection: BuildRESTFunction<typeof updateProjectOrderInCollection$1>;
1836
+ declare const onProjectInCollectionProjectOrderInCollectionUpdatedEvent: BuildEventDefinition<typeof onProjectInCollectionProjectOrderInCollectionUpdatedEvent$1>;
1837
+
1838
+ declare const context_onProjectInCollectionProjectOrderInCollectionUpdatedEvent: typeof onProjectInCollectionProjectOrderInCollectionUpdatedEvent;
1839
+ declare const context_queryProjectInCollections: typeof queryProjectInCollections;
1840
+ declare const context_updateProjectOrderInCollection: typeof updateProjectOrderInCollection;
1841
+ declare namespace context {
1842
+ export { context_onProjectInCollectionProjectOrderInCollectionUpdatedEvent as onProjectInCollectionProjectOrderInCollectionUpdatedEvent, context_queryProjectInCollections as queryProjectInCollections, context_updateProjectOrderInCollection as updateProjectOrderInCollection };
1843
+ }
1844
+
1845
+ export { context$3 as collections, context as projectInCollections, context$2 as projectItems, context$1 as projects };