@wix/auto_sdk_portfolio_projects 1.0.34 → 1.0.35

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.
@@ -1372,6 +1372,33 @@ interface EntityDeletedEvent {
1372
1372
  interface ActionEvent {
1373
1373
  body?: string;
1374
1374
  }
1375
+ interface GetAdjacentProjectInfoRequest {
1376
+ /**
1377
+ * Collection ID to search within
1378
+ * @format GUID
1379
+ */
1380
+ collectionId?: string;
1381
+ /** Current project's sort order for finding adjacent projects */
1382
+ currentSortOrder?: number;
1383
+ }
1384
+ interface GetAdjacentProjectInfoResponse {
1385
+ /** Previous project info (optional) */
1386
+ previousProject?: ProjectInfo;
1387
+ /** Next project info (optional) */
1388
+ nextProject?: ProjectInfo;
1389
+ }
1390
+ interface ProjectInfo {
1391
+ /**
1392
+ * Project ID
1393
+ * @format GUID
1394
+ */
1395
+ projectId?: string;
1396
+ /**
1397
+ * Project slug
1398
+ * @maxLength 256
1399
+ */
1400
+ slug?: string;
1401
+ }
1375
1402
  interface BaseEventMetadata {
1376
1403
  /**
1377
1404
  * App instance ID.
@@ -1693,6 +1720,12 @@ interface ProjectsQueryBuilder {
1693
1720
  skipTo: (cursor: string) => ProjectsQueryBuilder;
1694
1721
  find: () => Promise<ProjectsQueryResult>;
1695
1722
  }
1723
+ /**
1724
+ * @hidden
1725
+ * @fqn com.wixpress.portfolio.projects.ProjectsService.QueryProjects
1726
+ * @requiredField query
1727
+ */
1728
+ declare function typedQueryProjects(query: QueryV2, options?: QueryProjectsOptions): Promise<NonNullablePaths<QueryProjectsResponse, `projects` | `projects.${number}.coverImage.focalPoint.x` | `projects.${number}.coverImage.focalPoint.y` | `projects.${number}.seoData.settings.preventAutoRedirect` | `projects.${number}.watermark.position` | `projects.${number}.watermark.size` | `projects.${number}.watermark.opacity` | `projects.${number}.watermark.imageUrl` | `projects.${number}.watermark.enabled`, 6>>;
1696
1729
  /**
1697
1730
  * Deprecated - please use ProjectsInCollectionsService.UpdateProjectOrderInCollection instead
1698
1731
  * our Client still use it
@@ -1737,4 +1770,4 @@ interface QueryProjectsWithCollectionInfoOptions {
1737
1770
  includePageUrl?: boolean | null;
1738
1771
  }
1739
1772
 
1740
- export { type ActionEvent, type App, type ApplicationError, type Asset, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdateProjectsOptions, type BulkUpdateProjectsRequest, type BulkUpdateProjectsResponse, type BulkUpdateProjectsResult, type CreateNewPortfolioAppRequest, type CreateNewPortfolioAppResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteContext, type DeleteProjectRequest, type DeleteProjectResponse, DeleteStatus, type DeleteStatusWithLiterals, type DeletedProjectRestored, type DetailsLink, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type GetProjectOptions, type GetProjectPageDataRequest, type GetProjectPageDataResponse, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type Keyword, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MaskedProject, type MenuSettingUpdatedEvent, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type Page, type Paging, type PagingMetadataV2, type PicassoAssigned, type PicassoUnassigned, type Point, Position, type PositionWithLiterals, type Project, type ProjectCoverOneOf, type ProjectCreatedEnvelope, type ProjectDeletedEnvelope, type ProjectDetail, type ProjectDetailValueOneOf, type ProjectSlug, type ProjectSource, type ProjectUpdatedEnvelope, type ProjectsInCollections, type ProjectsQueryBuilder, type ProjectsQueryResult, type QueryProjectWithCollectionInfoRequest, type QueryProjectWithCollectionInfoResponse, type QueryProjectsOptions, type QueryProjectsRequest, type QueryProjectsResponse, type QueryProjectsWithCollectionInfoOptions, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, type RestoreProjectFromTrashBinRequest, type RestoreProjectFromTrashBinResponse, type SeoSchema, type ServiceProvisioned, type ServiceRemoved, type Settings, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type SyncProjectWithCollectionMappings, SyncStatus, type SyncStatusWithLiterals, type Tag, type URI, type UnsharpMasking, type UpdateProject, type UpdateProjectOrderInCollectionIdentifiers, type UpdateProjectOrderInCollectionRequest, type UpdateProjectOrderInCollectionResponse, type UpdateProjectRequest, type UpdateProjectResponse, type Video, type VideoResolution, type Watermark, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkUpdateProjects, createProject, deleteProject, getProject, listProjects, onProjectCreated, onProjectDeleted, onProjectUpdated, queryProjects, queryProjectsWithCollectionInfo, updateProject, updateProjectOrderInCollection };
1773
+ export { type ActionEvent, type App, type ApplicationError, type Asset, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdateProjectsOptions, type BulkUpdateProjectsRequest, type BulkUpdateProjectsResponse, type BulkUpdateProjectsResult, type CreateNewPortfolioAppRequest, type CreateNewPortfolioAppResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteContext, type DeleteProjectRequest, type DeleteProjectResponse, DeleteStatus, type DeleteStatusWithLiterals, type DeletedProjectRestored, type DetailsLink, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type GetAdjacentProjectInfoRequest, type GetAdjacentProjectInfoResponse, type GetProjectOptions, type GetProjectPageDataRequest, type GetProjectPageDataResponse, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type Keyword, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MaskedProject, type MenuSettingUpdatedEvent, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type Page, type Paging, type PagingMetadataV2, type PicassoAssigned, type PicassoUnassigned, type Point, Position, type PositionWithLiterals, type Project, type ProjectCoverOneOf, type ProjectCreatedEnvelope, type ProjectDeletedEnvelope, type ProjectDetail, type ProjectDetailValueOneOf, type ProjectInfo, type ProjectSlug, type ProjectSource, type ProjectUpdatedEnvelope, type ProjectsInCollections, type ProjectsQueryBuilder, type ProjectsQueryResult, type QueryProjectWithCollectionInfoRequest, type QueryProjectWithCollectionInfoResponse, type QueryProjectsOptions, type QueryProjectsRequest, type QueryProjectsResponse, type QueryProjectsWithCollectionInfoOptions, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, type RestoreProjectFromTrashBinRequest, type RestoreProjectFromTrashBinResponse, type SeoSchema, type ServiceProvisioned, type ServiceRemoved, type Settings, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type SyncProjectWithCollectionMappings, SyncStatus, type SyncStatusWithLiterals, type Tag, type URI, type UnsharpMasking, type UpdateProject, type UpdateProjectOrderInCollectionIdentifiers, type UpdateProjectOrderInCollectionRequest, type UpdateProjectOrderInCollectionResponse, type UpdateProjectRequest, type UpdateProjectResponse, type Video, type VideoResolution, type Watermark, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkUpdateProjects, createProject, deleteProject, getProject, listProjects, onProjectCreated, onProjectDeleted, onProjectUpdated, queryProjects, queryProjectsWithCollectionInfo, typedQueryProjects, updateProject, updateProjectOrderInCollection };
@@ -36,6 +36,7 @@ __export(index_typings_exports, {
36
36
  listProjects: () => listProjects2,
37
37
  queryProjects: () => queryProjects2,
38
38
  queryProjectsWithCollectionInfo: () => queryProjectsWithCollectionInfo2,
39
+ typedQueryProjects: () => typedQueryProjects,
39
40
  updateProject: () => updateProject2,
40
41
  updateProjectOrderInCollection: () => updateProjectOrderInCollection2
41
42
  });
@@ -1137,6 +1138,47 @@ function queryProjects2(options) {
1137
1138
  transformationPaths: {}
1138
1139
  });
1139
1140
  }
1141
+ async function typedQueryProjects(query, options) {
1142
+ const { httpClient, sideEffects } = arguments[2];
1143
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1144
+ query,
1145
+ ...options
1146
+ });
1147
+ const reqOpts = queryProjects(payload);
1148
+ sideEffects?.onSiteCall?.();
1149
+ try {
1150
+ const result = await httpClient.request(reqOpts);
1151
+ sideEffects?.onSuccess?.(result);
1152
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1153
+ (0, import_transform_paths2.transformPaths)(result.data, [
1154
+ {
1155
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1156
+ paths: [{ path: "projects.url" }]
1157
+ },
1158
+ {
1159
+ transformFn: import_image2.transformRESTImageToSDKImage,
1160
+ paths: [{ path: "projects.coverImage.imageInfo" }]
1161
+ },
1162
+ {
1163
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1164
+ paths: [{ path: "projects.coverVideo.videoInfo" }]
1165
+ }
1166
+ ])
1167
+ );
1168
+ } catch (err) {
1169
+ const transformedError = (0, import_transform_error.transformError)(
1170
+ err,
1171
+ {
1172
+ spreadPathsToArguments: {},
1173
+ explicitPathsToArguments: { query: "$[0]" },
1174
+ singleArgumentUnchanged: false
1175
+ },
1176
+ ["query", "options"]
1177
+ );
1178
+ sideEffects?.onError?.(err);
1179
+ throw transformedError;
1180
+ }
1181
+ }
1140
1182
  async function updateProjectOrderInCollection2(identifiers, sortOrder) {
1141
1183
  const { httpClient, sideEffects } = arguments[2];
1142
1184
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1258,6 +1300,7 @@ async function queryProjectsWithCollectionInfo2(query, options) {
1258
1300
  listProjects,
1259
1301
  queryProjects,
1260
1302
  queryProjectsWithCollectionInfo,
1303
+ typedQueryProjects,
1261
1304
  updateProject,
1262
1305
  updateProjectOrderInCollection
1263
1306
  });