@wix/portfolio 1.0.62 → 1.0.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/portfolio",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -21,7 +21,7 @@
21
21
  "@wix/portfolio_collections": "1.0.13",
22
22
  "@wix/portfolio_project-in-collections": "1.0.13",
23
23
  "@wix/portfolio_project-items": "1.0.15",
24
- "@wix/portfolio_projects": "1.0.14"
24
+ "@wix/portfolio_projects": "1.0.15"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
@@ -46,5 +46,5 @@
46
46
  "fqdn": ""
47
47
  }
48
48
  },
49
- "falconPackageHash": "9b194ca6f1c7573e5442e09f049861c0d6ba74c183b0baf421f9e8ac"
49
+ "falconPackageHash": "e3ee25f64b51bcdfafe235b31550932a9a4b16ff09263051dfbf815d"
50
50
  }
@@ -616,14 +616,14 @@ interface BulkCreateProjectItemsResponse {
616
616
  /** Array with all created items results. */
617
617
  results?: BulkCreateProjectItemResult[];
618
618
  /** Holds metadata of the entire bulk create operation */
619
- bulkActionMetadata?: BulkActionMetadata;
619
+ bulkActionMetadata?: BulkActionMetadata$1;
620
620
  }
621
621
  interface BulkCreateProjectItemResult {
622
622
  /** Holds information about an item in bulk create - id, index in original request array, action successful, error (if failed) */
623
- itemMetadata?: ItemMetadata;
623
+ itemMetadata?: ItemMetadata$1;
624
624
  item?: Item;
625
625
  }
