@wix/auto_sdk_portfolio_project-items 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.context.d.ts +29 -0
  11. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.context.js +36 -0
  12. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.context.js.map +1 -0
  13. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.http.d.ts +27 -0
  14. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.http.js +543 -0
  15. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.http.js.map +1 -0
  16. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.d.ts +29 -0
  17. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.js +199 -0
  18. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.js.map +1 -0
  19. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.public.d.ts +87 -0
  20. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.public.js +159 -0
  21. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.public.js.map +1 -0
  22. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.types.d.ts +692 -0
  23. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.types.js +32 -0
  24. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.types.js.map +1 -0
  25. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.d.ts +923 -0
  26. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.js +496 -0
  27. package/build/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/portfolio-project-items-v1-project-item-project-items.context.d.ts +29 -0
  39. package/build/es/src/portfolio-project-items-v1-project-item-project-items.context.js +29 -0
  40. package/build/es/src/portfolio-project-items-v1-project-item-project-items.context.js.map +1 -0
  41. package/build/es/src/portfolio-project-items-v1-project-item-project-items.http.d.ts +27 -0
  42. package/build/es/src/portfolio-project-items-v1-project-item-project-items.http.js +531 -0
  43. package/build/es/src/portfolio-project-items-v1-project-item-project-items.http.js.map +1 -0
  44. package/build/es/src/portfolio-project-items-v1-project-item-project-items.meta.d.ts +29 -0
  45. package/build/es/src/portfolio-project-items-v1-project-item-project-items.meta.js +164 -0
  46. package/build/es/src/portfolio-project-items-v1-project-item-project-items.meta.js.map +1 -0
  47. package/build/es/src/portfolio-project-items-v1-project-item-project-items.public.d.ts +87 -0
  48. package/build/es/src/portfolio-project-items-v1-project-item-project-items.public.js +143 -0
  49. package/build/es/src/portfolio-project-items-v1-project-item-project-items.public.js.map +1 -0
  50. package/build/es/src/portfolio-project-items-v1-project-item-project-items.types.d.ts +692 -0
  51. package/build/es/src/portfolio-project-items-v1-project-item-project-items.types.js +29 -0
  52. package/build/es/src/portfolio-project-items-v1-project-item-project-items.types.js.map +1 -0
  53. package/build/es/src/portfolio-project-items-v1-project-item-project-items.universal.d.ts +923 -0
  54. package/build/es/src/portfolio-project-items-v1-project-item-project-items.universal.js +461 -0
  55. package/build/es/src/portfolio-project-items-v1-project-item-project-items.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.context.d.ts +29 -0
  66. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.context.js +36 -0
  67. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.context.js.map +1 -0
  68. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.http.d.ts +27 -0
  69. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.http.js +543 -0
  70. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.http.js.map +1 -0
  71. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.d.ts +29 -0
  72. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.js +199 -0
  73. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.meta.js.map +1 -0
  74. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.public.d.ts +87 -0
  75. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.public.js +159 -0
  76. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.public.js.map +1 -0
  77. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.types.d.ts +692 -0
  78. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.types.js +32 -0
  79. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.types.js.map +1 -0
  80. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.d.ts +923 -0
  81. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.js +496 -0
  82. package/build/internal/cjs/src/portfolio-project-items-v1-project-item-project-items.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.context.d.ts +29 -0
  93. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.context.js +29 -0
  94. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.context.js.map +1 -0
  95. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.http.d.ts +27 -0
  96. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.http.js +531 -0
  97. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.http.js.map +1 -0
  98. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.meta.d.ts +29 -0
  99. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.meta.js +164 -0
  100. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.meta.js.map +1 -0
  101. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.public.d.ts +87 -0
  102. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.public.js +143 -0
  103. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.public.js.map +1 -0
  104. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.types.d.ts +692 -0
  105. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.types.js +29 -0
  106. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.types.js.map +1 -0
  107. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.universal.d.ts +923 -0
  108. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.universal.js +461 -0
  109. package/build/internal/es/src/portfolio-project-items-v1-project-item-project-items.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,923 @@
