@wix/portfolio 1.0.49 → 1.0.51

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 (169) hide show
  1. package/build/cjs/context.d.ts +4 -4
  2. package/build/cjs/context.js +4 -4
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +4 -4
  5. package/build/cjs/index.js +4 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -4
  8. package/build/cjs/meta.js +4 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +4 -4
  11. package/build/es/context.js +4 -4
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +4 -4
  14. package/build/es/index.js +4 -4
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +4 -4
  17. package/build/es/meta.js +4 -4
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +14 -9
  20. package/build/cjs/index.typings.d.ts +0 -4
  21. package/build/cjs/index.typings.js +0 -31
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/portfolio-collections-v1-collection.context.d.ts +0 -8
  24. package/build/cjs/src/portfolio-collections-v1-collection.context.js +0 -71
  25. package/build/cjs/src/portfolio-collections-v1-collection.context.js.map +0 -1
  26. package/build/cjs/src/portfolio-collections-v1-collection.http.d.ts +0 -17
  27. package/build/cjs/src/portfolio-collections-v1-collection.http.js +0 -339
  28. package/build/cjs/src/portfolio-collections-v1-collection.http.js.map +0 -1
  29. package/build/cjs/src/portfolio-collections-v1-collection.meta.d.ts +0 -24
  30. package/build/cjs/src/portfolio-collections-v1-collection.meta.js +0 -142
  31. package/build/cjs/src/portfolio-collections-v1-collection.meta.js.map +0 -1
  32. package/build/cjs/src/portfolio-collections-v1-collection.public.d.ts +0 -86
  33. package/build/cjs/src/portfolio-collections-v1-collection.public.js +0 -49
  34. package/build/cjs/src/portfolio-collections-v1-collection.public.js.map +0 -1
  35. package/build/cjs/src/portfolio-collections-v1-collection.types.d.ts +0 -578
  36. package/build/cjs/src/portfolio-collections-v1-collection.types.js +0 -15
  37. package/build/cjs/src/portfolio-collections-v1-collection.types.js.map +0 -1
  38. package/build/cjs/src/portfolio-collections-v1-collection.universal.d.ts +0 -710
  39. package/build/cjs/src/portfolio-collections-v1-collection.universal.js +0 -411
  40. package/build/cjs/src/portfolio-collections-v1-collection.universal.js.map +0 -1
  41. package/build/cjs/src/portfolio-project-items-v1-project-item.context.d.ts +0 -7
  42. package/build/cjs/src/portfolio-project-items-v1-project-item.context.js +0 -60
  43. package/build/cjs/src/portfolio-project-items-v1-project-item.context.js.map +0 -1
  44. package/build/cjs/src/portfolio-project-items-v1-project-item.http.d.ts +0 -12
  45. package/build/cjs/src/portfolio-project-items-v1-project-item.http.js +0 -337
  46. package/build/cjs/src/portfolio-project-items-v1-project-item.http.js.map +0 -1
  47. package/build/cjs/src/portfolio-project-items-v1-project-item.meta.d.ts +0 -25
  48. package/build/cjs/src/portfolio-project-items-v1-project-item.meta.js +0 -123
  49. package/build/cjs/src/portfolio-project-items-v1-project-item.meta.js.map +0 -1
  50. package/build/cjs/src/portfolio-project-items-v1-project-item.public.d.ts +0 -49
  51. package/build/cjs/src/portfolio-project-items-v1-project-item.public.js +0 -44
  52. package/build/cjs/src/portfolio-project-items-v1-project-item.public.js.map +0 -1
  53. package/build/cjs/src/portfolio-project-items-v1-project-item.types.d.ts +0 -710
  54. package/build/cjs/src/portfolio-project-items-v1-project-item.types.js +0 -21
  55. package/build/cjs/src/portfolio-project-items-v1-project-item.types.js.map +0 -1
  56. package/build/cjs/src/portfolio-project-items-v1-project-item.universal.d.ts +0 -668
  57. package/build/cjs/src/portfolio-project-items-v1-project-item.universal.js +0 -344
  58. package/build/cjs/src/portfolio-project-items-v1-project-item.universal.js.map +0 -1
  59. package/build/cjs/src/portfolio-projects-v1-project-in-collection.context.d.ts +0 -4
  60. package/build/cjs/src/portfolio-projects-v1-project-in-collection.context.js +0 -27
  61. package/build/cjs/src/portfolio-projects-v1-project-in-collection.context.js.map +0 -1
  62. package/build/cjs/src/portfolio-projects-v1-project-in-collection.http.d.ts +0 -14
  63. package/build/cjs/src/portfolio-projects-v1-project-in-collection.http.js +0 -219
  64. package/build/cjs/src/portfolio-projects-v1-project-in-collection.http.js.map +0 -1
  65. package/build/cjs/src/portfolio-projects-v1-project-in-collection.meta.d.ts +0 -17
  66. package/build/cjs/src/portfolio-projects-v1-project-in-collection.meta.js +0 -69
  67. package/build/cjs/src/portfolio-projects-v1-project-in-collection.meta.js.map +0 -1
  68. package/build/cjs/src/portfolio-projects-v1-project-in-collection.public.d.ts +0 -10
  69. package/build/cjs/src/portfolio-projects-v1-project-in-collection.public.js +0 -24
  70. package/build/cjs/src/portfolio-projects-v1-project-in-collection.public.js.map +0 -1
  71. package/build/cjs/src/portfolio-projects-v1-project-in-collection.types.d.ts +0 -635
  72. package/build/cjs/src/portfolio-projects-v1-project-in-collection.types.js +0 -21
  73. package/build/cjs/src/portfolio-projects-v1-project-in-collection.types.js.map +0 -1
  74. package/build/cjs/src/portfolio-projects-v1-project-in-collection.universal.d.ts +0 -578
  75. package/build/cjs/src/portfolio-projects-v1-project-in-collection.universal.js +0 -207
  76. package/build/cjs/src/portfolio-projects-v1-project-in-collection.universal.js.map +0 -1
  77. package/build/cjs/src/portfolio-projects-v1-project.context.d.ts +0 -8
  78. package/build/cjs/src/portfolio-projects-v1-project.context.js +0 -71
  79. package/build/cjs/src/portfolio-projects-v1-project.context.js.map +0 -1
  80. package/build/cjs/src/portfolio-projects-v1-project.http.d.ts +0 -17
  81. package/build/cjs/src/portfolio-projects-v1-project.http.js +0 -384
  82. package/build/cjs/src/portfolio-projects-v1-project.http.js.map +0 -1
  83. package/build/cjs/src/portfolio-projects-v1-project.meta.d.ts +0 -24
  84. package/build/cjs/src/portfolio-projects-v1-project.meta.js +0 -142
  85. package/build/cjs/src/portfolio-projects-v1-project.meta.js.map +0 -1
  86. package/build/cjs/src/portfolio-projects-v1-project.public.d.ts +0 -110
  87. package/build/cjs/src/portfolio-projects-v1-project.public.js +0 -54
  88. package/build/cjs/src/portfolio-projects-v1-project.public.js.map +0 -1
  89. package/build/cjs/src/portfolio-projects-v1-project.types.d.ts +0 -1211
  90. package/build/cjs/src/portfolio-projects-v1-project.types.js +0 -112
  91. package/build/cjs/src/portfolio-projects-v1-project.types.js.map +0 -1
  92. package/build/cjs/src/portfolio-projects-v1-project.universal.d.ts +0 -1204
  93. package/build/cjs/src/portfolio-projects-v1-project.universal.js +0 -513
  94. package/build/cjs/src/portfolio-projects-v1-project.universal.js.map +0 -1
  95. package/build/es/index.typings.d.ts +0 -4
  96. package/build/es/index.typings.js +0 -5
  97. package/build/es/index.typings.js.map +0 -1
  98. package/build/es/src/portfolio-collections-v1-collection.context.d.ts +0 -8
  99. package/build/es/src/portfolio-collections-v1-collection.context.js +0 -62
  100. package/build/es/src/portfolio-collections-v1-collection.context.js.map +0 -1
  101. package/build/es/src/portfolio-collections-v1-collection.http.d.ts +0 -17
  102. package/build/es/src/portfolio-collections-v1-collection.http.js +0 -330
  103. package/build/es/src/portfolio-collections-v1-collection.http.js.map +0 -1
  104. package/build/es/src/portfolio-collections-v1-collection.meta.d.ts +0 -24
  105. package/build/es/src/portfolio-collections-v1-collection.meta.js +0 -110
  106. package/build/es/src/portfolio-collections-v1-collection.meta.js.map +0 -1
  107. package/build/es/src/portfolio-collections-v1-collection.public.d.ts +0 -86
  108. package/build/es/src/portfolio-collections-v1-collection.public.js +0 -35
  109. package/build/es/src/portfolio-collections-v1-collection.public.js.map +0 -1
  110. package/build/es/src/portfolio-collections-v1-collection.types.d.ts +0 -578
  111. package/build/es/src/portfolio-collections-v1-collection.types.js +0 -12
  112. package/build/es/src/portfolio-collections-v1-collection.types.js.map +0 -1
  113. package/build/es/src/portfolio-collections-v1-collection.universal.d.ts +0 -710
  114. package/build/es/src/portfolio-collections-v1-collection.universal.js +0 -379
  115. package/build/es/src/portfolio-collections-v1-collection.universal.js.map +0 -1
  116. package/build/es/src/portfolio-project-items-v1-project-item.context.d.ts +0 -7
  117. package/build/es/src/portfolio-project-items-v1-project-item.context.js +0 -52
  118. package/build/es/src/portfolio-project-items-v1-project-item.context.js.map +0 -1
  119. package/build/es/src/portfolio-project-items-v1-project-item.http.d.ts +0 -12
  120. package/build/es/src/portfolio-project-items-v1-project-item.http.js +0 -329
  121. package/build/es/src/portfolio-project-items-v1-project-item.http.js.map +0 -1
  122. package/build/es/src/portfolio-project-items-v1-project-item.meta.d.ts +0 -25
  123. package/build/es/src/portfolio-project-items-v1-project-item.meta.js +0 -92
  124. package/build/es/src/portfolio-project-items-v1-project-item.meta.js.map +0 -1
  125. package/build/es/src/portfolio-project-items-v1-project-item.public.d.ts +0 -49
  126. package/build/es/src/portfolio-project-items-v1-project-item.public.js +0 -30
  127. package/build/es/src/portfolio-project-items-v1-project-item.public.js.map +0 -1
  128. package/build/es/src/portfolio-project-items-v1-project-item.types.d.ts +0 -710
  129. package/build/es/src/portfolio-project-items-v1-project-item.types.js +0 -18
  130. package/build/es/src/portfolio-project-items-v1-project-item.types.js.map +0 -1
  131. package/build/es/src/portfolio-project-items-v1-project-item.universal.d.ts +0 -668
  132. package/build/es/src/portfolio-project-items-v1-project-item.universal.js +0 -313
  133. package/build/es/src/portfolio-project-items-v1-project-item.universal.js.map +0 -1
  134. package/build/es/src/portfolio-projects-v1-project-in-collection.context.d.ts +0 -4
  135. package/build/es/src/portfolio-projects-v1-project-in-collection.context.js +0 -22
  136. package/build/es/src/portfolio-projects-v1-project-in-collection.context.js.map +0 -1
  137. package/build/es/src/portfolio-projects-v1-project-in-collection.http.d.ts +0 -14
  138. package/build/es/src/portfolio-projects-v1-project-in-collection.http.js +0 -214
  139. package/build/es/src/portfolio-projects-v1-project-in-collection.http.js.map +0 -1
  140. package/build/es/src/portfolio-projects-v1-project-in-collection.meta.d.ts +0 -17
  141. package/build/es/src/portfolio-projects-v1-project-in-collection.meta.js +0 -41
  142. package/build/es/src/portfolio-projects-v1-project-in-collection.meta.js.map +0 -1
  143. package/build/es/src/portfolio-projects-v1-project-in-collection.public.d.ts +0 -10
  144. package/build/es/src/portfolio-projects-v1-project-in-collection.public.js +0 -15
  145. package/build/es/src/portfolio-projects-v1-project-in-collection.public.js.map +0 -1
  146. package/build/es/src/portfolio-projects-v1-project-in-collection.types.d.ts +0 -635
  147. package/build/es/src/portfolio-projects-v1-project-in-collection.types.js +0 -18
  148. package/build/es/src/portfolio-projects-v1-project-in-collection.types.js.map +0 -1
  149. package/build/es/src/portfolio-projects-v1-project-in-collection.universal.d.ts +0 -578
  150. package/build/es/src/portfolio-projects-v1-project-in-collection.universal.js +0 -179
  151. package/build/es/src/portfolio-projects-v1-project-in-collection.universal.js.map +0 -1
  152. package/build/es/src/portfolio-projects-v1-project.context.d.ts +0 -8
  153. package/build/es/src/portfolio-projects-v1-project.context.js +0 -62
  154. package/build/es/src/portfolio-projects-v1-project.context.js.map +0 -1
  155. package/build/es/src/portfolio-projects-v1-project.http.d.ts +0 -17
  156. package/build/es/src/portfolio-projects-v1-project.http.js +0 -375
  157. package/build/es/src/portfolio-projects-v1-project.http.js.map +0 -1
  158. package/build/es/src/portfolio-projects-v1-project.meta.d.ts +0 -24
  159. package/build/es/src/portfolio-projects-v1-project.meta.js +0 -110
  160. package/build/es/src/portfolio-projects-v1-project.meta.js.map +0 -1
  161. package/build/es/src/portfolio-projects-v1-project.public.d.ts +0 -110
  162. package/build/es/src/portfolio-projects-v1-project.public.js +0 -35
  163. package/build/es/src/portfolio-projects-v1-project.public.js.map +0 -1
  164. package/build/es/src/portfolio-projects-v1-project.types.d.ts +0 -1211
  165. package/build/es/src/portfolio-projects-v1-project.types.js +0 -109
  166. package/build/es/src/portfolio-projects-v1-project.types.js.map +0 -1
  167. package/build/es/src/portfolio-projects-v1-project.universal.d.ts +0 -1204
  168. package/build/es/src/portfolio-projects-v1-project.universal.js +0 -481
  169. package/build/es/src/portfolio-projects-v1-project.universal.js.map +0 -1
