@wix/auto_sdk_portfolio_project-items 1.0.17 → 1.0.18
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 +20 -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} +158 -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 +20 -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} +158 -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 +20 -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} +158 -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 +20 -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} +158 -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 +3 -2
|
@@ -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,69 @@ 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
|
+
type ProjectItemNonNullablePaths = `image.focalPoint.x` | `image.focalPoint.y` | `type`;
|
|
816
|
+
/**
|
|
817
|
+
* Creates a project item.
|
|
818
|
+
* @param item - Project item to create.
|
|
819
|
+
* @public
|
|
820
|
+
* @requiredField item
|
|
821
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
822
|
+
* @applicableIdentity APP
|
|
823
|
+
* @returns Newly created project item.
|
|
824
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.CreateProjectItem
|
|
825
|
+
*/
|
|
826
|
+
declare function createProjectItem(item: Item): Promise<NonNullablePaths<Item, ProjectItemNonNullablePaths>>;
|
|
827
|
+
/**
|
|
828
|
+
* Creates multiple project items.
|
|
829
|
+
* @public
|
|
830
|
+
* @requiredField options.items
|
|
831
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
832
|
+
* @applicableIdentity APP
|
|
833
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkCreateProjectItems
|
|
834
|
+
*/
|
|
835
|
+
declare function bulkCreateProjectItems(options?: NonNullablePaths<BulkCreateProjectItemsOptions, `items`>): Promise<NonNullablePaths<BulkCreateProjectItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
836
|
+
[P in ProjectItemNonNullablePaths]: `results.${number}.item.${P}`;
|
|
837
|
+
}[ProjectItemNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
778
838
|
interface BulkCreateProjectItemsOptions {
|
|
779
839
|
/**
|
|
780
840
|
* Project items to create.
|
|
@@ -785,10 +845,47 @@ interface BulkCreateProjectItemsOptions {
|
|
|
785
845
|
/** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
|
|
786
846
|
returnFullEntity?: boolean | null;
|
|
787
847
|
}
|
|
848
|
+
/**
|
|
849
|
+
* Retrieves a project item.
|
|
850
|
+
* @param itemId - Project item ID.
|
|
851
|
+
* @public
|
|
852
|
+
* @requiredField itemId
|
|
853
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
854
|
+
* @applicableIdentity APP
|
|
855
|
+
* @applicableIdentity VISITOR
|
|
856
|
+
* @returns Project item.
|
|
857
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.GetProjectItem
|
|
858
|
+
*/
|
|
859
|
+
declare function getProjectItem(itemId: string): Promise<NonNullablePaths<Item, ProjectItemNonNullablePaths>>;
|
|
860
|
+
/**
|
|
861
|
+
* Retrieves a list of all project items in the specified project.
|
|
862
|
+
* @param projectId - Project ID.
|
|
863
|
+
* @public
|
|
864
|
+
* @requiredField projectId
|
|
865
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
|
|
866
|
+
* @applicableIdentity APP
|
|
867
|
+
* @applicableIdentity VISITOR
|
|
868
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.ListProjectItems
|
|
869
|
+
*/
|
|
870
|
+
declare function listProjectItems(projectId: string, options?: ListProjectItemsOptions): Promise<NonNullablePaths<ListProjectItemsResponse, {
|
|
871
|
+
[P in ProjectItemNonNullablePaths]: `items.${number}.${P}`;
|
|
872
|
+
}[ProjectItemNonNullablePaths]>>;
|
|
788
873
|
interface ListProjectItemsOptions {
|
|
789
874
|
/** Maximum number of items to return in the results. */
|
|
790
875
|
paging?: Paging;
|
|
791
876
|
}
|
|
877
|
+
/**
|
|
878
|
+
* Updates a project item.
|
|
879
|
+
* @param _id - Project item ID.
|
|
880
|
+
* @public
|
|
881
|
+
* @requiredField _id
|
|
882
|
+
* @requiredField item
|
|
883
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
|
|
884
|
+
* @applicableIdentity APP
|
|
885
|
+
* @returns The updated project item.
|
|
886
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.UpdateProjectItem
|
|
887
|
+
*/
|
|
888
|
+
declare function updateProjectItem(_id: string, item: UpdateProjectItem): Promise<NonNullablePaths<Item, ProjectItemNonNullablePaths>>;
|
|
792
889
|
interface UpdateProjectItem {
|
|
793
890
|
/** Information about the Wix Media image. */
|
|
794
891
|
image?: Image;
|
|
@@ -833,6 +930,18 @@ interface UpdateProjectItem {
|
|
|
833
930
|
/** Project item link. */
|
|
834
931
|
link?: Link;
|
|
835
932
|
}
|
|
933
|
+
/**
|
|
934
|
+
* Updates multiple project items.
|
|
935
|
+
* @public
|
|
936
|
+
* @requiredField options.items.item
|
|
937
|
+
* @requiredField options.items.item._id
|
|
938
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
|
|
939
|
+
* @applicableIdentity APP
|
|
940
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkUpdateProjectItems
|
|
941
|
+
*/
|
|
942
|
+
declare function bulkUpdateProjectItems(options?: NonNullablePaths<BulkUpdateProjectItemsOptions, `items.${number}.item` | `items.${number}.item._id`>): Promise<NonNullablePaths<BulkUpdateProjectItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
943
|
+
[P in ProjectItemNonNullablePaths]: `results.${number}.item.${P}`;
|
|
944
|
+
}[ProjectItemNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
836
945
|
interface BulkUpdateProjectItemsOptions {
|
|
837
946
|
/**
|
|
838
947
|
* items to be updated.
|
|
@@ -842,6 +951,26 @@ interface BulkUpdateProjectItemsOptions {
|
|
|
842
951
|
/** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
|
|
843
952
|
returnFullEntity?: boolean | null;
|
|
844
953
|
}
|
|
954
|
+
/**
|
|
955
|
+
* Deletes a project item.
|
|
956
|
+
* @param itemId - ID of the project item to delete.
|
|
957
|
+
* @public
|
|
958
|
+
* @requiredField itemId
|
|
959
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
|
|
960
|
+
* @applicableIdentity APP
|
|
961
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DeleteProjectItem
|
|
962
|
+
*/
|
|
963
|
+
declare function deleteProjectItem(itemId: string): Promise<NonNullablePaths<DeleteProjectItemResponse, `projectId` | `itemId`>>;
|
|
964
|
+
/**
|
|
965
|
+
* Deletes multiple project items.
|
|
966
|
+
* @public
|
|
967
|
+
* @requiredField options
|
|
968
|
+
* @requiredField options.itemIds
|
|
969
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
|
|
970
|
+
* @applicableIdentity APP
|
|
971
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkDeleteProjectItems
|
|
972
|
+
*/
|
|
973
|
+
declare function bulkDeleteProjectItems(options: NonNullablePaths<BulkDeleteProjectItemsOptions, `itemIds`>): 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`>>;
|
|
845
974
|
interface BulkDeleteProjectItemsOptions {
|
|
846
975
|
/**
|
|
847
976
|
* Project item IDs.
|
|
@@ -851,6 +980,24 @@ interface BulkDeleteProjectItemsOptions {
|
|
|
851
980
|
*/
|
|
852
981
|
itemIds: string[];
|
|
853
982
|
}
|
|
983
|
+
/**
|
|
984
|
+
* Duplicates project items from one project (the origin) to another project (the target).
|
|
985
|
+
*
|
|
986
|
+
* <blockquote class="important">
|
|
987
|
+
* <strong>Important:</strong>
|
|
988
|
+
*
|
|
989
|
+
* Both the origin and target projects must exist before calling this method.
|
|
990
|
+
* </blockquote>
|
|
991
|
+
* @param originProjectId - ID of the project containing the items to duplicate.
|
|
992
|
+
* @public
|
|
993
|
+
* @requiredField options
|
|
994
|
+
* @requiredField options.targetProjectId
|
|
995
|
+
* @requiredField originProjectId
|
|
996
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
997
|
+
* @applicableIdentity APP
|
|
998
|
+
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DuplicateProjectItems
|
|
999
|
+
*/
|
|
1000
|
+
declare function duplicateProjectItems(originProjectId: string, options: NonNullablePaths<DuplicateProjectItemsOptions, `targetProjectId`>): Promise<NonNullablePaths<DuplicateProjectItemsResponse, `projectId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
854
1001
|
interface DuplicateProjectItemsOptions {
|
|
855
1002
|
/**
|
|
856
1003
|
* ID of the project where the duplicated items will be added.
|
|
@@ -858,5 +1005,15 @@ interface DuplicateProjectItemsOptions {
|
|
|
858
1005
|
*/
|
|
859
1006
|
targetProjectId: string;
|
|
860
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Generate media token for project items
|
|
1010
|
+
* @param mediaIds - Media ids of requested project items
|
|
1011
|
+
* @public
|
|
1012
|
+
* @requiredField mediaIds
|
|
1013
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
1014
|
+
* @applicableIdentity APP
|
|
1015
|
+
* @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
|
|
1016
|
+
*/
|
|
1017
|
+
declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`>>;
|
|
861
1018
|
|
|
862
|
-
export { type
|
|
1019
|
+
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 };
|