@wix/auto_sdk_portfolio_project-items 1.0.52 → 1.0.53

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.
@@ -206,6 +206,177 @@ interface Link {
206
206
  */
207
207
  target?: string | null;
208
208
  }
209
+ interface GenerateTokenForProjectItemsRequest {
210
+ /**
211
+ * Media ids of requested project items
212
+ * @minSize 1
213
+ * @maxLength 100
214
+ */
215
+ mediaIds: string[];
216
+ }
217
+ interface GenerateTokenForProjectItemsResponse {
218
+ /** Generated media tokens for project items */
219
+ mediaTokens?: ProjectItemMediaToken[];
220
+ }
221
+ interface ProjectItemMediaToken {
222
+ /** Media id of project item */
223
+ mediaId?: string;
224
+ /** Generated media token for project item */
225
+ mediaToken?: string;
226
+ }
227
+ interface DomainEvent extends DomainEventBodyOneOf {
228
+ createdEvent?: EntityCreatedEvent;
229
+ updatedEvent?: EntityUpdatedEvent;
230
+ deletedEvent?: EntityDeletedEvent;
231
+ actionEvent?: ActionEvent;
232
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
233
+ _id?: string;
234
+ /**
235
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
236
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
237
+ */
238
+ entityFqdn?: string;
239
+ /**
240
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
241
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
242
+ */
243
+ slug?: string;
244
+ /** ID of the entity associated with the event. */
245
+ entityId?: string;
246
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
247
+ eventTime?: Date | null;
248
+ /**
249
+ * Whether the event was triggered as a result of a privacy regulation application
250
+ * (for example, GDPR).
251
+ */
252
+ triggeredByAnonymizeRequest?: boolean | null;
253
+ /** If present, indicates the action that triggered the event. */
254
+ originatedFrom?: string | null;
255
+ /**
256
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
257
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
258
+ */
259
+ entityEventSequence?: string | null;
260
+ }
261
+ /** @oneof */
262
+ interface DomainEventBodyOneOf {
263
+ createdEvent?: EntityCreatedEvent;
264
+ updatedEvent?: EntityUpdatedEvent;
265
+ deletedEvent?: EntityDeletedEvent;
266
+ actionEvent?: ActionEvent;
267
+ }
268
+ interface EntityCreatedEvent {
269
+ entity?: string;
270
+ }
271
+ interface RestoreInfo {
272
+ deletedDate?: Date | null;
273
+ }
274
+ interface EntityUpdatedEvent {
275
+ /**
276
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
277
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
278
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
279
+ */
280
+ currentEntity?: string;
281
+ }
282
+ interface EntityDeletedEvent {
283
+ /** Entity that was deleted. */
284
+ deletedEntity?: string | null;
285
+ }
286
+ interface ActionEvent {
287
+ body?: string;
288
+ }
289
+ interface MessageEnvelope {
290
+ /**
291
+ * App instance ID.
292
+ * @format GUID
293
+ */
294
+ instanceId?: string | null;
295
+ /**
296
+ * Event type.
297
+ * @maxLength 150
298
+ */
299
+ eventType?: string;
300
+ /** The identification type and identity data. */
301
+ identity?: IdentificationData;
302
+ /** Stringify payload. */
303
+ data?: string;
304
+ /** Details related to the account */
305
+ accountInfo?: AccountInfo;
306
+ }
307
+ interface IdentificationData extends IdentificationDataIdOneOf {
308
+ /**
309
+ * ID of a site visitor that has not logged in to the site.
310
+ * @format GUID
311
+ */
312
+ anonymousVisitorId?: string;
313
+ /**
314
+ * ID of a site visitor that has logged in to the site.
315
+ * @format GUID
316
+ */
317
+ memberId?: string;
318
+ /**
319
+ * ID of a Wix user (site owner, contributor, etc.).
320
+ * @format GUID
321
+ */
322
+ wixUserId?: string;
323
+ /**
324
+ * ID of an app.
325
+ * @format GUID
326
+ */
327
+ appId?: string;
328
+ /** @readonly */
329
+ identityType?: WebhookIdentityTypeWithLiterals;
330
+ }
331
+ /** @oneof */
332
+ interface IdentificationDataIdOneOf {
333
+ /**
334
+ * ID of a site visitor that has not logged in to the site.
335
+ * @format GUID
336
+ */
337
+ anonymousVisitorId?: string;
338
+ /**
339
+ * ID of a site visitor that has logged in to the site.
340
+ * @format GUID
341
+ */
342
+ memberId?: string;
343
+ /**
344
+ * ID of a Wix user (site owner, contributor, etc.).
345
+ * @format GUID
346
+ */
347
+ wixUserId?: string;
348
+ /**
349
+ * ID of an app.
350
+ * @format GUID
351
+ */
352
+ appId?: string;
353
+ }
354
+ declare enum WebhookIdentityType {
355
+ UNKNOWN = "UNKNOWN",
356
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
357
+ MEMBER = "MEMBER",
358
+ WIX_USER = "WIX_USER",
359
+ APP = "APP"
360
+ }
361
+ /** @enumType */
362
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
363
+ interface AccountInfo {
364
+ /**
365
+ * ID of the Wix account associated with the event.
366
+ * @format GUID
367
+ */
368
+ accountId?: string | null;
369
+ /**
370
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
371
+ * @format GUID
372
+ */
373
+ parentAccountId?: string | null;
374
+ /**
375
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
376
+ * @format GUID
377
+ */
378
+ siteId?: string | null;
379
+ }
209
380
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
210
381
  /**
211
382
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -759,68 +930,6 @@ interface CreateProjectGalleryResponse {
759
930
  */