@@ -1,710 +0,0 @@
1
- import { EventDefinition } from '@wix/sdk-types';
2
- /** Collection is the main entity of CollectionsService */
3
- export interface Collection {
4
- /**
5
- * Collection ID
6
- * @readonly
7
- */
8
- _id?: string | null;
9
- /**
10
- * 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
11
- * @readonly
12
- */
13
- revision?: string | null;
14
- title?: string | null;
15
- description?: string | null;
16
- /** Url of Collection */
17
- slug?: string | null;
18
- /** Collection's cover photo */
19
- coverImage?: CommonImage;
20
- /** Indicates if the collection is hidden from Portfolio */
21
- hidden?: boolean | null;
22
- /** if not present in an update it means the collection will be added as currentTimestamp - as the last collection */
23
- sortOrder?: number | null;
24
- /**
25
- * Represents the time this Collection was created
26
- * @readonly
27
- */
28
- _createdDate?: Date;
29
- /**
30
- * Represents the time this Collection was last updated
31
- * @readonly
32
- */
33
- _updatedDate?: Date;
34
- /**
35
- * 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
36
- * @readonly
37
- */
38
- url?: string;
39
- seoData?: SeoSchema;
40
- }
41
- export interface CommonImage {
42
- /** Image info - Wix Media Image. */
43
- imageInfo?: string;
44
- /** Focal point of the image. */
45
- focalPoint?: CommonPoint;
46
- }
47
- export declare enum ImageImageType {
48
- UNDEFINED = "UNDEFINED",
49
- WIX_MEDIA = "WIX_MEDIA",
50
- EXTERNAL = "EXTERNAL"
51
- }
52
- export interface CommonPoint {
53
- /** X-coordinate of the focal point. */
54
- x?: number;
55
- /** Y-coordinate of the focal point. */
56
- y?: number;
57
- }
58
- export interface CommonUnsharpMasking {
59
- /**
60
- * Unsharp masking amount. Controls the sharpening strength. <br />
61
- *
62
- * Min: `0` <br />
63
- * Max: `5`
64
- */
65
- amount?: number | null;
66
- /** Unsharp masking radius in pixels. Controls the sharpening width. */
67
- radius?: number | null;
68
- /**
69
- * Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply. <br />
70
- *
71
- * Min: `0` <br />
72
- * Max: `1`
73
- */
74
- threshold?: number | null;
75
- }
76
- /**
77
- * 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.
78
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
79
- * 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.
80
- */
81
- export interface SeoSchema {
82
- /** SEO tag information. */
83
- tags?: Tag[];
84
- /** SEO general settings. */
85
- settings?: Settings;
86
- }
87
- export interface Keyword {
88
- /** Keyword value. */
89
- term?: string;
90
- /** Whether the keyword is the main focus keyword. */
91
- isMain?: boolean;
92
- }
93
- export interface Tag {
94
- /**
95
- * SEO tag type.
96
- *
97
- *
98
- * Supported values: `title`, `meta`, `script`, `link`.
99
- */
100
- type?: string;
101
- /**
102
- * A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
103
- * For example: `{'name': 'description', 'content': 'the description itself'}`.
104
- */
105
- props?: Record<string, any> | null;
106
- /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
107
- meta?: Record<string, any> | null;
108
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
109
- children?: string;
110
- /** Whether the tag is a custom tag. */
111
- custom?: boolean;
112
- /** Whether the tag is disabled. */
113
- disabled?: boolean;
114
- }
115
- export interface Settings {
116
- /**
117
- * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
118
- *
119
- *
120
- * Default: `false` (Auto Redirect is enabled.)
121
- */
122
- preventAutoRedirect?: boolean;
123
- /** User-selected keyword terms for a specific page. */
124
- keywords?: Keyword[];
125
- }
126
- export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
127
- createdEvent?: EntityCreatedEvent<T>;
128
- updatedEvent?: EntityUpdatedEvent<T>;
129
- deletedEvent?: EntityDeletedEvent<T>;
130
- actionEvent?: ActionEvent<T>;
131
- /**
132
- * Unique event ID.
133
- * Allows clients to ignore duplicate webhooks.
134
- */
135
- _id?: string;
136
- /**
137
- * Assumes actions are also always typed to an entity_type
138
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
139
- */
140
- entityFqdn?: string;
141
- /**
142
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
143
- * This is although the created/updated/deleted notion is duplication of the oneof types
144
- * Example: created/updated/deleted/started/completed/email_opened
145
- */
146
- slug?: string;
147
- /** ID of the entity associated with the event. */
148
- entityId?: string;
149
- /** Event timestamp. */
150
- eventTime?: Date;
151
- /**
152
- * Whether the event was triggered as a result of a privacy regulation application
153
- * (for example, GDPR).
154
- */
155
- triggeredByAnonymizeRequest?: boolean | null;
156
- /** If present, indicates the action that triggered the event. */
157
- originatedFrom?: string | null;
158
- /**
159
- * A sequence number defining the order of updates to the underlying entity.
160
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
161
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
162
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
163
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
164
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
165
- */
166
- entityEventSequence?: string | null;
167
- }
168
- export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
169
- }
170
- export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
171
- }
172
- export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
173
- }
174
- export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
175
- }
176
- /** @oneof */
177
- export interface DomainEventBodyOneOf<T> {
178
- createdEvent?: EntityCreatedEvent<T>;
179
- updatedEvent?: EntityUpdatedEvent<T>;
180
- deletedEvent?: EntityDeletedEvent<T>;
181
- actionEvent?: ActionEvent<T>;
182
- }
183
- export interface EntityCreatedEvent<T> {
184
- entity?: T;
185
- }
186
- export interface EntityUpdatedEvent<T> {
187
- /**
188
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
189
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
190
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
191
- */
192
- currentEntity?: T;
193
- }
194
- export interface EntityDeletedEvent<T> {
195
- /** Entity that was deleted */
196
- deletedEntity?: T | null;
197
- }
198
- export interface ActionEvent<T> {
199
- body?: T;
200
- }
201
- export interface Empty {
202
- }
203
- export interface AdminRemoveMenuItemsResponse {
204
- /** number of items queried for deletion */
205
- numItems?: number;
206
- /** number of items sucessfully deleted */
207
- numItemsSuccessfullyDeleted?: number;
208
- }
209
- export interface InvalidateCache extends InvalidateCacheGetByOneOf {
210
- /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
211
- metaSiteId?: string;
212
- /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
213
- siteId?: string;
214
- /** Invalidate by App */
215
- app?: App;
216
- /** Invalidate by page id */
217
- page?: Page;
218
- /** Invalidate by URI path */
219
- uri?: URI;
220
- /** tell us why you're invalidating the cache. You don't need to add your app name */
221
- reason?: string | null;
222
- /** Is local DS */
223
- localDc?: boolean;
224
- }
225
- /** @oneof */
226
- export interface InvalidateCacheGetByOneOf {
227
- /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
228
- metaSiteId?: string;
229
- /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
230
- siteId?: string;
231
- /** Invalidate by App */
232
- app?: App;
233
- /** Invalidate by page id */
234
- page?: Page;
235
- /** Invalidate by URI path */
236
- uri?: URI;
237
- }
238
- export interface App {
239
- /** The AppDefId */
240
- appDefId?: string;
241
- /** The instance Id */
242
- instanceId?: string;
243
- }
244
- export interface Page {
245
- /** the msid the page is on */
246
- metaSiteId?: string;
247
- /** Invalidate by Page ID */
248
- pageId?: string;
249
- }
250
- export interface URI {
251
- /** the msid the URI is on */
252
- metaSiteId?: string;
253
- /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
254
- uriPath?: string;
255
- }
256
- export interface CreateCollectionRequest {
257
- /** Collection to be created */
258
- collection: Collection;
259
- }
260
- export interface CreateCollectionResponse {
261
- /** The created Collection */
262
- collection?: Collection;
263
- }
264
- export interface GetCollectionRequest {
265
- /** Id of the Collection to retrieve */
266
- collectionId: string;
267
- includePageUrl?: boolean | null;
268
- }
269
- export interface GetCollectionResponse {
270
- /** The retrieved Collection */
271
- collection?: Collection;
272
- }
273
- export interface ListCollectionsRequest {
274
- /** Maximum limit per response is 100, in first request cursor is None */
275
- paging?: CursorPaging;
276
- includePageUrl?: boolean | null;
277
- }
278
- export interface CursorPaging {
279
- /** Maximum number of items to return in the results. */
280
- limit?: number | null;
281
- /**
282
- * Pointer to the next or previous page in the list of results.
283
- *
284
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
285
- * Not relevant for the first request.
286
- */
287
- cursor?: string | null;
288
- }
289
- export interface ListCollectionsResponse {
290
- /** Retrieved Collections */
291
- collections?: Collection[];
292
- /** Paging metadata */
293
- metadata?: PagingMetadataV2;
294
- }
295
- export interface PagingMetadataV2 {
296
- /** Number of items returned in the response. */
297
- count?: number | null;
298
- /** Offset that was requested. */
299
- offset?: number | null;
300
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
301
- total?: number | null;
302
- /** Flag that indicates the server failed to calculate the `total` field. */
303
- tooManyToCount?: boolean | null;
304
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
305
- cursors?: Cursors;
306
- }
307
- export interface Cursors {
308
- /** Cursor string pointing to the next page in the list of results. */
309
- next?: string | null;
310
- /** Cursor pointing to the previous page in the list of results. */
311
- prev?: string | null;
312
- }
313
- export interface UpdateCollectionRequest {
314
- /** Collection to be updated, may be partial */
315
- collection: Collection;
316
- }
317
- export interface UpdateCollectionResponse {
318
- /** The updated Collection */
319
- collection?: Collection;
320
- }
321
- export interface DeleteCollectionRequest {
322
- /** Id of the Collection to delete */
323
- collectionId: string;
324
- }
325
- export interface DeleteCollectionResponse {
326
- /** Id of the Deleted Collection */
327
- collectionId?: string;
328
- }
329
- export interface QueryCollectionsRequest {
330
- /** WQL expression */
331
- query: QueryV2;
332
- includePageUrl?: boolean | null;
333
- }
334
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
335
- /** Paging options to limit and skip the number of items. */
336
- paging?: Paging;
337
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
338
- cursorPaging?: CursorPaging;
339
- /**
340
- * Filter object in the following format:
341
- * `"filter" : {
342
- * "fieldName1": "value1",
343
- * "fieldName2":{"$operator":"value2"}
344
- * }`
345
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
346
- */
347
- filter?: Record<string, any> | null;
348
- /**
349
- * Sort object in the following format:
350
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
351
- */
352
- sort?: Sorting[];
353
- /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
354
- fields?: string[];
355
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
356
- fieldsets?: string[];
357
- }
358
- /** @oneof */
359
- export interface QueryV2PagingMethodOneOf {
360
- /** Paging options to limit and skip the number of items. */
361
- paging?: Paging;
362
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
363
- cursorPaging?: CursorPaging;
364
- }
365
- export interface Sorting {
366
- /** Name of the field to sort by. */
367
- fieldName?: string;
368
- /** Sort order. */
369
- order?: SortOrder;
370
- }
371
- export declare enum SortOrder {
372
- ASC = "ASC",
373
- DESC = "DESC"
374
- }
375
- export interface Paging {
376
- /** Number of items to load. */
377
- limit?: number | null;
378
- /** Number of items to skip in the current sort order. */
379
- offset?: number | null;
380
- }
381
- export interface QueryCollectionsResponse {
382
- /** The retrieved Collections */
383
- collections?: Collection[];
384
- /** Paging metadata */
385
- metadata?: PagingMetadataV2;
386
- }
387
- export interface CreateCollectionResponseNonNullableFields {
388
- collection?: {
389
- coverImage?: {
390
- imageInfo: string;
391
- focalPoint?: {
392
- x: number;
393
- y: number;
394
- };
395
- };
396
- url: string;
397
- seoData?: {
398
- tags: {
399
- type: string;
400
- children: string;
401
- custom: boolean;
402
- disabled: boolean;
403
- }[];
404
- settings?: {
405
- preventAutoRedirect: boolean;
406
- keywords: {
407
- term: string;
408
- isMain: boolean;
409
- }[];
410
- };
411
- };
412
- };
413
- }
414
- export interface GetCollectionResponseNonNullableFields {
415
- collection?: {
416
- coverImage?: {
417
- imageInfo: string;
418
- focalPoint?: {
419
- x: number;
420
- y: number;
421
- };
422
- };
423
- url: string;
424
- seoData?: {
425
- tags: {
426
- type: string;
427
- children: string;
428
- custom: boolean;
429
- disabled: boolean;
430
- }[];
431
- settings?: {
432
- preventAutoRedirect: boolean;
433
- keywords: {
434
- term: string;
435
- isMain: boolean;
436
- }[];
437
- };
438
- };
439
- };
440
- }
441
- export interface ListCollectionsResponseNonNullableFields {
442
- collections: {
443
- coverImage?: {
444
- imageInfo: string;
445
- focalPoint?: {
446
- x: number;
447
- y: number;
448
- };
449
- };
450
- url: string;
451
- seoData?: {
452
- tags: {
453
- type: string;
454
- children: string;
455
- custom: boolean;
456
- disabled: boolean;
457
- }[];
458
- settings?: {
459
- preventAutoRedirect: boolean;
460
- keywords: {
461
- term: string;
462
- isMain: boolean;
463
- }[];
464
- };
465
- };
466
- }[];
467
- }
468
- export interface UpdateCollectionResponseNonNullableFields {
469
- collection?: {
470
- coverImage?: {
471
- imageInfo: string;
472
- focalPoint?: {
473
- x: number;
474
- y: number;
475
- };
476
- };
477
- url: string;
478
- seoData?: {
479
- tags: {
480
- type: string;
481
- children: string;
482
- custom: boolean;
483
- disabled: boolean;
484
- }[];
485
- settings?: {
486
- preventAutoRedirect: boolean;
487
- keywords: {
488
- term: string;
489
- isMain: boolean;
490
- }[];
491
- };
492
- };
493
- };
494
- }
495
- export interface DeleteCollectionResponseNonNullableFields {
496
- collectionId: string;
497
- }
498
- export interface QueryCollectionsResponseNonNullableFields {
499
- collections: {
500
- coverImage?: {
501
- imageInfo: string;
502
- focalPoint?: {
503
- x: number;
504
- y: number;
505
- };
506
- };
507
- url: string;
508
- seoData?: {
509
- tags: {
510
- type: string;
511
- children: string;
512
- custom: boolean;
513
- disabled: boolean;
514
- }[];
515
- settings?: {
516
- preventAutoRedirect: boolean;
517
- keywords: {
518
- term: string;
519
- isMain: boolean;
520
- }[];
521
- };
522
- };
523
- }[];
524
- }
525
- export declare const onCollectionCreated: EventDefinition<DomainCreatedEvent<Collection>, "wix.portfolio.collections.v1.collection_created">;
526
- export declare const onCollectionUpdated: EventDefinition<DomainUpdatedEvent<Collection>, "wix.portfolio.collections.v1.collection_updated">;
527
- export declare const onCollectionDeleted: EventDefinition<DomainDeletedEvent<Collection>, "wix.portfolio.collections.v1.collection_deleted">;
528
- /**
529
- * Creates a new Collection
530
- * @param collection - Collection to be created
531
- * @public
532
- * @documentationMaturity preview
533
- * @requiredField collection
534
- * @returns The created Collection
535
- */
536
- export declare function createCollection(collection: Collection): Promise<Collection & NonNullable<CreateCollectionResponseNonNullableFields>['collection']>;
537
- /**
538
- * Get a Collection by id
539
- * @param collectionId - Id of the Collection to retrieve
540
- * @public
541
- * @documentationMaturity preview
542
- * @requiredField collectionId
543
- * @applicableIdentity MEMBER
544
- * @applicableIdentity VISITOR
545
- * @returns The retrieved Collection
546
- */
547
- export declare function getCollection(collectionId: string, options?: GetCollectionOptions): Promise<Collection & NonNullable<GetCollectionResponseNonNullableFields>['collection']>;
548
- export interface GetCollectionOptions {
549
- includePageUrl?: boolean | null;
550
- }
551
- /**
552
- * List all Collections in portfolio
553
- * @public
554
- * @documentationMaturity preview
555
- * @applicableIdentity MEMBER
556
- * @applicableIdentity VISITOR
557
- */
558
- export declare function listCollections(options?: ListCollectionsOptions): Promise<ListCollectionsResponse & ListCollectionsResponseNonNullableFields>;
559
- export interface ListCollectionsOptions {
560
- /** Maximum limit per response is 100, in first request cursor is None */
561
- paging?: CursorPaging;
562
- includePageUrl?: boolean | null;
563
- }
564
- /**
565
- * Update a Collection, supports partial update
566
- * Pass the latest `revision` for a successful update
567
- * @param _id - Collection ID
568
- * @public
569
- * @documentationMaturity preview
570
- * @requiredField _id
571
- * @requiredField collection
572
- * @requiredField collection.revision
573
- * @returns The updated Collection
574
- */
575
- export declare function updateCollection(_id: string | null, collection: UpdateCollection): Promise<Collection & NonNullable<UpdateCollectionResponseNonNullableFields>['collection']>;
576
- export interface UpdateCollection {
577
- /**
578
- * Collection ID
579
- * @readonly
580
- */
581
- _id?: string | null;
582
- /**
583
- * 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
584
- * @readonly
585
- */
586
- revision?: string | null;
587
- title?: string | null;
588
- description?: string | null;
589
- /** Url of Collection */
590
- slug?: string | null;
591
- /** Collection's cover photo */
592
- coverImage?: CommonImage;
593
- /** Indicates if the collection is hidden from Portfolio */
594
- hidden?: boolean | null;
595
- /** if not present in an update it means the collection will be added as currentTimestamp - as the last collection */
596
- sortOrder?: number | null;
597
- /**
598
- * Represents the time this Collection was created
599
- * @readonly
600
- */
601
- _createdDate?: Date;
602
- /**
603
- * Represents the time this Collection was last updated
604
- * @readonly
605
- */
606
- _updatedDate?: Date;
607
- /**
608
- * 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
609
- * @readonly
610
- */
611
- url?: string;
612
- seoData?: SeoSchema;
613
- }
614
- /**
615
- * Delete a Collection
616
- * @param collectionId - Id of the Collection to delete
617
- * @public
618
- * @documentationMaturity preview
619
- * @requiredField collectionId
620
- */
621
- export declare function deleteCollection(collectionId: string): Promise<DeleteCollectionResponse & DeleteCollectionResponseNonNullableFields>;
622
- /**
623
- * Query Collections using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
624
- * @public
625
- * @documentationMaturity preview
626
- * @applicableIdentity MEMBER
627
- * @applicableIdentity VISITOR
628
- */
629
- export declare function queryCollections(options?: QueryCollectionsOptions): CollectionsQueryBuilder;
630
- export interface QueryCollectionsOptions {
631
- includePageUrl?: boolean | null | undefined;
632
- }
633
- interface QueryCursorResult {
634
- cursors: Cursors;
635
- hasNext: () => boolean;
636
- hasPrev: () => boolean;
637
- length: number;
638
- pageSize: number;
639
- }
640
- export interface CollectionsQueryResult extends QueryCursorResult {
641
- items: Collection[];
642
- query: CollectionsQueryBuilder;
643
- next: () => Promise<CollectionsQueryResult>;
644
- prev: () => Promise<CollectionsQueryResult>;
645
- }
646
- export interface CollectionsQueryBuilder {
647
- /** @param propertyName - Property whose value is compared with `value`.
648
- * @param value - Value to compare against.
649
- * @documentationMaturity preview
650
- */
651
- eq: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
652
- /** @param propertyName - Property whose value is compared with `value`.
653
- * @param value - Value to compare against.
654
- * @documentationMaturity preview
655
- */
656
- ne: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
657
- /** @param propertyName - Property whose value is compared with `value`.
658
- * @param value - Value to compare against.
659
- * @documentationMaturity preview
660
- */
661
- ge: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
662
- /** @param propertyName - Property whose value is compared with `value`.
663
- * @param value - Value to compare against.
664
- * @documentationMaturity preview
665
- */
666
- gt: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
667
- /** @param propertyName - Property whose value is compared with `value`.
668
- * @param value - Value to compare against.
669
- * @documentationMaturity preview
670
- */
671
- le: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
672
- /** @param propertyName - Property whose value is compared with `value`.
673
- * @param value - Value to compare against.
674
- * @documentationMaturity preview
675
- */
676
- lt: (propertyName: 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
677
- /** @param propertyName - Property whose value is compared with `string`.
678
- * @param string - String to compare against. Case-insensitive.
679
- * @documentationMaturity preview
680
- */
681
- startsWith: (propertyName: '_id' | 'title' | 'description' | 'slug', value: string) => CollectionsQueryBuilder;
682
- /** @param propertyName - Property whose value is compared with `values`.
683
- * @param values - List of values to compare against.
684
- * @documentationMaturity preview
685
- */
686
- hasSome: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any[]) => CollectionsQueryBuilder;
687
- /** @documentationMaturity preview */
688
- in: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder;
689
- /** @documentationMaturity preview */
690
- exists: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: boolean) => CollectionsQueryBuilder;
691
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
692
- * @documentationMaturity preview
693
- */
694
- ascending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder;
695
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
696
- * @documentationMaturity preview
697
- */
698
- descending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder;
699
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
700
- * @documentationMaturity preview
701
- */
702
- limit: (limit: number) => CollectionsQueryBuilder;
703
- /** @param cursor - A pointer to specific record
704
- * @documentationMaturity preview
705
- */
706
- skipTo: (cursor: string) => CollectionsQueryBuilder;
707
- /** @documentationMaturity preview */
708
- find: () => Promise<CollectionsQueryResult>;
709
- }
710
- export {};