626
- interface ItemMetadata {
626
+ interface ItemMetadata$1 {
627
627
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
628
628
  _id?: string | null;
629
629
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -631,9 +631,9 @@ interface ItemMetadata {
631
631
  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
632
632
  success?: boolean;
633
633
  /** Details about the error in case of failure. */
634
- error?: ApplicationError;
634
+ error?: ApplicationError$1;
635
635
  }
636
- interface ApplicationError {
636
+ interface ApplicationError$1 {
637
637
  /** Error code. */
638
638
  code?: string;
639
639
  /** Description of the error. */
@@ -641,7 +641,7 @@ interface ApplicationError {
641
641
  /** Data related to the error. */
642
642
  data?: Record<string, any> | null;
643
643
  }
644
- interface BulkActionMetadata {
644
+ interface BulkActionMetadata$1 {
645
645
  /** Number of items that were successfully processed. */
646
646
  totalSuccesses?: number;
647
647
  /** Number of items that couldn't be processed. */
@@ -649,7 +649,7 @@ interface BulkActionMetadata {
649
649
  /** Number of failures without details because detailed failure threshold was exceeded. */
650
650
  undetailedFailures?: number;
651
651
  }
652
- interface Paging {
652
+ interface Paging$1 {
653
653
  /** Number of items to load. */
654
654
  limit?: number | null;
655
655
  /** Number of items to skip in the current sort order. */
@@ -691,11 +691,11 @@ interface BulkUpdateProjectItemsResponse {
691
691
  /** Array with all updated items results. */
692
692
  results?: BulkUpdateProjectItemResult[];
693
693
  /** Holds metadata of the entire bulk update operation */
694
- bulkActionMetadata?: BulkActionMetadata;
694
+ bulkActionMetadata?: BulkActionMetadata$1;
695
695
  }
696
696
  interface BulkUpdateProjectItemResult {
697
697
  /** Holds information about an item in bulk update - id, index in original request array, action successful, error (if failed). */
698
- itemMetadata?: ItemMetadata;
698
+ itemMetadata?: ItemMetadata$1;
699
699
  item?: Item;
700
700
  }
701
701
  interface DeleteProjectItemResponse {
@@ -708,11 +708,11 @@ interface BulkDeleteProjectItemsResponse {
708
708
  /** Array with all deleted items results */
709
709
  results?: BulkDeleteProjectItemResult[];
710
710
  /** Holds metadata of the entire bulk delete operation */
711
- bulkActionMetadata?: BulkActionMetadata;
711
+ bulkActionMetadata?: BulkActionMetadata$1;
712
712
  }
713
713
  interface BulkDeleteProjectItemResult {
714
714
  /** Holds information about an item in bulk delete - id, index in original request array, action successful, error (if failed) */
715
- itemMetadata?: ItemMetadata;
715
+ itemMetadata?: ItemMetadata$1;
716
716
  /** Id of the ProjectItem */
717
717
  itemId?: string;
718
718
  }
@@ -907,7 +907,7 @@ interface BulkCreateProjectItemsOptions {
907
907
  }
908
908
  interface ListProjectItemsOptions {
909
909
  /** limit and offset for ProjectItems - maximum limit is 200 per request, default is 50 */
910
- paging?: Paging;
910
+ paging?: Paging$1;
911
911
  }
912
912
  interface UpdateProjectItem {
913
913
  /** Information about the image. */
@@ -1249,10 +1249,115 @@ interface Cursors$1 {
1249
1249
  /** Cursor pointing to the previous page in the list of results. */
1250
1250
  prev?: string | null;
1251
1251
  }
1252
+ interface MaskedProject {
1253
+ project?: Project$1;
1254
+ }
1255
+ interface BulkUpdateProjectsResponse {
1256
+ /** Array with all updated items results. */
1257
+ results?: BulkUpdateProjectsResult[];
1258
+ /** Holds metadata of the entire bulk update operation */
1259
+ bulkActionMetadata?: BulkActionMetadata;
1260
+ }
1261
+ interface BulkUpdateProjectsResult {
1262
+ /** Holds information about an item in bulk update - id, index in original request array, action successful, error (if failed). */
1263
+ itemMetadata?: ItemMetadata;
1264
+ project?: Project$1;
1265
+ }
1266
+ interface ItemMetadata {
1267
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1268
+ _id?: string | null;
1269
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1270
+ originalIndex?: number;
1271
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1272
+ success?: boolean;
1273
+ /** Details about the error in case of failure. */
1274
+ error?: ApplicationError;
1275
+ }
1276
+ interface ApplicationError {
1277
+ /** Error code. */
1278
+ code?: string;
1279
+ /** Description of the error. */
1280
+ description?: string;
1281
+ /** Data related to the error. */
1282
+ data?: Record<string, any> | null;
1283
+ }
1284
+ interface BulkActionMetadata {
1285
+ /** Number of items that were successfully processed. */
1286
+ totalSuccesses?: number;
1287
+ /** Number of items that couldn't be processed. */
1288
+ totalFailures?: number;
1289
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1290
+ undetailedFailures?: number;
1291
+ }
1252
1292
  interface DeleteProjectResponse {
1253
1293
  /** Id of the deleted Project */
1254
1294
  projectId?: string;
1255
1295
  }
1296
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
1297
+ /** Paging options to limit and skip the number of items. */
1298
+ paging?: Paging;
1299
+ /** 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`. */
1300
+ cursorPaging?: CursorPaging;
1301
+ /**
1302
+ * Filter object in the following format:
1303
+ * `"filter" : {
1304
+ * "fieldName1": "value1",
1305
+ * "fieldName2":{"$operator":"value2"}
1306
+ * }`
1307
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1308
+ */
1309
+ filter?: Record<string, any> | null;
1310
+ /**
1311
+ * Sort object in the following format:
1312
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1313
+ */
1314
+ sort?: Sorting[];
1315
+ /** 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. */
1316
+ fields?: string[];
1317
+ /** 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. */
1318
+ fieldsets?: string[];
1319
+ }
1320
+ /** @oneof */
1321
+ interface QueryV2PagingMethodOneOf {
1322
+ /** Paging options to limit and skip the number of items. */
1323
+ paging?: Paging;
1324
+ /** 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`. */
1325
+ cursorPaging?: CursorPaging;
1326
+ }
1327
+ interface Sorting {
1328
+ /** Name of the field to sort by. */
1329
+ fieldName?: string;
1330
+ /** Sort order. */
1331
+ order?: SortOrder;
1332
+ }
1333
+ declare enum SortOrder {
1334
+ ASC = "ASC",
1335
+ DESC = "DESC"
1336
+ }
1337
+ interface Paging {
1338
+ /** Number of items to load. */
1339
+ limit?: number | null;
1340
+ /** Number of items to skip in the current sort order. */
1341
+ offset?: number | null;
1342
+ }
1343
+ interface UpdateProjectOrderInCollectionResponse$1 {
1344
+ /** project with new sort order set */
1345
+ projectInCollection?: ProjectInCollection$1;
1346
+ }
1347
+ interface ProjectInCollection$1 {
1348
+ /** Collection ID */
1349
+ collectionId?: string;
1350
+ /** Project */
1351
+ project?: Project$1;
1352
+ /** The sort order of the project in the given Collection */
1353
+ sortOrder?: number | null;
1354
+ }
1355
+ interface QueryProjectWithCollectionInfoResponse {
1356
+ /** The retrieved Projects in Collection */
1357
+ projects?: ProjectInCollection$1[];
1358
+ /** Paging metadata */
1359
+ metadata?: PagingMetadataV2;
1360
+ }
1256
1361
  interface ListProjectsResponseNonNullableFields {
1257
1362
  projects: {
1258
1363
  coverImage?: {
@@ -1288,9 +1393,135 @@ interface ListProjectsResponseNonNullableFields {
1288
1393
  };
1289
1394
  }[];
1290
1395
  }
1396
+ interface BulkUpdateProjectsResponseNonNullableFields {
1397
+ results: {
1398
+ itemMetadata?: {
1399
+ originalIndex: number;
1400
+ success: boolean;
1401
+ error?: {
1402
+ code: string;
1403
+ description: string;
1404
+ };
1405
+ };
1406
+ project?: {
1407
+ coverImage?: {
1408
+ imageInfo: string;
1409
+ focalPoint?: {
1410
+ x: number;
1411
+ y: number;
1412
+ };
1413
+ };
1414
+ coverVideo?: {
1415
+ videoInfo: string;
1416
+ };
1417
+ collectionIds: string[];
1418
+ details: {
1419
+ text: string;
1420
+ label: string;
1421
+ }[];
1422
+ url: string;
1423
+ seoData?: {
1424
+ tags: {
1425
+ type: string;
1426
+ children: string;
1427
+ custom: boolean;
1428
+ disabled: boolean;
1429
+ }[];
1430
+ settings?: {
1431
+ preventAutoRedirect: boolean;
1432
+ keywords: {
1433
+ term: string;
1434
+ isMain: boolean;
1435
+ }[];
1436
+ };
1437
+ };
1438
+ };
1439
+ }[];
1440
+ bulkActionMetadata?: {
1441
+ totalSuccesses: number;
1442
+ totalFailures: number;
1443
+ undetailedFailures: number;
1444
+ };
1445
+ }
1291
1446
  interface DeleteProjectResponseNonNullableFields {
1292
1447
  projectId: string;
1293
1448
  }
1449
+ interface UpdateProjectOrderInCollectionResponseNonNullableFields$1 {
1450
+ projectInCollection?: {
1451
+ collectionId: string;
1452
+ project?: {
1453
+ coverImage?: {
1454
+ imageInfo: string;
1455
+ focalPoint?: {
1456
+ x: number;
1457
+ y: number;
1458
+ };
1459
+ };
1460
+ coverVideo?: {
1461
+ videoInfo: string;
1462
+ };
1463
+ collectionIds: string[];
1464
+ details: {
1465
+ text: string;
1466
+ label: string;
1467
+ }[];
1468
+ url: string;
1469
+ seoData?: {
1470
+ tags: {
1471
+ type: string;
1472
+ children: string;
1473
+ custom: boolean;
1474
+ disabled: boolean;
1475
+ }[];
1476
+ settings?: {
1477
+ preventAutoRedirect: boolean;
1478
+ keywords: {
1479
+ term: string;
1480
+ isMain: boolean;
1481
+ }[];
1482
+ };
1483
+ };
1484
+ };
1485
+ };
1486
+ }
1487
+ interface QueryProjectWithCollectionInfoResponseNonNullableFields {
1488
+ projects: {
1489
+ collectionId: string;
1490
+ project?: {
1491
+ coverImage?: {
1492
+ imageInfo: string;
1493
+ focalPoint?: {
1494
+ x: number;
1495
+ y: number;
1496
+ };
1497
+ };
1498
+ coverVideo?: {
1499
+ videoInfo: string;
1500
+ };
1501
+ collectionIds: string[];
1502
+ details: {
1503
+ text: string;
1504
+ label: string;
1505
+ }[];
1506
+ url: string;
1507
+ seoData?: {
1508
+ tags: {
1509
+ type: string;
1510
+ children: string;
1511
+ custom: boolean;
1512
+ disabled: boolean;
1513
+ }[];
1514
+ settings?: {
1515
+ preventAutoRedirect: boolean;
1516
+ keywords: {
1517
+ term: string;
1518
+ isMain: boolean;
1519
+ }[];
1520
+ };
1521
+ };
1522
+ };
1523
+ }[];
1524
+ }
1294
1525
  interface BaseEventMetadata$1 {
1295
1526
  /** App instance ID. */
1296
1527
  instanceId?: string | null;
@@ -1402,6 +1633,11 @@ interface UpdateProject {
1402
1633
  */
1403
1634
  syncedProject?: boolean | null;
1404
1635
  }
1636
+ interface BulkUpdateProjectsOptions {
1637
+ /** projects to be updated. */
1638
+ projects?: MaskedProject[];
1639
+ returnFullEntity?: boolean | null;
1640
+ }
1405
1641
  interface QueryProjectsOptions {
1406
1642
  includePageUrl?: boolean | null | undefined;
1407
1643
  }
@@ -1487,6 +1723,15 @@ interface ProjectsQueryBuilder {
1487
1723
  /** @documentationMaturity preview */
1488
1724
  find: () => Promise<ProjectsQueryResult>;
1489
1725
  }
1726
+ interface UpdateProjectOrderInCollectionIdentifiers$1 {
1727
+ /** Id of the Project to update its order */
1728
+ projectId: string;
1729
+ /** Id of the collection in which the project will be re-ordered */
1730
+ collectionId: string;
1731
+ }
1732
+ interface QueryProjectsWithCollectionInfoOptions {
1733
+ includePageUrl?: boolean | null;
1734
+ }
1490
1735
 
1491
1736
  declare function createProject$1(httpClient: HttpClient): (project: Project$1) => Promise<Project$1 & {
1492
1737
  coverImage?: {
@@ -1588,8 +1833,11 @@ declare function updateProject$1(httpClient: HttpClient): (_id: string | null, p
1588
1833
  } | undefined;
1589
1834
  } | undefined;
1590
1835
  }>;
1836
+ declare function bulkUpdateProjects$1(httpClient: HttpClient): (options?: BulkUpdateProjectsOptions) => Promise<BulkUpdateProjectsResponse & BulkUpdateProjectsResponseNonNullableFields>;
1591
1837
  declare function deleteProject$1(httpClient: HttpClient): (projectId: string) => Promise<DeleteProjectResponse & DeleteProjectResponseNonNullableFields>;
1592
1838
  declare function queryProjects$1(httpClient: HttpClient): (options?: QueryProjectsOptions) => ProjectsQueryBuilder;
1839
+ declare function updateProjectOrderInCollection$3(httpClient: HttpClient): (identifiers: UpdateProjectOrderInCollectionIdentifiers$1, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse$1 & UpdateProjectOrderInCollectionResponseNonNullableFields$1>;
1840
+ declare function queryProjectsWithCollectionInfo$1(httpClient: HttpClient): (query: QueryV2, options?: QueryProjectsWithCollectionInfoOptions) => Promise<QueryProjectWithCollectionInfoResponse & QueryProjectWithCollectionInfoResponseNonNullableFields>;
1593
1841
  declare const onProjectCreated$1: EventDefinition<ProjectCreatedEnvelope, "wix.portfolio.projects.v1.project_created">;
1594
1842
  declare const onProjectUpdated$1: EventDefinition<ProjectUpdatedEnvelope, "wix.portfolio.projects.v1.project_updated">;
1595
1843
  declare const onProjectDeleted$1: EventDefinition<ProjectDeletedEnvelope, "wix.portfolio.projects.v1.project_deleted">;
@@ -1598,12 +1846,16 @@ declare const createProject: BuildRESTFunction<typeof createProject$1>;
1598
1846
  declare const getProject: BuildRESTFunction<typeof getProject$1>;
1599
1847
  declare const listProjects: BuildRESTFunction<typeof listProjects$1>;
1600
1848
  declare const updateProject: BuildRESTFunction<typeof updateProject$1>;
1849
+ declare const bulkUpdateProjects: BuildRESTFunction<typeof bulkUpdateProjects$1>;
1601
1850
  declare const deleteProject: BuildRESTFunction<typeof deleteProject$1>;
1602
1851
  declare const queryProjects: BuildRESTFunction<typeof queryProjects$1>;
1852
+ declare const updateProjectOrderInCollection$2: BuildRESTFunction<typeof updateProjectOrderInCollection$3>;
1853
+ declare const queryProjectsWithCollectionInfo: BuildRESTFunction<typeof queryProjectsWithCollectionInfo$1>;
1603
1854
  declare const onProjectCreated: BuildEventDefinition<typeof onProjectCreated$1>;
1604
1855
  declare const onProjectUpdated: BuildEventDefinition<typeof onProjectUpdated$1>;
1605
1856
  declare const onProjectDeleted: BuildEventDefinition<typeof onProjectDeleted$1>;
1606
1857
 
1858
+ declare const context$1_bulkUpdateProjects: typeof bulkUpdateProjects;
1607
1859
  declare const context$1_createProject: typeof createProject;
1608
1860
  declare const context$1_deleteProject: typeof deleteProject;
1609
1861
  declare const context$1_getProject: typeof getProject;
@@ -1612,9 +1864,10 @@ declare const context$1_onProjectCreated: typeof onProjectCreated;
1612
1864
  declare const context$1_onProjectDeleted: typeof onProjectDeleted;
1613
1865
  declare const context$1_onProjectUpdated: typeof onProjectUpdated;
1614
1866
  declare const context$1_queryProjects: typeof queryProjects;
1867
+ declare const context$1_queryProjectsWithCollectionInfo: typeof queryProjectsWithCollectionInfo;
1615
1868
  declare const context$1_updateProject: typeof updateProject;
1616
1869
  declare namespace context$1 {
1617
- export { context$1_createProject as createProject, context$1_deleteProject as deleteProject, context$1_getProject as getProject, context$1_listProjects as listProjects, context$1_onProjectCreated as onProjectCreated, context$1_onProjectDeleted as onProjectDeleted, context$1_onProjectUpdated as onProjectUpdated, context$1_queryProjects as queryProjects, context$1_updateProject as updateProject };
1870
+ export { context$1_bulkUpdateProjects as bulkUpdateProjects, context$1_createProject as createProject, context$1_deleteProject as deleteProject, context$1_getProject as getProject, context$1_listProjects as listProjects, context$1_onProjectCreated as onProjectCreated, context$1_onProjectDeleted as onProjectDeleted, context$1_onProjectUpdated as onProjectUpdated, context$1_queryProjects as queryProjects, context$1_queryProjectsWithCollectionInfo as queryProjectsWithCollectionInfo, context$1_updateProject as updateProject, updateProjectOrderInCollection$2 as updateProjectOrderInCollection };
1618
1871
  }
1619
1872
 
1620
1873
  interface ProjectInCollection {