760
931
  galleryId?: string;
761
932
  }
762
- interface DomainEvent extends DomainEventBodyOneOf {
763
- createdEvent?: EntityCreatedEvent;
764
- updatedEvent?: EntityUpdatedEvent;
765
- deletedEvent?: EntityDeletedEvent;
766
- actionEvent?: ActionEvent;
767
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
768
- _id?: string;
769
- /**
770
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
771
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
772
- */
773
- entityFqdn?: string;
774
- /**
775
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
776
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
777
- */
778
- slug?: string;
779
- /** ID of the entity associated with the event. */
780
- entityId?: string;
781
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
782
- eventTime?: Date | null;
783
- /**
784
- * Whether the event was triggered as a result of a privacy regulation application
785
- * (for example, GDPR).
786
- */
787
- triggeredByAnonymizeRequest?: boolean | null;
788
- /** If present, indicates the action that triggered the event. */
789
- originatedFrom?: string | null;
790
- /**
791
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
792
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
793
- */
794
- entityEventSequence?: string | null;
795
- }
796
- /** @oneof */
797
- interface DomainEventBodyOneOf {
798
- createdEvent?: EntityCreatedEvent;
799
- updatedEvent?: EntityUpdatedEvent;
800
- deletedEvent?: EntityDeletedEvent;
801
- actionEvent?: ActionEvent;
802
- }
803
- interface EntityCreatedEvent {
804
- entity?: string;
805
- }
806
- interface RestoreInfo {
807
- deletedDate?: Date | null;
808
- }
809
- interface EntityUpdatedEvent {
810
- /**
811
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
812
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
813
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
814
- */
815
- currentEntity?: string;
816
- }
817
- interface EntityDeletedEvent {
818
- /** Entity that was deleted. */
819
- deletedEntity?: string | null;
820
- }
821
- interface ActionEvent {
822
- body?: string;
823
- }
824
933
  interface Empty {
825
934
  }