1
+ export interface Item extends ItemMetadataOneOf {
2
+ /** Information about the Wix Media image. */
3
+ image?: Image;
4
+ /** Information about the Wix Media video. */
5
+ video?: Video;
6
+ /** Project ID. */
7
+ projectId?: string | null;
8
+ /**
9
+ * Project item ID.
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /**
14
+ * Index that determines which position a project is displayed in the project. <br />
15
+ *
16
+ * Default: [Epoch](https://www.epoch101.com/) timestamp. <br />
17
+ */
18
+ sortOrder?: number | null;
19
+ /** Project item title. */
20
+ title?: string | null;
21
+ /** Project item description. */
22
+ description?: string | null;
23
+ /**
24
+ * Project item data type.
25
+ * @readonly
26
+ */
27
+ type?: Type;
28
+ /**
29
+ * Date and time the project item was created.
30
+ * @readonly
31
+ */
32
+ _createdDate?: Date | null;
33
+ /**
34
+ * Date and time the project item was last updated.
35
+ * @readonly
36
+ */
37
+ _updatedDate?: Date | null;
38
+ /** Project item link. */
39
+ link?: Link;
40
+ }
41
+ /** @oneof */
42
+ export interface ItemMetadataOneOf {
43
+ /** Information about the Wix Media image. */
44
+ image?: Image;
45
+ /** Information about the Wix Media video. */
46
+ video?: Video;
47
+ }
48
+ export declare enum Type {
49
+ /** Undefined item type. */
50
+ UNDEFINED = "UNDEFINED",
51
+ /** Image item type. */
52
+ IMAGE = "IMAGE",
53
+ /** Video item type. */
54
+ VIDEO = "VIDEO"
55
+ }
56
+ export interface Image {
57
+ /** Information about the Wix Media image. */
58
+ imageInfo?: string;
59
+ /** Focal point of the image. */
60
+ focalPoint?: Point;
61
+ }
62
+ export declare enum ImageType {
63
+ UNDEFINED = "UNDEFINED",
64
+ WIX_MEDIA = "WIX_MEDIA",
65
+ EXTERNAL = "EXTERNAL"
66
+ }
67
+ export interface Point {
68
+ /** X-coordinate of the focal point. */
69
+ x?: number;
70
+ /** Y-coordinate of the focal point. */
71
+ y?: number;
72
+ }
73
+ export interface UnsharpMasking {
74
+ /**
75
+ * Unsharp masking amount. Controls the sharpening strength. <br />
76
+ *
77
+ * Min: `0` <br />
78
+ * Max: `5`
79
+ */
80
+ amount?: number | null;
81
+ /** Unsharp masking radius in pixels. Controls the sharpening width. */
82
+ radius?: number | null;
83
+ /**
84
+ * Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply. <br />
85
+ *
86
+ * Min: `0` <br />
87
+ * Max: `1`
88
+ */
89
+ threshold?: number | null;
90
+ }
91
+ export interface Video {
92
+ /** Information about the Wix Media video. */
93
+ videoInfo?: string;
94
+ /** Manually defined Video duration in milliseconds. */
95
+ durationInMillis?: number | null;
96
+ }
97
+ export interface VideoResolution {
98
+ /** Video URL. Required. */
99
+ url?: string;
100
+ /** Video height. Required. */
101
+ height?: number;
102
+ /** Video width. Required. */
103
+ width?: number;
104
+ /** Video format for example, mp4, hls. Required. */
105
+ format?: string;
106
+ /** Video quality for example 480p, 720p. */
107
+ quality?: string | null;
108
+ /** Video filename. */
109
+ filename?: string | null;
110
+ }
111
+ export interface Tags {
112
+ /** List of tags assigned to the media item. */
113
+ values?: string[];
114
+ }
115
+ export interface Link {
116
+ /** Display text of the link. */
117
+ text?: string | null;
118
+ /** Target URL of the link. */
119
+ url?: string | null;
120
+ /**
121
+ * Whether the link opens in a new tab or window. One of:
122
+ * * `'_blank'`: The link opens in a new tab or window.
123
+ * * `'_self'`: The link opens in the same tab or window.
124
+ */
125
+ target?: string | null;
126
+ }
127
+ export interface GenerateTokenForProjectItemsRequest {
128
+ /** Media ids of requested project items */
129
+ mediaIds?: string[];
130
+ }
131
+ export interface GenerateTokenForProjectItemsResponse {
132
+ /** Generated media tokens for project items */
133
+ mediaTokens?: ProjectItemMediaToken[];
134
+ }
135
+ export interface ProjectItemMediaToken {
136
+ /** Media id of project item */
137
+ mediaId?: string;
138
+ /** Generated media token for project item */
139
+ mediaToken?: string;
140
+ }
141
+ export interface DomainEvent extends DomainEventBodyOneOf {
142
+ createdEvent?: EntityCreatedEvent;
143
+ updatedEvent?: EntityUpdatedEvent;
144
+ deletedEvent?: EntityDeletedEvent;
145
+ actionEvent?: ActionEvent;
146
+ /**
147
+ * Unique event ID.
148
+ * Allows clients to ignore duplicate webhooks.
149
+ */
150
+ _id?: string;
151
+ /**
152
+ * Assumes actions are also always typed to an entity_type
153
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
154
+ */
155
+ entityFqdn?: string;
156
+ /**
157
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
158
+ * This is although the created/updated/deleted notion is duplication of the oneof types
159
+ * Example: created/updated/deleted/started/completed/email_opened
160
+ */
161
+ slug?: string;
162
+ /** ID of the entity associated with the event. */
163
+ entityId?: string;
164
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
165
+ eventTime?: Date | null;
166
+ /**
167
+ * Whether the event was triggered as a result of a privacy regulation application
168
+ * (for example, GDPR).
169
+ */
170
+ triggeredByAnonymizeRequest?: boolean | null;
171
+ /** If present, indicates the action that triggered the event. */
172
+ originatedFrom?: string | null;
173
+ /**
174
+ * A sequence number defining the order of updates to the underlying entity.
175
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
176
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
177
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
178
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
179
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
180
+ */
181
+ entityEventSequence?: string | null;
182
+ }
183
+ /** @oneof */
184
+ export interface DomainEventBodyOneOf {
185
+ createdEvent?: EntityCreatedEvent;
186
+ updatedEvent?: EntityUpdatedEvent;
187
+ deletedEvent?: EntityDeletedEvent;
188
+ actionEvent?: ActionEvent;
189
+ }
190
+ export interface EntityCreatedEvent {
191
+ entity?: string;
192
+ }
193
+ export interface RestoreInfo {
194
+ deletedDate?: Date | null;
195
+ }
196
+ export interface EntityUpdatedEvent {
197
+ /**
198
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
199
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
200
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
201
+ */
202
+ currentEntity?: string;
203
+ }
204
+ export interface EntityDeletedEvent {
205
+ /** Entity that was deleted */
206
+ deletedEntity?: string | null;
207
+ }
208
+ export interface ActionEvent {
209
+ body?: string;
210
+ }
211
+ export interface MessageEnvelope {
212
+ /** App instance ID. */
213
+ instanceId?: string | null;
214
+ /** Event type. */
215
+ eventType?: string;
216
+ /** The identification type and identity data. */
217
+ identity?: IdentificationData;
218
+ /** Stringify payload. */
219
+ data?: string;
220
+ }
221
+ export interface IdentificationData extends IdentificationDataIdOneOf {
222
+ /** ID of a site visitor that has not logged in to the site. */
223
+ anonymousVisitorId?: string;
224
+ /** ID of a site visitor that has logged in to the site. */
225
+ memberId?: string;
226
+ /** ID of a Wix user (site owner, contributor, etc.). */
227
+ wixUserId?: string;
228
+ /** ID of an app. */
229
+ appId?: string;
230
+ /** @readonly */
231
+ identityType?: WebhookIdentityType;
232
+ }
233
+ /** @oneof */
234
+ export interface IdentificationDataIdOneOf {
235
+ /** ID of a site visitor that has not logged in to the site. */
236
+ anonymousVisitorId?: string;
237
+ /** ID of a site visitor that has logged in to the site. */
238
+ memberId?: string;
239
+ /** ID of a Wix user (site owner, contributor, etc.). */
240
+ wixUserId?: string;
241
+ /** ID of an app. */
242
+ appId?: string;
243
+ }
244
+ export declare enum WebhookIdentityType {
245
+ UNKNOWN = "UNKNOWN",
246
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
247
+ MEMBER = "MEMBER",
248
+ WIX_USER = "WIX_USER",
249
+ APP = "APP"
250
+ }
251
+ export interface InvalidateCache extends InvalidateCacheGetByOneOf {
252
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
253
+ metaSiteId?: string;
254
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
255
+ siteId?: string;
256
+ /** Invalidate by App */
257
+ app?: App;
258
+ /** Invalidate by page id */
259
+ page?: Page;
260
+ /** Invalidate by URI path */
261
+ uri?: URI;
262
+ /** Invalidate by file (for media files such as PDFs) */
263
+ file?: File;
264
+ /** tell us why you're invalidating the cache. You don't need to add your app name */
265
+ reason?: string | null;
266
+ /** Is local DS */
267
+ localDc?: boolean;
268
+ hardPurge?: boolean;
269
+ }
270
+ /** @oneof */
271
+ export interface InvalidateCacheGetByOneOf {
272
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
273
+ metaSiteId?: string;
274
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
275
+ siteId?: string;
276
+ /** Invalidate by App */
277
+ app?: App;
278
+ /** Invalidate by page id */
279
+ page?: Page;
280
+ /** Invalidate by URI path */
281
+ uri?: URI;
282
+ /** Invalidate by file (for media files such as PDFs) */
283
+ file?: File;
284
+ }
285
+ export interface App {
286
+ /** The AppDefId */
287
+ appDefId?: string;
288
+ /** The instance Id */
289
+ instanceId?: string;
290
+ }
291
+ export interface Page {
292
+ /** the msid the page is on */
293
+ metaSiteId?: string;
294
+ /** Invalidate by Page ID */
295
+ pageId?: string;
296
+ }
297
+ export interface URI {
298
+ /** the msid the URI is on */
299
+ metaSiteId?: string;
300
+ /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
301
+ uriPath?: string;
302
+ }
303
+ export interface File {
304
+ /** the msid the file is related to */
305
+ metaSiteId?: string;
306
+ /** Invalidate by filename (for media files such as PDFs) */
307
+ fileName?: string;
308
+ }
309
+ export interface CreateProjectItemRequest {
310
+ /** Project item to create. */
311
+ item: Item;
312
+ }
313
+ export interface CreateProjectItemResponse {
314
+ /** Newly created project item. */
315
+ item?: Item;
316
+ }
317
+ export interface BulkCreateProjectItemsRequest {
318
+ /** Project items to create. */
319
+ items: Item[];
320
+ /** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
321
+ returnFullEntity?: boolean | null;
322
+ }
323
+ export interface BulkCreateProjectItemsResponse {
324
+ /** Project items created by bulk action. */
325
+ results?: BulkCreateProjectItemResult[];
326
+ /** Bulk action metadata. */
327
+ bulkActionMetadata?: BulkActionMetadata;
328
+ }
329
+ export interface BulkCreateProjectItemResult {
330
+ /** Information about successful action or error for failure. */
331
+ itemMetadata?: ItemMetadata;
332
+ /** Newly created project item. */
333
+ item?: Item;
334
+ }
335
+ export interface ItemMetadata {
336
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
337
+ _id?: string | null;
338
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
339
+ originalIndex?: number;
340
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
341
+ success?: boolean;
342
+ /** Details about the error in case of failure. */
343
+ error?: ApplicationError;
344
+ }
345
+ export interface ApplicationError {
346
+ /** Error code. */
347
+ code?: string;
348
+ /** Description of the error. */
349
+ description?: string;
350
+ /** Data related to the error. */
351
+ data?: Record<string, any> | null;
352
+ }
353
+ export interface BulkActionMetadata {
354
+ /** Number of items that were successfully processed. */
355
+ totalSuccesses?: number;
356
+ /** Number of items that couldn't be processed. */
357
+ totalFailures?: number;
358
+ /** Number of failures without details because detailed failure threshold was exceeded. */
359
+ undetailedFailures?: number;
360
+ }
361
+ export interface GetProjectItemRequest {
362
+ /** Project item ID. */
363
+ itemId: string;
364
+ }
365
+ export interface GetProjectItemResponse {
366
+ /** Project item. */
367
+ item?: Item;
368
+ }
369
+ export interface ListProjectItemsRequest {
370
+ /** Project ID. */
371
+ projectId: string;
372
+ /** Maximum number of items to return in the results. */
373
+ paging?: Paging;
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 ListProjectItemsResponse {
382
+ /** Project items. */
383
+ items?: Item[];
384
+ /**
385
+ * @deprecated
386
+ * @targetRemovalDate 2025-05-25
387
+ */
388
+ pagingMetadataV2?: PagingMetadataV2;
389
+ /** Paging metadata. */
390
+ metadata?: PagingMetadataV2;
391
+ }
392
+ export interface PagingMetadataV2 {
393
+ /** Number of items returned in the response. */
394
+ count?: number | null;
395
+ /** Offset that was requested. */
396
+ offset?: number | null;
397
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
398
+ total?: number | null;
399
+ /** Flag that indicates the server failed to calculate the `total` field. */
400
+ tooManyToCount?: boolean | null;
401
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
402
+ cursors?: Cursors;
403
+ }
404
+ export interface Cursors {
405
+ /** Cursor string pointing to the next page in the list of results. */
406
+ next?: string | null;
407
+ /** Cursor pointing to the previous page in the list of results. */
408
+ prev?: string | null;
409
+ }
410
+ export interface QueryProjectItemsRequest {
411
+ /** WQL expression */
412
+ query?: QueryV2;
413
+ }
414
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
415
+ /** Paging options to limit and skip the number of items. */
416
+ paging?: Paging;
417
+ /** 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`. */
418
+ cursorPaging?: CursorPaging;
419
+ /**
420
+ * Filter object.
421
+ *
422
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
423
+ */
424
+ filter?: Record<string, any> | null;
425
+ /**
426
+ * Sort object.
427
+ *
428
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
429
+ */
430
+ sort?: Sorting[];
431
+ /** 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. */
432
+ fields?: string[];
433
+ /** 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. */
434
+ fieldsets?: string[];
435
+ }
436
+ /** @oneof */
437
+ export interface QueryV2PagingMethodOneOf {
438
+ /** Paging options to limit and skip the number of items. */
439
+ paging?: Paging;
440
+ /** 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`. */
441
+ cursorPaging?: CursorPaging;
442
+ }
443
+ export interface Sorting {
444
+ /** Name of the field to sort by. */
445
+ fieldName?: string;
446
+ /** Sort order. */
447
+ order?: SortOrder;
448
+ }
449
+ export declare enum SortOrder {
450
+ ASC = "ASC",
451
+ DESC = "DESC"
452
+ }
453
+ export interface CursorPaging {
454
+ /** Maximum number of items to return in the results. */
455
+ limit?: number | null;
456
+ /**
457
+ * Pointer to the next or previous page in the list of results.
458
+ *
459
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
460
+ * Not relevant for the first request.
461
+ */
462
+ cursor?: string | null;
463
+ }
464
+ export interface QueryProjectItemsResponse {
465
+ /** Project items. */
466
+ items?: Item[];
467
+ /** Paging metadata. */
468
+ metadata?: PagingMetadataV2;
469
+ }
470
+ export interface UpdateProjectItemRequest {
471
+ /** The project item to update. */
472
+ item: Item;
473
+ }
474
+ export interface UpdateProjectItemResponse {
475
+ /** The updated project item. */
476
+ item?: Item;
477
+ }
478
+ export interface BulkUpdateProjectItemsRequest {
479
+ /** items to be updated. */
480
+ items?: MaskedItem[];
481
+ /** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
482
+ returnFullEntity?: boolean | null;
483
+ }
484
+ export interface MaskedItem {
485
+ /** Item to be updated. */
486
+ item?: Item;
487
+ }
488
+ export interface BulkUpdateProjectItemsResponse {
489
+ /** Project items updated by bulk action. */
490
+ results?: BulkUpdateProjectItemResult[];
491
+ /** Bulk action metadata. */
492
+ bulkActionMetadata?: BulkActionMetadata;
493
+ }
494
+ export interface BulkUpdateProjectItemResult {
495
+ /** Information about successful action or error for failure. */
496
+ itemMetadata?: ItemMetadata;
497
+ /** Updated project item. */
498
+ item?: Item;
499
+ }
500
+ export interface DeleteProjectItemRequest {
501
+ /** ID of the project item to delete. */
502
+ itemId: string;
503
+ }
504
+ export interface DeleteProjectItemResponse {
505
+ /** Project ID. */
506
+ projectId?: string;
507
+ /** ID of the deleted project item. */
508
+ itemId?: string;
509
+ }
510
+ export interface BulkDeleteProjectItemsRequest {
511
+ /** Project item IDs. */
512
+ itemIds: string[];
513
+ }
514
+ export interface BulkDeleteProjectItemsResponse {
515
+ /** Project items deleted by bulk action. */
516
+ results?: BulkDeleteProjectItemResult[];
517
+ /** Bulk action metadata. */
518
+ bulkActionMetadata?: BulkActionMetadata;
519
+ }
520
+ export interface BulkDeleteProjectItemResult {
521
+ /** Information about successful action or error for failure. */
522
+ itemMetadata?: ItemMetadata;
523
+ /** Project item ID. */
524
+ itemId?: string;
525
+ }
526
+ export interface CreateProjectGalleryRequest {
527
+ /** Id of Project to create */
528
+ projectId?: string;
529
+ }
530
+ export interface CreateProjectGalleryResponse {
531
+ /** Id of created Project */
532
+ projectId?: string;
533
+ /** Id of created gallery */
534
+ galleryId?: string;
535
+ }
536
+ export interface Empty {
537
+ }
538
+ export interface DeletedProjectRestored {
539
+ /** the id of the project that was restored */
540
+ projectId?: string;
541
+ /** timestamp for when the project was originally deleted. */
542
+ deletionTimestamp?: Date | null;
543
+ }
544
+ export interface DuplicateProjectItemsRequest {
545
+ /** ID of the project containing the items to duplicate. */
546
+ originProjectId: string;
547
+ /** ID of the project where the duplicated items will be added. */
548
+ targetProjectId: string;
549
+ }
550
+ export interface DuplicateProjectItemsResponse {
551
+ /** Project ID where the duplicated items have been added. */
552
+ projectId?: string;
553
+ /** Bulk action metadata. */
554
+ bulkActionMetadata?: BulkActionMetadata;
555
+ }
556
+ interface PointNonNullableFields {
557
+ x: number;
558
+ y: number;
559
+ }
560
+ interface ImageNonNullableFields {
561
+ type: ImageType;
562
+ imageInfo: string;
563
+ focalPoint?: PointNonNullableFields;
564
+ }
565
+ interface VideoNonNullableFields {
566
+ videoInfo: string;
567
+ }
568
+ interface TagsNonNullableFields {
569
+ values: string[];
570
+ }
571
+ export interface ItemNonNullableFields {
572
+ image?: ImageNonNullableFields;
573
+ video?: VideoNonNullableFields;
574
+ type: Type;
575
+ tags?: TagsNonNullableFields;
576
+ }
577
+ export interface CreateProjectItemResponseNonNullableFields {
578
+ projectId: string;
579
+ item?: ItemNonNullableFields;
580
+ }
581
+ interface ApplicationErrorNonNullableFields {
582
+ code: string;
583
+ description: string;
584
+ }
585
+ interface ItemMetadataNonNullableFields {
586
+ originalIndex: number;
587
+ success: boolean;
588
+ error?: ApplicationErrorNonNullableFields;
589
+ }
590
+ interface BulkCreateProjectItemResultNonNullableFields {
591
+ itemMetadata?: ItemMetadataNonNullableFields;
592
+ item?: ItemNonNullableFields;
593
+ }
594
+ interface BulkActionMetadataNonNullableFields {
595
+ totalSuccesses: number;
596
+ totalFailures: number;
597
+ undetailedFailures: number;
598
+ }
599
+ export interface BulkCreateProjectItemsResponseNonNullableFields {
600
+ projectId: string;
601
+ results: BulkCreateProjectItemResultNonNullableFields[];
602
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
603
+ }
604
+ export interface GetProjectItemResponseNonNullableFields {
605
+ projectId: string;
606
+ item?: ItemNonNullableFields;
607
+ }
608
+ export interface ListProjectItemsResponseNonNullableFields {
609
+ projectId: string;
610
+ items: ItemNonNullableFields[];
611
+ }
612
+ export interface UpdateProjectItemResponseNonNullableFields {
613
+ projectId: string;
614
+ item?: ItemNonNullableFields;
615
+ }
616
+ interface BulkUpdateProjectItemResultNonNullableFields {
617
+ itemMetadata?: ItemMetadataNonNullableFields;
618
+ item?: ItemNonNullableFields;
619
+ }
620
+ export interface BulkUpdateProjectItemsResponseNonNullableFields {
621
+ projectId: string;
622
+ results: BulkUpdateProjectItemResultNonNullableFields[];
623
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
624
+ }
625
+ export interface DeleteProjectItemResponseNonNullableFields {
626
+ projectId: string;
627
+ itemId: string;
628
+ }
629
+ interface BulkDeleteProjectItemResultNonNullableFields {
630
+ itemMetadata?: ItemMetadataNonNullableFields;
631
+ itemId: string;
632
+ }
633
+ export interface BulkDeleteProjectItemsResponseNonNullableFields {
634
+ projectId: string;
635
+ results: BulkDeleteProjectItemResultNonNullableFields[];
636
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
637
+ }
638
+ export interface DuplicateProjectItemsResponseNonNullableFields {
639
+ projectId: string;
640
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
641
+ }
642
+ export interface BaseEventMetadata {
643
+ /** App instance ID. */
644
+ instanceId?: string | null;
645
+ /** Event type. */
646
+ eventType?: string;
647
+ /** The identification type and identity data. */
648
+ identity?: IdentificationData;
649
+ }
650
+ export interface EventMetadata extends BaseEventMetadata {
651
+ /**
652
+ * Unique event ID.
653
+ * Allows clients to ignore duplicate webhooks.
654
+ */
655
+ _id?: string;
656
+ /**
657
+ * Assumes actions are also always typed to an entity_type
658
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
659
+ */
660
+ entityFqdn?: string;
661
+ /**
662
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
663
+ * This is although the created/updated/deleted notion is duplication of the oneof types
664
+ * Example: created/updated/deleted/started/completed/email_opened
665
+ */
666
+ slug?: string;
667
+ /** ID of the entity associated with the event. */
668
+ entityId?: string;
669
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
670
+ eventTime?: Date | null;
671
+ /**
672
+ * Whether the event was triggered as a result of a privacy regulation application
673
+ * (for example, GDPR).
674
+ */
675
+ triggeredByAnonymizeRequest?: boolean | null;
676
+ /** If present, indicates the action that triggered the event. */
677
+ originatedFrom?: string | null;
678
+ /**
679
+ * A sequence number defining the order of updates to the underlying entity.
680
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
681
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
682
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
683
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
684
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
685
+ */
686
+ entityEventSequence?: string | null;
687
+ }
688
+ export interface ProjectItemCreatedEnvelope {
689
+ entity: Item;
690
+ metadata: EventMetadata;
691
+ }
692
+ /**
693
+ * Triggered when a project item is created.
694
+ * @permissionScope Manage Portfolio
695
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
696
+ * @permissionId PORTFOLIO.PROJECT_ITEM_READ
697
+ * @webhook
698
+ * @eventType wix.portfolio.project_items.v1.project_item_created
699
+ * @documentationMaturity preview
700
+ */
701
+ export declare function onProjectItemCreated(handler: (event: ProjectItemCreatedEnvelope) => void | Promise<void>): void;
702
+ export interface ProjectItemDeletedEnvelope {
703
+ metadata: EventMetadata;
704
+ }
705
+ /**
706
+ * Triggered when a project item is deleted.
707
+ * @permissionScope Manage Portfolio
708
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
709
+ * @permissionId PORTFOLIO.PROJECT_ITEM_READ
710
+ * @webhook
711
+ * @eventType wix.portfolio.project_items.v1.project_item_deleted
712
+ * @documentationMaturity preview
713
+ */
714
+ export declare function onProjectItemDeleted(handler: (event: ProjectItemDeletedEnvelope) => void | Promise<void>): void;
715
+ export interface ProjectItemUpdatedEnvelope {
716
+ entity: Item;
717
+ metadata: EventMetadata;
718
+ }
719
+ /**
720
+ * Triggered when a project item is updated.
721
+ * @permissionScope Manage Portfolio
722
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
723
+ * @permissionId PORTFOLIO.PROJECT_ITEM_READ
724
+ * @webhook
725
+ * @eventType wix.portfolio.project_items.v1.project_item_updated
726
+ * @documentationMaturity preview
727
+ */
728
+ export declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise<void>): void;
729
+ /**
730
+ * Creates a project item.
731
+ * @param item - Project item to create.
732
+ * @public
733
+ * @documentationMaturity preview
734
+ * @requiredField item
735
+ * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
736
+ * @permissionScope Manage Portfolio
737
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
738
+ * @applicableIdentity APP
739
+ * @returns Newly created project item.
740
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.CreateProjectItem
741
+ */
742
+ export declare function createProjectItem(item: Item): Promise<Item & ItemNonNullableFields>;
743
+ /**
744
+ * Creates multiple project items.
745
+ * @public
746
+ * @documentationMaturity preview
747
+ * @requiredField options.items
748
+ * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
749
+ * @permissionScope Manage Portfolio
750
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
751
+ * @applicableIdentity APP
752
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkCreateProjectItems
753
+ */
754
+ export declare function bulkCreateProjectItems(options?: BulkCreateProjectItemsOptions): Promise<BulkCreateProjectItemsResponse & BulkCreateProjectItemsResponseNonNullableFields>;
755
+ export interface BulkCreateProjectItemsOptions {
756
+ /** Project items to create. */
757
+ items: Item[];
758
+ /** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
759
+ returnFullEntity?: boolean | null;
760
+ }
761
+ /**
762
+ * Retrieves a project item.
763
+ * @param itemId - Project item ID.
764
+ * @public
765
+ * @documentationMaturity preview
766
+ * @requiredField itemId
767
+ * @permissionId PORTFOLIO.PROJECT_ITEM_READ
768
+ * @permissionScope Manage Portfolio
769
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
770
+ * @applicableIdentity APP
771
+ * @applicableIdentity VISITOR
772
+ * @returns Project item.
773
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.GetProjectItem
774
+ */
775
+ export declare function getProjectItem(itemId: string): Promise<Item & ItemNonNullableFields>;
776
+ /**
777
+ * Retrieves a list of all project items in the specified project.
778
+ * @param projectId - Project ID.
779
+ * @public
780
+ * @documentationMaturity preview
781
+ * @requiredField projectId
782
+ * @permissionId PORTFOLIO.PROJECT_ITEM_READ
783
+ * @permissionScope Manage Portfolio
784
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
785
+ * @applicableIdentity APP
786
+ * @applicableIdentity VISITOR
787
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.ListProjectItems
788
+ */
789
+ export declare function listProjectItems(projectId: string, options?: ListProjectItemsOptions): Promise<ListProjectItemsResponse & ListProjectItemsResponseNonNullableFields>;
790
+ export interface ListProjectItemsOptions {
791
+ /** Maximum number of items to return in the results. */
792
+ paging?: Paging;
793
+ }
794
+ /**
795
+ * Updates a project item.
796
+ * @param _id - Project item ID.
797
+ * @public
798
+ * @documentationMaturity preview
799
+ * @requiredField _id
800
+ * @requiredField item
801
+ * @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
802
+ * @permissionScope Manage Portfolio
803
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
804
+ * @applicableIdentity APP
805
+ * @returns The updated project item.
806
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.UpdateProjectItem
807
+ */
808
+ export declare function updateProjectItem(_id: string | null, item: UpdateProjectItem): Promise<Item & ItemNonNullableFields>;
809
+ export interface UpdateProjectItem {
810
+ /** Information about the Wix Media image. */
811
+ image?: Image;
812
+ /** Information about the Wix Media video. */
813
+ video?: Video;
814
+ /** Project ID. */
815
+ projectId?: string | null;
816
+ /**
817
+ * Project item ID.
818
+ * @readonly
819
+ */
820
+ _id?: string | null;
821
+ /**
822
+ * Index that determines which position a project is displayed in the project. <br />
823
+ *
824
+ * Default: [Epoch](https://www.epoch101.com/) timestamp. <br />
825
+ */
826
+ sortOrder?: number | null;
827
+ /** Project item title. */
828
+ title?: string | null;
829
+ /** Project item description. */
830
+ description?: string | null;
831
+ /**
832
+ * Project item data type.
833
+ * @readonly
834
+ */
835
+ type?: Type;
836
+ /**
837
+ * Date and time the project item was created.
838
+ * @readonly
839
+ */
840
+ _createdDate?: Date | null;
841
+ /**
842
+ * Date and time the project item was last updated.
843
+ * @readonly
844
+ */
845
+ _updatedDate?: Date | null;
846
+ /** Project item link. */
847
+ link?: Link;
848
+ }
849
+ /**
850
+ * Updates multiple project items.
851
+ * @public
852
+ * @documentationMaturity preview
853
+ * @requiredField options.items.item
854
+ * @requiredField options.items.item._id
855
+ * @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
856
+ * @permissionScope Manage Portfolio
857
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
858
+ * @applicableIdentity APP
859
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkUpdateProjectItems
860
+ */
861
+ export declare function bulkUpdateProjectItems(options?: BulkUpdateProjectItemsOptions): Promise<BulkUpdateProjectItemsResponse & BulkUpdateProjectItemsResponseNonNullableFields>;
862
+ export interface BulkUpdateProjectItemsOptions {
863
+ /** items to be updated. */
864
+ items?: MaskedItem[];
865
+ /** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
866
+ returnFullEntity?: boolean | null;
867
+ }
868
+ /**
869
+ * Deletes a project item.
870
+ * @param itemId - ID of the project item to delete.
871
+ * @public
872
+ * @documentationMaturity preview
873
+ * @requiredField itemId
874
+ * @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
875
+ * @permissionScope Manage Portfolio
876
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
877
+ * @applicableIdentity APP
878
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DeleteProjectItem
879
+ */
880
+ export declare function deleteProjectItem(itemId: string): Promise<DeleteProjectItemResponse & DeleteProjectItemResponseNonNullableFields>;
881
+ /**
882
+ * Deletes multiple project items.
883
+ * @public
884
+ * @documentationMaturity preview
885
+ * @requiredField options
886
+ * @requiredField options.itemIds
887
+ * @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
888
+ * @permissionScope Manage Portfolio
889
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
890
+ * @applicableIdentity APP
891
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkDeleteProjectItems
892
+ */
893
+ export declare function bulkDeleteProjectItems(options: BulkDeleteProjectItemsOptions): Promise<BulkDeleteProjectItemsResponse & BulkDeleteProjectItemsResponseNonNullableFields>;
894
+ export interface BulkDeleteProjectItemsOptions {
895
+ /** Project item IDs. */
896
+ itemIds: string[];
897
+ }
898
+ /**
899
+ * Duplicates project items from one project (the origin) to another project (the target).
900
+ *
901
+ * <blockquote class="important">
902
+ * <strong>Important:</strong>
903
+ *
904
+ * Both the origin and target projects must exist before calling this method.
905
+ * </blockquote>
906
+ * @param originProjectId - ID of the project containing the items to duplicate.
907
+ * @public
908
+ * @documentationMaturity preview
909
+ * @requiredField options
910
+ * @requiredField options.targetProjectId
911
+ * @requiredField originProjectId
912
+ * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
913
+ * @permissionScope Manage Portfolio
914
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
915
+ * @applicableIdentity APP
916
+ * @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DuplicateProjectItems
917
+ */
918
+ export declare function duplicateProjectItems(originProjectId: string, options: DuplicateProjectItemsOptions): Promise<DuplicateProjectItemsResponse & DuplicateProjectItemsResponseNonNullableFields>;
919
+ export interface DuplicateProjectItemsOptions {
920
+ /** ID of the project where the duplicated items will be added. */
921
+ targetProjectId: string;
922
+ }
923
+ export {};