export interface Item extends ItemMetadataOneOf {
/** Information about the Wix Media image. */
image?: Image;
/** Information about the Wix Media video. */
video?: Video;
/** Project ID. */
projectId?: string | null;
/**
* Project item ID.
* @readonly
*/
_id?: string | null;
/**
* Index that determines which position a project is displayed in the project.
*
* Default: [Epoch](https://www.epoch101.com/) timestamp.
*/
sortOrder?: number | null;
/** Project item title. */
title?: string | null;
/** Project item description. */
description?: string | null;
/**
* Project item data type.
* @readonly
*/
type?: Type;
/**
* Date and time the project item was created.
* @readonly
*/
_createdDate?: Date | null;
/**
* Date and time the project item was last updated.
* @readonly
*/
_updatedDate?: Date | null;
/** Project item link. */
link?: Link;
}
/** @oneof */
export interface ItemMetadataOneOf {
/** Information about the Wix Media image. */
image?: Image;
/** Information about the Wix Media video. */
video?: Video;
}
export declare enum Type {
/** Undefined item type. */
UNDEFINED = "UNDEFINED",
/** Image item type. */
IMAGE = "IMAGE",
/** Video item type. */
VIDEO = "VIDEO"
}
export interface Image {
/** Information about the Wix Media image. */
imageInfo?: string;
/** Focal point of the image. */
focalPoint?: Point;
}
export declare enum ImageType {
UNDEFINED = "UNDEFINED",
WIX_MEDIA = "WIX_MEDIA",
EXTERNAL = "EXTERNAL"
}
export interface Point {
/** X-coordinate of the focal point. */
x?: number;
/** Y-coordinate of the focal point. */
y?: number;
}
export interface UnsharpMasking {
/**
* Unsharp masking amount. Controls the sharpening strength.
*
* Min: `0`
* Max: `5`
*/
amount?: number | null;
/** Unsharp masking radius in pixels. Controls the sharpening width. */
radius?: number | null;
/**
* Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply.
*
* Min: `0`
* Max: `1`
*/
threshold?: number | null;
}
export interface Video {
/** Information about the Wix Media video. */
videoInfo?: string;
/** Manually defined Video duration in milliseconds. */
durationInMillis?: number | null;
}
export interface VideoResolution {
/** Video URL. Required. */
url?: string;
/** Video height. Required. */
height?: number;
/** Video width. Required. */
width?: number;
/** Video format for example, mp4, hls. Required. */
format?: string;
/** Video quality for example 480p, 720p. */
quality?: string | null;
/** Video filename. */
filename?: string | null;
}
export interface Tags {
/** List of tags assigned to the media item. */
values?: string[];
}
export interface Link {
/** Display text of the link. */
text?: string | null;
/** Target URL of the link. */
url?: string | null;
/**
* Whether the link opens in a new tab or window. One of:
* * `'_blank'`: The link opens in a new tab or window.
* * `'_self'`: The link opens in the same tab or window.
*/
target?: string | null;
}
export interface GenerateTokenForProjectItemsRequest {
/** Media ids of requested project items */
mediaIds?: string[];
}
export interface GenerateTokenForProjectItemsResponse {
/** Generated media tokens for project items */
mediaTokens?: ProjectItemMediaToken[];
}
export interface ProjectItemMediaToken {
/** Media id of project item */
mediaId?: string;
/** Generated media token for project item */
mediaToken?: string;
}
export interface DomainEvent extends DomainEventBodyOneOf {
createdEvent?: EntityCreatedEvent;
updatedEvent?: EntityUpdatedEvent;
deletedEvent?: EntityDeletedEvent;
actionEvent?: ActionEvent;
/**
* Unique event ID.
* Allows clients to ignore duplicate webhooks.
*/
_id?: string;
/**
* Assumes actions are also always typed to an entity_type
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
*/
entityFqdn?: string;
/**
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
* This is although the created/updated/deleted notion is duplication of the oneof types
* Example: created/updated/deleted/started/completed/email_opened
*/
slug?: string;
/** ID of the entity associated with the event. */
entityId?: string;
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
eventTime?: Date | null;
/**
* Whether the event was triggered as a result of a privacy regulation application
* (for example, GDPR).
*/
triggeredByAnonymizeRequest?: boolean | null;
/** If present, indicates the action that triggered the event. */
originatedFrom?: string | null;
/**
* A sequence number defining the order of updates to the underlying entity.
* For example, given that some entity was updated at 16:00 and than again at 16:01,
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
* To do so, you will need to persist this number on your end, and compare the sequence number from the
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
*/
entityEventSequence?: string | null;
}
/** @oneof */
export interface DomainEventBodyOneOf {
createdEvent?: EntityCreatedEvent;
updatedEvent?: EntityUpdatedEvent;
deletedEvent?: EntityDeletedEvent;
actionEvent?: ActionEvent;
}
export interface EntityCreatedEvent {
entity?: string;
}
export interface RestoreInfo {
deletedDate?: Date | null;
}
export interface EntityUpdatedEvent {
/**
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
*/
currentEntity?: string;
}
export interface EntityDeletedEvent {
/** Entity that was deleted */
deletedEntity?: string | null;
}
export interface ActionEvent {
body?: string;
}
export interface MessageEnvelope {
/** App instance ID. */
instanceId?: string | null;
/** Event type. */
eventType?: string;
/** The identification type and identity data. */
identity?: IdentificationData;
/** Stringify payload. */
data?: string;
}
export interface IdentificationData extends IdentificationDataIdOneOf {
/** ID of a site visitor that has not logged in to the site. */
anonymousVisitorId?: string;
/** ID of a site visitor that has logged in to the site. */
memberId?: string;
/** ID of a Wix user (site owner, contributor, etc.). */
wixUserId?: string;
/** ID of an app. */
appId?: string;
/** @readonly */
identityType?: WebhookIdentityType;
}
/** @oneof */
export interface IdentificationDataIdOneOf {
/** ID of a site visitor that has not logged in to the site. */
anonymousVisitorId?: string;
/** ID of a site visitor that has logged in to the site. */
memberId?: string;
/** ID of a Wix user (site owner, contributor, etc.). */
wixUserId?: string;
/** ID of an app. */
appId?: string;
}
export declare enum WebhookIdentityType {
UNKNOWN = "UNKNOWN",
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
MEMBER = "MEMBER",
WIX_USER = "WIX_USER",
APP = "APP"
}
export interface InvalidateCache extends InvalidateCacheGetByOneOf {
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
metaSiteId?: string;
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
siteId?: string;
/** Invalidate by App */
app?: App;
/** Invalidate by page id */
page?: Page;
/** Invalidate by URI path */
uri?: URI;
/** Invalidate by file (for media files such as PDFs) */
file?: File;
/** tell us why you're invalidating the cache. You don't need to add your app name */
reason?: string | null;
/** Is local DS */
localDc?: boolean;
hardPurge?: boolean;
}
/** @oneof */
export interface InvalidateCacheGetByOneOf {
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
metaSiteId?: string;
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
siteId?: string;
/** Invalidate by App */
app?: App;
/** Invalidate by page id */
page?: Page;
/** Invalidate by URI path */
uri?: URI;
/** Invalidate by file (for media files such as PDFs) */
file?: File;
}
export interface App {
/** The AppDefId */
appDefId?: string;
/** The instance Id */
instanceId?: string;
}
export interface Page {
/** the msid the page is on */
metaSiteId?: string;
/** Invalidate by Page ID */
pageId?: string;
}
export interface URI {
/** the msid the URI is on */
metaSiteId?: string;
/** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
uriPath?: string;
}
export interface File {
/** the msid the file is related to */
metaSiteId?: string;
/** Invalidate by filename (for media files such as PDFs) */
fileName?: string;
}
export interface CreateProjectItemRequest {
/** Project item to create. */
item: Item;
}
export interface CreateProjectItemResponse {
/** Newly created project item. */
item?: Item;
}
export interface BulkCreateProjectItemsRequest {
/** Project items to create. */
items: Item[];
/** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
returnFullEntity?: boolean | null;
}
export interface BulkCreateProjectItemsResponse {
/** Project items created by bulk action. */
results?: BulkCreateProjectItemResult[];
/** Bulk action metadata. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkCreateProjectItemResult {
/** Information about successful action or error for failure. */
itemMetadata?: ItemMetadata;
/** Newly created project item. */
item?: Item;
}
export interface ItemMetadata {
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
_id?: string | null;
/** Index of the item within the request array. Allows for correlation between request and response items. */
originalIndex?: number;
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
success?: boolean;
/** Details about the error in case of failure. */
error?: ApplicationError;
}
export interface ApplicationError {
/** Error code. */
code?: string;
/** Description of the error. */
description?: string;
/** Data related to the error. */
data?: Record | null;
}
export interface BulkActionMetadata {
/** Number of items that were successfully processed. */
totalSuccesses?: number;
/** Number of items that couldn't be processed. */
totalFailures?: number;
/** Number of failures without details because detailed failure threshold was exceeded. */
undetailedFailures?: number;
}
export interface GetProjectItemRequest {
/** Project item ID. */
itemId: string;
}
export interface GetProjectItemResponse {
/** Project item. */
item?: Item;
}
export interface ListProjectItemsRequest {
/** Project ID. */
projectId: string;
/** Maximum number of items to return in the results. */
paging?: Paging;
}
export interface Paging {
/** Number of items to load. */
limit?: number | null;
/** Number of items to skip in the current sort order. */
offset?: number | null;
}
export interface ListProjectItemsResponse {
/** Project items. */
items?: Item[];
/**
* @deprecated
* @targetRemovalDate 2025-05-25
*/
pagingMetadataV2?: PagingMetadataV2;
/** Paging metadata. */
metadata?: PagingMetadataV2;
}
export interface PagingMetadataV2 {
/** Number of items returned in the response. */
count?: number | null;
/** Offset that was requested. */
offset?: number | null;
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
total?: number | null;
/** Flag that indicates the server failed to calculate the `total` field. */
tooManyToCount?: boolean | null;
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
cursors?: Cursors;
}
export interface Cursors {
/** Cursor string pointing to the next page in the list of results. */
next?: string | null;
/** Cursor pointing to the previous page in the list of results. */
prev?: string | null;
}
export interface QueryProjectItemsRequest {
/** WQL expression */
query?: QueryV2;
}
export interface QueryV2 extends QueryV2PagingMethodOneOf {
/** Paging options to limit and skip the number of items. */
paging?: Paging;
/** 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`. */
cursorPaging?: CursorPaging;
/**
* Filter object.
*
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
*/
filter?: Record | null;
/**
* Sort object.
*
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
*/
sort?: Sorting[];
/** 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. */
fields?: string[];
/** 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. */
fieldsets?: string[];
}
/** @oneof */
export interface QueryV2PagingMethodOneOf {
/** Paging options to limit and skip the number of items. */
paging?: Paging;
/** 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`. */
cursorPaging?: CursorPaging;
}
export interface Sorting {
/** Name of the field to sort by. */
fieldName?: string;
/** Sort order. */
order?: SortOrder;
}
export declare enum SortOrder {
ASC = "ASC",
DESC = "DESC"
}
export interface CursorPaging {
/** Maximum number of items to return in the results. */
limit?: number | null;
/**
* Pointer to the next or previous page in the list of results.
*
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
* Not relevant for the first request.
*/
cursor?: string | null;
}
export interface QueryProjectItemsResponse {
/** Project items. */
items?: Item[];
/** Paging metadata. */
metadata?: PagingMetadataV2;
}
export interface UpdateProjectItemRequest {
/** The project item to update. */
item: Item;
}
export interface UpdateProjectItemResponse {
/** The updated project item. */
item?: Item;
}
export interface BulkUpdateProjectItemsRequest {
/** items to be updated. */
items?: MaskedItem[];
/** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
returnFullEntity?: boolean | null;
}
export interface MaskedItem {
/** Item to be updated. */
item?: Item;
}
export interface BulkUpdateProjectItemsResponse {
/** Project items updated by bulk action. */
results?: BulkUpdateProjectItemResult[];
/** Bulk action metadata. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkUpdateProjectItemResult {
/** Information about successful action or error for failure. */
itemMetadata?: ItemMetadata;
/** Updated project item. */
item?: Item;
}
export interface DeleteProjectItemRequest {
/** ID of the project item to delete. */
itemId: string;
}
export interface DeleteProjectItemResponse {
/** Project ID. */
projectId?: string;
/** ID of the deleted project item. */
itemId?: string;
}
export interface BulkDeleteProjectItemsRequest {
/** Project item IDs. */
itemIds: string[];
}
export interface BulkDeleteProjectItemsResponse {
/** Project items deleted by bulk action. */
results?: BulkDeleteProjectItemResult[];
/** Bulk action metadata. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkDeleteProjectItemResult {
/** Information about successful action or error for failure. */
itemMetadata?: ItemMetadata;
/** Project item ID. */
itemId?: string;
}
export interface CreateProjectGalleryRequest {
/** Id of Project to create */
projectId?: string;
}
export interface CreateProjectGalleryResponse {
/** Id of created Project */
projectId?: string;
/** Id of created gallery */
galleryId?: string;
}
export interface Empty {
}
export interface DeletedProjectRestored {
/** the id of the project that was restored */
projectId?: string;
/** timestamp for when the project was originally deleted. */
deletionTimestamp?: Date | null;
}
export interface DuplicateProjectItemsRequest {
/** ID of the project containing the items to duplicate. */
originProjectId: string;
/** ID of the project where the duplicated items will be added. */
targetProjectId: string;
}
export interface DuplicateProjectItemsResponse {
/** Project ID where the duplicated items have been added. */
projectId?: string;
/** Bulk action metadata. */
bulkActionMetadata?: BulkActionMetadata;
}
interface PointNonNullableFields {
x: number;
y: number;
}
interface ImageNonNullableFields {
type: ImageType;
imageInfo: string;
focalPoint?: PointNonNullableFields;
}
interface VideoNonNullableFields {
videoInfo: string;
}
interface TagsNonNullableFields {
values: string[];
}
export interface ItemNonNullableFields {
image?: ImageNonNullableFields;
video?: VideoNonNullableFields;
type: Type;
tags?: TagsNonNullableFields;
}
export interface CreateProjectItemResponseNonNullableFields {
projectId: string;
item?: ItemNonNullableFields;
}
interface ApplicationErrorNonNullableFields {
code: string;
description: string;
}
interface ItemMetadataNonNullableFields {
originalIndex: number;
success: boolean;
error?: ApplicationErrorNonNullableFields;
}
interface BulkCreateProjectItemResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
item?: ItemNonNullableFields;
}
interface BulkActionMetadataNonNullableFields {
totalSuccesses: number;
totalFailures: number;
undetailedFailures: number;
}
export interface BulkCreateProjectItemsResponseNonNullableFields {
projectId: string;
results: BulkCreateProjectItemResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface GetProjectItemResponseNonNullableFields {
projectId: string;
item?: ItemNonNullableFields;
}
export interface ListProjectItemsResponseNonNullableFields {
projectId: string;
items: ItemNonNullableFields[];
}
export interface UpdateProjectItemResponseNonNullableFields {
projectId: string;
item?: ItemNonNullableFields;
}
interface BulkUpdateProjectItemResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
item?: ItemNonNullableFields;
}
export interface BulkUpdateProjectItemsResponseNonNullableFields {
projectId: string;
results: BulkUpdateProjectItemResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface DeleteProjectItemResponseNonNullableFields {
projectId: string;
itemId: string;
}
interface BulkDeleteProjectItemResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
itemId: string;
}
export interface BulkDeleteProjectItemsResponseNonNullableFields {
projectId: string;
results: BulkDeleteProjectItemResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface DuplicateProjectItemsResponseNonNullableFields {
projectId: string;
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface BaseEventMetadata {
/** App instance ID. */
instanceId?: string | null;
/** Event type. */
eventType?: string;
/** The identification type and identity data. */
identity?: IdentificationData;
}
export interface EventMetadata extends BaseEventMetadata {
/**
* Unique event ID.
* Allows clients to ignore duplicate webhooks.
*/
_id?: string;
/**
* Assumes actions are also always typed to an entity_type
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
*/
entityFqdn?: string;
/**
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
* This is although the created/updated/deleted notion is duplication of the oneof types
* Example: created/updated/deleted/started/completed/email_opened
*/
slug?: string;
/** ID of the entity associated with the event. */
entityId?: string;
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
eventTime?: Date | null;
/**
* Whether the event was triggered as a result of a privacy regulation application
* (for example, GDPR).
*/
triggeredByAnonymizeRequest?: boolean | null;
/** If present, indicates the action that triggered the event. */
originatedFrom?: string | null;
/**
* A sequence number defining the order of updates to the underlying entity.
* For example, given that some entity was updated at 16:00 and than again at 16:01,
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
* To do so, you will need to persist this number on your end, and compare the sequence number from the
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
*/
entityEventSequence?: string | null;
}
export interface ProjectItemCreatedEnvelope {
entity: Item;
metadata: EventMetadata;
}
/**
* Triggered when a project item is created.
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
* @webhook
* @eventType wix.portfolio.project_items.v1.project_item_created
* @documentationMaturity preview
*/
export declare function onProjectItemCreated(handler: (event: ProjectItemCreatedEnvelope) => void | Promise): void;
export interface ProjectItemDeletedEnvelope {
metadata: EventMetadata;
}
/**
* Triggered when a project item is deleted.
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
* @webhook
* @eventType wix.portfolio.project_items.v1.project_item_deleted
* @documentationMaturity preview
*/
export declare function onProjectItemDeleted(handler: (event: ProjectItemDeletedEnvelope) => void | Promise): void;
export interface ProjectItemUpdatedEnvelope {
entity: Item;
metadata: EventMetadata;
}
/**
* Triggered when a project item is updated.
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
* @webhook
* @eventType wix.portfolio.project_items.v1.project_item_updated
* @documentationMaturity preview
*/
export declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise): void;
/**
* Creates a project item.
* @param item - Project item to create.
* @public
* @documentationMaturity preview
* @requiredField item
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @returns Newly created project item.
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.CreateProjectItem
*/
export declare function createProjectItem(item: Item): Promise- ;
/**
* Creates multiple project items.
* @public
* @documentationMaturity preview
* @requiredField options.items
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkCreateProjectItems
*/
export declare function bulkCreateProjectItems(options?: BulkCreateProjectItemsOptions): Promise;
export interface BulkCreateProjectItemsOptions {
/** Project items to create. */
items: Item[];
/** Whether to include the created project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
returnFullEntity?: boolean | null;
}
/**
* Retrieves a project item.
* @param itemId - Project item ID.
* @public
* @documentationMaturity preview
* @requiredField itemId
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @returns Project item.
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.GetProjectItem
*/
export declare function getProjectItem(itemId: string): Promise
- ;
/**
* Retrieves a list of all project items in the specified project.
* @param projectId - Project ID.
* @public
* @documentationMaturity preview
* @requiredField projectId
* @permissionId PORTFOLIO.PROJECT_ITEM_READ
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.ListProjectItems
*/
export declare function listProjectItems(projectId: string, options?: ListProjectItemsOptions): Promise;
export interface ListProjectItemsOptions {
/** Maximum number of items to return in the results. */
paging?: Paging;
}
/**
* Updates a project item.
* @param _id - Project item ID.
* @public
* @documentationMaturity preview
* @requiredField _id
* @requiredField item
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @returns The updated project item.
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.UpdateProjectItem
*/
export declare function updateProjectItem(_id: string | null, item: UpdateProjectItem): Promise
- ;
export interface UpdateProjectItem {
/** Information about the Wix Media image. */
image?: Image;
/** Information about the Wix Media video. */
video?: Video;
/** Project ID. */
projectId?: string | null;
/**
* Project item ID.
* @readonly
*/
_id?: string | null;
/**
* Index that determines which position a project is displayed in the project.
*
* Default: [Epoch](https://www.epoch101.com/) timestamp.
*/
sortOrder?: number | null;
/** Project item title. */
title?: string | null;
/** Project item description. */
description?: string | null;
/**
* Project item data type.
* @readonly
*/
type?: Type;
/**
* Date and time the project item was created.
* @readonly
*/
_createdDate?: Date | null;
/**
* Date and time the project item was last updated.
* @readonly
*/
_updatedDate?: Date | null;
/** Project item link. */
link?: Link;
}
/**
* Updates multiple project items.
* @public
* @documentationMaturity preview
* @requiredField options.items.item
* @requiredField options.items.item._id
* @permissionId PORTFOLIO.PROJECT_ITEM_UPDATE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkUpdateProjectItems
*/
export declare function bulkUpdateProjectItems(options?: BulkUpdateProjectItemsOptions): Promise;
export interface BulkUpdateProjectItemsOptions {
/** items to be updated. */
items?: MaskedItem[];
/** Whether to include the updated project items in the response. Set to `true` to receive the project items in the response. Default: `false` */
returnFullEntity?: boolean | null;
}
/**
* Deletes a project item.
* @param itemId - ID of the project item to delete.
* @public
* @documentationMaturity preview
* @requiredField itemId
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DeleteProjectItem
*/
export declare function deleteProjectItem(itemId: string): Promise;
/**
* Deletes multiple project items.
* @public
* @documentationMaturity preview
* @requiredField options
* @requiredField options.itemIds
* @permissionId PORTFOLIO.PROJECT_ITEM_DELETE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.BulkDeleteProjectItems
*/
export declare function bulkDeleteProjectItems(options: BulkDeleteProjectItemsOptions): Promise;
export interface BulkDeleteProjectItemsOptions {
/** Project item IDs. */
itemIds: string[];
}
/**
* Duplicates project items from one project (the origin) to another project (the target).
*
*
* Important:
*
* Both the origin and target projects must exist before calling this method.
*
* @param originProjectId - ID of the project containing the items to duplicate.
* @public
* @documentationMaturity preview
* @requiredField options
* @requiredField options.targetProjectId
* @requiredField originProjectId
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @applicableIdentity APP
* @fqn com.wixpress.portfolio.projectitems.ProjectItemsService.DuplicateProjectItems
*/
export declare function duplicateProjectItems(originProjectId: string, options: DuplicateProjectItemsOptions): Promise;
export interface DuplicateProjectItemsOptions {
/** ID of the project where the duplicated items will be added. */
targetProjectId: string;
}
export {};