826
935
  interface DeletedProjectRestored {
@@ -859,115 +968,6 @@ interface CloneFromOriginRequest {
859
968
  }
860
969
  interface CloneFromOriginResponse {
861
970
  }
862
- interface MessageEnvelope {
863
- /**
864
- * App instance ID.
865
- * @format GUID
866
- */
867
- instanceId?: string | null;
868
- /**
869
- * Event type.
870
- * @maxLength 150
871
- */
872
- eventType?: string;
873
- /** The identification type and identity data. */
874
- identity?: IdentificationData;
875
- /** Stringify payload. */
876
- data?: string;
877
- /** Details related to the account */
878
- accountInfo?: AccountInfo;
879
- }
880
- interface IdentificationData extends IdentificationDataIdOneOf {
881
- /**
882
- * ID of a site visitor that has not logged in to the site.
883
- * @format GUID
884
- */
885
- anonymousVisitorId?: string;
886
- /**
887
- * ID of a site visitor that has logged in to the site.
888
- * @format GUID
889
- */
890
- memberId?: string;
891
- /**
892
- * ID of a Wix user (site owner, contributor, etc.).
893
- * @format GUID
894
- */
895
- wixUserId?: string;
896
- /**
897
- * ID of an app.
898
- * @format GUID
899
- */
900
- appId?: string;
901
- /** @readonly */
902
- identityType?: WebhookIdentityTypeWithLiterals;
903
- }
904
- /** @oneof */
905
- interface IdentificationDataIdOneOf {
906
- /**
907
- * ID of a site visitor that has not logged in to the site.
908
- * @format GUID
909
- */
910
- anonymousVisitorId?: string;
911
- /**
912
- * ID of a site visitor that has logged in to the site.
913
- * @format GUID
914
- */
915
- memberId?: string;
916
- /**
917
- * ID of a Wix user (site owner, contributor, etc.).
918
- * @format GUID
919
- */
920
- wixUserId?: string;
921
- /**
922
- * ID of an app.
923
- * @format GUID
924
- */
925
- appId?: string;
926
- }
927
- declare enum WebhookIdentityType {
928
- UNKNOWN = "UNKNOWN",
929
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
930
- MEMBER = "MEMBER",
931
- WIX_USER = "WIX_USER",
932
- APP = "APP"
933
- }
934
- /** @enumType */
935
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
936
- interface AccountInfo {
937
- /**
938
- * ID of the Wix account associated with the event.
939
- * @format GUID
940
- */
941
- accountId?: string | null;
942
- /**
943
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
944
- * @format GUID
945
- */
946
- parentAccountId?: string | null;
947
- /**
948
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
949
- * @format GUID
950
- */
951
- siteId?: string | null;
952
- }
953
- interface GenerateTokenForProjectItemsRequest {
954
- /**
955
- * Media ids of requested project items
956
- * @minSize 1
957
- * @maxLength 100
958
- */
959
- mediaIds: string[];
960
- }
961
- interface GenerateTokenForProjectItemsResponse {
962
- /** Generated media tokens for project items */
963
- mediaTokens?: ProjectItemMediaToken[];
964
- }
965
- interface ProjectItemMediaToken {
966
- /** Media id of project item */
967
- mediaId?: string;
968
- /** Generated media token for project item */
969
- mediaToken?: string;
970
- }
971
971
  interface BaseEventMetadata {
972
972
  /**
973
973
  * App instance ID.
@@ -1064,6 +1064,16 @@ interface ProjectItemUpdatedEnvelope {
1064
1064
  * @slug updated
1065
1065
  */
1066
1066
  declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise<void>): void;
1067
+ /**
1068
+ * Generate media token for project items
1069
+ * @param mediaIds - Media ids of requested project items
1070
+ * @public
1071
+ * @requiredField mediaIds
1072
+ * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
1073
+ * @applicableIdentity APP
1074
+ * @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
1075
+ */
1076
+ declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 2>>;
1067
1077
  /**
1068
1078
  * Creates a project item.
1069
1079
  * @param item - Project item to create.
@@ -1271,15 +1281,5 @@ interface DuplicateProjectItemsOptions {
1271
1281
  */
1272
1282
  targetProjectId: string;
1273
1283
  }
1274
- /**
1275
- * Generate media token for project items
1276
- * @param mediaIds - Media ids of requested project items
1277
- * @public
1278
- * @requiredField mediaIds
1279
- * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
1280
- * @applicableIdentity APP
1281
- * @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
1282
- */
1283
- declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 2>>;
1284
1284
 
1285
1285
  export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateProjectItemResult, type BulkCreateProjectItemsOptions, type BulkCreateProjectItemsRequest, type BulkCreateProjectItemsResponse, type BulkDeleteProjectItemResult, type BulkDeleteProjectItemsOptions, type BulkDeleteProjectItemsRequest, type BulkDeleteProjectItemsResponse, type BulkUpdateProjectItemResult, type BulkUpdateProjectItemsOptions, type BulkUpdateProjectItemsRequest, type BulkUpdateProjectItemsResponse, type CloneFromOriginRequest, type CloneFromOriginResponse, type CreateProjectGalleryRequest, type CreateProjectGalleryResponse, type CreateProjectItemRequest, type CreateProjectItemResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteProjectItemRequest, type DeleteProjectItemResponse, type DeletedProjectRestored, type DomainEvent, type DomainEventBodyOneOf, type DuplicateProjectItemsOptions, type DuplicateProjectItemsRequest, type DuplicateProjectItemsResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type GenerateTokenForProjectItemsRequest, type GenerateTokenForProjectItemsResponse, type GetProjectItemRequest, type GetProjectItemResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type InvalidateCache, type InvalidateCacheGetByOneOf, type Item, type ItemMetadata, type ItemMetadataOneOf, type Link, type ListProjectItemsOptions, type ListProjectItemsRequest, type ListProjectItemsResponse, type MaskedItem, type MessageEnvelope, type Page, type Pages, type Paging, type PagingMetadataV2, type Point, type ProjectItemCreatedEnvelope, type ProjectItemDeletedEnvelope, type ProjectItemMediaToken, type ProjectItemUpdatedEnvelope, type QueryProjectItemsRequest, type QueryProjectItemsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Tags, Type, type TypeWithLiterals, type URI, type URIs, type UnsharpMasking, type UpdateProjectItem, type UpdateProjectItemRequest, type UpdateProjectItemResponse, type Video, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateProjectItems, bulkDeleteProjectItems, bulkUpdateProjectItems, createProjectItem, deleteProjectItem, duplicateProjectItems, generateTokenForProjectItems, getProjectItem, listProjectItems, onProjectItemCreated, onProjectItemDeleted, onProjectItemUpdated, updateProjectItem };