@wix/auto_sdk_portfolio_project-items 1.0.17 → 1.0.19
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.
- package/build/cjs/index.d.ts +13 -13
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{portfolio-project-items-v1-project-item-project-items.universal-BzW9mHIK.d.ts → index.typings.d.ts} +151 -1
- package/build/cjs/index.typings.js +1123 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +13 -13
- package/build/es/index.mjs.map +1 -1
- package/build/es/{portfolio-project-items-v1-project-item-project-items.universal-BzW9mHIK.d.mts → index.typings.d.mts} +151 -1
- package/build/es/index.typings.mjs +1086 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +13 -13
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{portfolio-project-items-v1-project-item-project-items.universal-BzW9mHIK.d.ts → index.typings.d.ts} +151 -1
- package/build/internal/cjs/index.typings.js +1123 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +13 -13
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{portfolio-project-items-v1-project-item-project-items.universal-BzW9mHIK.d.mts → index.typings.d.mts} +151 -1
- package/build/internal/es/index.typings.mjs +1086 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +4 -3
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface Item extends ItemMetadataOneOf {
|
|
2
4
|
/** Information about the Wix Media image. */
|
|
3
5
|
image?: Image;
|
|
@@ -70,6 +72,8 @@ declare enum ImageType {
|
|
|
70
72
|
WIX_MEDIA = "WIX_MEDIA",
|
|
71
73
|
EXTERNAL = "EXTERNAL"
|
|
72
74
|
}
|
|
75
|
+
/** @enumType */
|
|
76
|
+
type ImageTypeWithLiterals = ImageType | 'UNDEFINED' | 'WIX_MEDIA' | 'EXTERNAL';
|
|
73
77
|
interface Point {
|
|
74
78
|
/** X-coordinate of the focal point. */
|
|
75
79
|
x?: number;
|
|
@@ -768,13 +772,66 @@ interface ProjectItemCreatedEnvelope {
|
|
|
768
772
|
entity: Item;
|
|
769
773
|
metadata: EventMetadata;
|
|
770
774
|
}
|
|
775
|
+
/**
|
|
776
|
+
* Triggered when a project item is created.
|
|
777
|
+
* @permissionScope Manage Portfolio
|
|
778
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
779
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
780
|
+
* @webhook
|
|
781
|
+
* @eventType wix.portfolio.project_items.v1.project_item_created
|
|
782
|
+
* @slug created
|
|
783
|
+
* @documentationMaturity preview
|
|
784
|
+
*/
|
|
785
|
+
declare function onProjectItemCreated(handler: (event: ProjectItemCreatedEnvelope) => void | Promise<void>): void;
|
|
771
786
|
interface ProjectItemDeletedEnvelope {
|
|
772
787
|
metadata: EventMetadata;
|
|
773
788
|
}
|
|
789
|
+
/**
|
|
790
|
+
* Triggered when a project item is deleted.
|
|
791
|
+
* @permissionScope Manage Portfolio
|
|
792
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
793
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
794
|
+
* @webhook
|
|
795
|
+
* @eventType wix.portfolio.project_items.v1.project_item_deleted
|
|
796
|
+
* @slug deleted
|
|
797
|
+
* @documentationMaturity preview
|
|
798
|
+
*/
|
|
799
|
+
declare function onProjectItemDeleted(handler: (event: ProjectItemDeletedEnvelope) => void | Promise<void>): void;
|
|
774
800
|
interface ProjectItemUpdatedEnvelope {
|
|
775
801
|
entity: Item;
|
|
776
802
|
metadata: EventMetadata;
|
|
777
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Triggered when a project item is updated.
|
|
806
|
+
* @permissionScope Manage Portfolio
|
|
807
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
808
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
809
|
+
* @webhook
|
|
810
|
+
* @eventType wix.portfolio.project_items.v1.project_item_updated
|
|
811
|
+
* @slug updated
|
|
812
|
+
* @documentationMaturity preview
|
|
813
|
+
*/
|
|
814
|
+
declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise<void>): void;
|
|
815
|
+
/**
|
|
816
|
+
* Creates a project item.
|
|
817
|
+
* @param item - Project item to create.
|
|
818
|
+
* @public
|
|
819
|
+
* @requiredField item
|
|
820
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
821
|
+
* @applicableIdentity APP
|
|
822
|
+
* @returns Newly created project item.
|
|
823
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.CreateProjectItem
|
|
824
|
+
*/
|
|
825
|
+
declare function createProjectItem(item: Item): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `type`, 4>>;
|
|
826
|
+
/**
|
|
827
|
+
* Creates multiple project items.
|
|
828
|
+
* @public
|
|
829
|
+
* @requiredField options.items
|
|
830
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
831
|
+
* @applicableIdentity APP
|
|
832
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkCreateProjectItems
|
|
833
|
+
*/
|
|
834
|
+
declare function bulkCreateProjectItems(options?: NonNullablePaths<BulkCreateProjectItemsOptions, `items`, 2>): Promise<NonNullablePaths<BulkCreateProjectItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.type` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
778
835
|
interface BulkCreateProjectItemsOptions {
|
|
779
836
|
/**
|
|
780
837
|
* Project items to create.
|
|
@@ -785,10 +842,45 @@ interface BulkCreateProjectItemsOptions {
|
|
|
785
842
|
/** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
|
|
786
843
|
returnFullEntity?: boolean | null;
|
|
787
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* Retrieves a project item.
|
|
847
|
+
* @param itemId - Project item ID.
|
|
848
|
+
* @public
|
|
849
|
+
* @requiredField itemId
|
|
850
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
851
|
+
* @applicableIdentity APP
|
|
852
|
+
* @applicableIdentity VISITOR
|
|
853
|
+
* @returns Project item.
|
|
854
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.GetProjectItem
|
|
855
|
+
*/
|
|
856
|
+
declare function getProjectItem(itemId: string): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `type`, 4>>;
|
|
857
|
+
/**
|
|
858
|
+
* Retrieves a list of all project items in the specified project.
|
|
859
|
+
* @param projectId - Project ID.
|
|
860
|
+
* @public
|
|
861
|
+
* @requiredField projectId
|
|
862
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
863
|
+
* @applicableIdentity APP
|
|
864
|
+
* @applicableIdentity VISITOR
|
|
865
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.ListProjectItems
|
|
866
|
+
*/
|
|
867
|
+
declare function listProjectItems(projectId: string, options?: ListProjectItemsOptions): Promise<NonNullablePaths<ListProjectItemsResponse, `items` | `items.${number}.image.focalPoint.x` | `items.${number}.image.focalPoint.y` | `items.${number}.type`, 6>>;
|
|
788
868
|
interface ListProjectItemsOptions {
|
|
789
869
|
/** Maximum number of items to return in the results. */
|
|
790
870
|
paging?: Paging;
|
|
791
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Updates a project item.
|
|
874
|
+
* @param _id - Project item ID.
|
|
875
|
+
* @public
|
|
876
|
+
* @requiredField _id
|
|
877
|
+
* @requiredField item
|
|
878
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
|
|
879
|
+
* @applicableIdentity APP
|
|
880
|
+
* @returns The updated project item.
|
|
881
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.UpdateProjectItem
|
|
882
|
+
*/
|
|
883
|
+
declare function updateProjectItem(_id: string, item: UpdateProjectItem): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `type`, 4>>;
|
|
792
884
|
interface UpdateProjectItem {
|
|
793
885
|
/** Information about the Wix Media image. */
|
|
794
886
|
image?: Image;
|
|
@@ -833,6 +925,16 @@ interface UpdateProjectItem {
|
|
|
833
925
|
/** Project item link. */
|
|
834
926
|
link?: Link;
|
|
835
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* Updates multiple project items.
|
|
930
|
+
* @public
|
|
931
|
+
* @requiredField options.items.item
|
|
932
|
+
* @requiredField options.items.item._id
|
|
933
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
|
|
934
|
+
* @applicableIdentity APP
|
|
935
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkUpdateProjectItems
|
|
936
|
+
*/
|
|
937
|
+
declare function bulkUpdateProjectItems(options?: NonNullablePaths<BulkUpdateProjectItemsOptions, `items.${number}.item` | `items.${number}.item._id`, 5>): Promise<NonNullablePaths<BulkUpdateProjectItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.type` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
836
938
|
interface BulkUpdateProjectItemsOptions {
|
|
837
939
|
/**
|
|
838
940
|
* items to be updated.
|
|
@@ -842,6 +944,26 @@ interface BulkUpdateProjectItemsOptions {
|
|
|
842
944
|
/** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
|
|
843
945
|
returnFullEntity?: boolean | null;
|
|
844
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* Deletes a project item.
|
|
949
|
+
* @param itemId - ID of the project item to delete.
|
|
950
|
+
* @public
|
|
951
|
+
* @requiredField itemId
|
|
952
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
|
|
953
|
+
* @applicableIdentity APP
|
|
954
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DeleteProjectItem
|
|
955
|
+
*/
|
|
956
|
+
declare function deleteProjectItem(itemId: string): Promise<NonNullablePaths<DeleteProjectItemResponse, `projectId` | `itemId`, 2>>;
|
|
957
|
+
/**
|
|
958
|
+
* Deletes multiple project items.
|
|
959
|
+
* @public
|
|
960
|
+
* @requiredField options
|
|
961
|
+
* @requiredField options.itemIds
|
|
962
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
|
|
963
|
+
* @applicableIdentity APP
|
|
964
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkDeleteProjectItems
|
|
965
|
+
*/
|
|
966
|
+
declare function bulkDeleteProjectItems(options: NonNullablePaths<BulkDeleteProjectItemsOptions, `itemIds`, 2>): Promise<NonNullablePaths<BulkDeleteProjectItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.itemId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
845
967
|
interface BulkDeleteProjectItemsOptions {
|
|
846
968
|
/**
|
|
847
969
|
* Project item IDs.
|
|
@@ -851,6 +973,24 @@ interface BulkDeleteProjectItemsOptions {
|
|
|
851
973
|
*/
|
|
852
974
|
itemIds: string[];
|
|
853
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* Duplicates project items from one project (the origin) to another project (the target).
|
|
978
|
+
*
|
|
979
|
+
* <blockquote class="important">
|
|
980
|
+
* <strong>Important:</strong>
|
|
981
|
+
*
|
|
982
|
+
* Both the origin and target projects must exist before calling this method.
|
|
983
|
+
* </blockquote>
|
|
984
|
+
* @param originProjectId - ID of the project containing the items to duplicate.
|
|
985
|
+
* @public
|
|
986
|
+
* @requiredField options
|
|
987
|
+
* @requiredField options.targetProjectId
|
|
988
|
+
* @requiredField originProjectId
|
|
989
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
990
|
+
* @applicableIdentity APP
|
|
991
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DuplicateProjectItems
|
|
992
|
+
*/
|
|
993
|
+
declare function duplicateProjectItems(originProjectId: string, options: NonNullablePaths<DuplicateProjectItemsOptions, `targetProjectId`, 2>): Promise<NonNullablePaths<DuplicateProjectItemsResponse, `projectId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 3>>;
|
|
854
994
|
interface DuplicateProjectItemsOptions {
|
|
855
995
|
/**
|
|
856
996
|
* ID of the project where the duplicated items will be added.
|
|
@@ -858,5 +998,15 @@ interface DuplicateProjectItemsOptions {
|
|
|
858
998
|
*/
|
|
859
999
|
targetProjectId: string;
|
|
860
1000
|
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Generate media token for project items
|
|
1003
|
+
* @param mediaIds - Media ids of requested project items
|
|
1004
|
+
* @public
|
|
1005
|
+
* @requiredField mediaIds
|
|
1006
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
1007
|
+
* @applicableIdentity APP
|
|
1008
|
+
* @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
|
|
1009
|
+
*/
|
|
1010
|
+
declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 4>>;
|
|
861
1011
|
|
|
862
|
-
export { type
|
|
1012
|
+
export { type ActionEvent, 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 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 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 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 };
|