@wix/portfolio 1.0.9 → 1.0.10

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.
Files changed (43) hide show
  1. package/build/cjs/src/portfolio-collections-v1-collection.http.js +1 -1
  2. package/build/cjs/src/portfolio-collections-v1-collection.http.js.map +1 -1
  3. package/build/cjs/src/portfolio-collections-v1-collection.public.d.ts +4 -4
  4. package/build/cjs/src/portfolio-collections-v1-collection.public.js +2 -2
  5. package/build/cjs/src/portfolio-collections-v1-collection.public.js.map +1 -1
  6. package/build/cjs/src/portfolio-collections-v1-collection.types.d.ts +19 -25
  7. package/build/cjs/src/portfolio-collections-v1-collection.types.js.map +1 -1
  8. package/build/cjs/src/portfolio-collections-v1-collection.universal.d.ts +47 -37
  9. package/build/cjs/src/portfolio-collections-v1-collection.universal.js +62 -34
  10. package/build/cjs/src/portfolio-collections-v1-collection.universal.js.map +1 -1
  11. package/build/cjs/src/portfolio-projects-v1-project.http.js +36 -12
  12. package/build/cjs/src/portfolio-projects-v1-project.http.js.map +1 -1
  13. package/build/cjs/src/portfolio-projects-v1-project.public.d.ts +5 -5
  14. package/build/cjs/src/portfolio-projects-v1-project.public.js +4 -4
  15. package/build/cjs/src/portfolio-projects-v1-project.public.js.map +1 -1
  16. package/build/cjs/src/portfolio-projects-v1-project.types.d.ts +83 -53
  17. package/build/cjs/src/portfolio-projects-v1-project.types.js +8 -11
  18. package/build/cjs/src/portfolio-projects-v1-project.types.js.map +1 -1
  19. package/build/cjs/src/portfolio-projects-v1-project.universal.d.ts +106 -69
  20. package/build/cjs/src/portfolio-projects-v1-project.universal.js +101 -61
  21. package/build/cjs/src/portfolio-projects-v1-project.universal.js.map +1 -1
  22. package/build/es/src/portfolio-collections-v1-collection.http.js +1 -1
  23. package/build/es/src/portfolio-collections-v1-collection.http.js.map +1 -1
  24. package/build/es/src/portfolio-collections-v1-collection.public.d.ts +4 -4
  25. package/build/es/src/portfolio-collections-v1-collection.public.js +2 -2
  26. package/build/es/src/portfolio-collections-v1-collection.public.js.map +1 -1
  27. package/build/es/src/portfolio-collections-v1-collection.types.d.ts +19 -25
  28. package/build/es/src/portfolio-collections-v1-collection.types.js.map +1 -1
  29. package/build/es/src/portfolio-collections-v1-collection.universal.d.ts +47 -37
  30. package/build/es/src/portfolio-collections-v1-collection.universal.js +62 -34
  31. package/build/es/src/portfolio-collections-v1-collection.universal.js.map +1 -1
  32. package/build/es/src/portfolio-projects-v1-project.http.js +36 -12
  33. package/build/es/src/portfolio-projects-v1-project.http.js.map +1 -1
  34. package/build/es/src/portfolio-projects-v1-project.public.d.ts +5 -5
  35. package/build/es/src/portfolio-projects-v1-project.public.js +3 -3
  36. package/build/es/src/portfolio-projects-v1-project.public.js.map +1 -1
  37. package/build/es/src/portfolio-projects-v1-project.types.d.ts +83 -53
  38. package/build/es/src/portfolio-projects-v1-project.types.js +7 -10
  39. package/build/es/src/portfolio-projects-v1-project.types.js.map +1 -1
  40. package/build/es/src/portfolio-projects-v1-project.universal.d.ts +106 -69
  41. package/build/es/src/portfolio-projects-v1-project.universal.js +100 -60
  42. package/build/es/src/portfolio-projects-v1-project.universal.js.map +1 -1
  43. package/package.json +2 -2
@@ -5,7 +5,7 @@ export declare const __debug: {
5
5
  };
6
6
  };
7
7
  /** Project is the main entity of ProjectsService */
8
- export interface Project {
8
+ export interface Project extends ProjectCoverOneOf {
9
9
  /**
10
10
  * Project ID
11
11
  * @readonly
@@ -13,14 +13,10 @@ export interface Project {
13
13
  _id?: string | null;
14
14
  /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */
15
15
  revision?: string | null;
16
- /** Project name */
17
16
  title?: string | null;
18
- /** Project description */
19
17
  description?: string | null;
20
18
  /** indicates if the project should be hidden from Portfolio */
21
19
  hidden?: boolean | null;
22
- /** project's cover photo */
23
- coverImage?: CommonImage;
24
20
  /** Collections must exist to be added to a project. can be created/updated/deleted using this //TODO */
25
21
  collectionIds?: string[];
26
22
  /** Custom project details */
@@ -42,23 +38,28 @@ export interface Project {
42
38
  */
43
39
  url?: string;
44
40
  seoData?: SeoSchema;
41
+ /**
42
+ * indicates if the project is synced from external platform (via integration page) and therefore will be updated from the external platform on daily basis
43
+ * @readonly
44
+ */
45
+ syncedProject?: boolean | null;
46
+ /** project's cover photo */
47
+ coverImage?: CommonImage;
48
+ /** project's cover video */
49
+ coverVideo?: Video;
50
+ }
51
+ /** @oneof */
52
+ export interface ProjectCoverOneOf {
53
+ /** project's cover photo */
54
+ coverImage?: CommonImage;
55
+ /** project's cover video */
56
+ coverVideo?: Video;
45
57
  }
46
58
  export interface CommonImage {
47
- /** Image info - Wix Media Image. Required. */
59
+ /** Image info - Wix Media Image. */
48
60
  imageInfo?: string;
49
61
  /** Focal point of the image. */
50
62
  focalPoint?: CommonPoint;
51
- /** Set of key-value pairs describing the media in [Exchangeable Image File format](https://en.wikipedia.org/wiki/Exif). */
52
- exif?: Record<string, any> | null;
53
- /**
54
- * Image compression level. <br />
55
- *
56
- * Min: `30` <br />
57
- * Max: `100`
58
- */
59
- quality?: number | null;
60
- /** [Unsharp masking](https://en.wikipedia.org/wiki/Unsharp_masking) values of the image. */
61
- unsharpMasking?: CommonUnsharpMasking;
62
63
  }
63
64
  export declare enum ImageImageType {
64
65
  UNDEFINED = "UNDEFINED",
@@ -89,35 +90,46 @@ export interface CommonUnsharpMasking {
89
90
  */
90
91
  threshold?: number | null;
91
92
  }
93
+ export interface Video {
94
+ /** Video info - Wix Media Image. */
95
+ videoInfo?: string;
96
+ /** Manually defined Video duration in milliseconds. */
97
+ durationInMillis?: number | null;
98
+ }
99
+ export declare enum VideoType {
100
+ UNDEFINED = "UNDEFINED",
101
+ WIX_MEDIA = "WIX_MEDIA",
102
+ YOUTUBE = "YOUTUBE",
103
+ VIMEO = "VIMEO"
104
+ }
105
+ export interface VideoResolution {
106
+ /** Video URL. Required. */
107
+ url?: string;
108
+ /** Video height. Required. */
109
+ height?: number;
110
+ /** Video width. Required. */
111
+ width?: number;
112
+ /** Video format for example, mp4, hls. Required. */
113
+ format?: string;
114
+ /** Video quality for example 480p, 720p. */
115
+ quality?: string | null;
116
+ /** Video filename. */
117
+ filename?: string | null;
118
+ }
92
119
  export interface ProjectDetail extends ProjectDetailValueOneOf {
93
- /** key of the detail field from predefined list */
94
- key?: Key;
95
- /** display label of the key */
96
120
  label?: string;
97
- /** text value */
98
121
  text?: string;
99
- /** number value */
100
- number?: number;
101
- /** date value */
102
- date?: Date;
122
+ link?: DetailsLink;
103
123
  }
104
124
  /** @oneof */
105
125
  export interface ProjectDetailValueOneOf {
106
- /** text value */
107
126
  text?: string;
108
- /** number value */
109
- number?: number;
110
- /** date value */
111
- date?: Date;
127
+ link?: DetailsLink;
112
128
  }
113
- export declare enum Key {
114
- UNDEFINED = "UNDEFINED",
115
- ROLE = "ROLE",
116
- LOCATION = "LOCATION",
117
- DATE = "DATE",
118
- CUSTOM = "CUSTOM",
119
- /** examples of values: "real estate", "photography" */
120
- PROJECT_TYPE = "PROJECT_TYPE"
129
+ export interface DetailsLink {
130
+ text?: string | null;
131
+ /** link to external source */
132
+ url?: string | null;
121
133
  }
122
134
  export interface ProjectSource {
123
135
  appDefId?: string;
@@ -149,13 +161,21 @@ export interface SeoSchema {
149
161
  settings?: Settings;
150
162
  }
151
163
  export interface Tag {
152
- /** SEO tag type. Supported values: `title`, `meta`, `script`, `link`. */
164
+ /**
165
+ * SEO tag type.
166
+ *
167
+ *
168
+ * Supported values: `title`, `meta`, `script`, `link`.
169
+ */
153
170
  type?: string;
154
- /** SEO tag attributes/properties (name, content, rel, href). */
171
+ /**
172
+ * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
173
+ * For example: `{'name': 'description', 'content': 'the description itself'}`.
174
+ */
155
175
  props?: Record<string, any> | null;
156
- /** Tag meta data, e.g. {height: 300, width: 240}. */
176
+ /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
157
177
  meta?: Record<string, any> | null;
158
- /** Tag inner content e.g. `<title> inner content </title>`. */
178
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
159
179
  children?: string;
160
180
  /** Whether the tag is a custom tag. */
161
181
  custom?: boolean;
@@ -163,7 +183,12 @@ export interface Tag {
163
183
  disabled?: boolean;
164
184
  }
165
185
  export interface Settings {
166
- /** disable auto creation of 301 redirects on slug changes (enabled by default). */
186
+ /**
187
+ * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled.
188
+ *
189
+ *
190
+ * Default: enabled
191
+ */
167
192
  preventAutoRedirect?: boolean;
168
193
  }
169
194
  export interface GetProjectPageDataRequest {
@@ -374,6 +399,9 @@ export interface NamespaceChanged {
374
399
  }
375
400
  export interface Empty {
376
401
  }
402
+ export interface DummyMenuHelperResponse {
403
+ response?: string | null;
404
+ }
377
405
  export interface InvalidateCache extends InvalidateCacheGetByOneOf {
378
406
  /** tell us why you're invalidating the cache. You don't need to add your app name */
379
407
  reason?: string | null;
@@ -459,8 +487,6 @@ export interface ListProjectsResponse {
459
487
  /** The retrieved Projects */
460
488
  projects?: Project[];
461
489
  /** Paging metadata */
462
- pagingMetadataV2?: PagingMetadataV2;
463
- /** Paging metadata */
464
490
  metadata?: PagingMetadataV2;
465
491
  }
466
492
  export interface PagingMetadataV2 {
@@ -484,8 +510,6 @@ export interface Cursors {
484
510
  export interface UpdateProjectRequest {
485
511
  /** Project to be updated, may be partial */
486
512
  project: Project;
487
- /** Explicit list of fields to update */
488
- mask?: string[];
489
513
  }
490
514
  export interface UpdateProjectResponse {
491
515
  /** The updated Project */
@@ -494,8 +518,6 @@ export interface UpdateProjectResponse {
494
518
  export interface DeleteProjectRequest {
495
519
  /** Id of the Project to delete */
496
520
  projectId: string;
497
- /** The revision of the Project */
498
- revision?: string;
499
521
  }
500
522
  export interface DeleteProjectResponse {
501
523
  /** Id of the deleted Project */
@@ -557,8 +579,6 @@ export interface QueryProjectsResponse {
557
579
  /** The retrieved Projects */
558
580
  projects?: Project[];
559
581
  /** Paging metadata */
560
- pagingMetadataV2?: PagingMetadataV2;
561
- /** Paging metadata */
562
582
  metadata?: PagingMetadataV2;
563
583
  }
564
584
  export interface UpdateProjectOrderInCollectionRequest {
@@ -598,8 +618,6 @@ export interface QueryProjectWithCollectionInfoResponse {
598
618
  /** The retrieved Projects in Collection */
599
619
  projects?: ProjectInCollection[];
600
620
  /** Paging metadata */
601
- pagingMetadataV2?: PagingMetadataV2;
602
- /** Paging metadata */
603
621
  metadata?: PagingMetadataV2;
604
622
  }
605
623
  export interface DomainEvent extends DomainEventBodyOneOf {
@@ -677,6 +695,7 @@ export interface ExtendedFieldsUpdatedEvent {
677
695
  * Creates a new Project
678
696
  * @param project - Project to be created
679
697
  * @public
698
+ * @documentationMaturity preview
680
699
  * @requiredField project
681
700
  * @requiredField project.source.appDefId
682
701
  * @requiredField project.source.externalId
@@ -688,6 +707,7 @@ export declare function createProject(project: Project): Promise<Project>;
688
707
  * Get a Project by id
689
708
  * @param projectId - Id of the Project to retrieve
690
709
  * @public
710
+ * @documentationMaturity preview
691
711
  * @requiredField projectId
692
712
  * @returns The retrieved Project
693
713
  */
@@ -697,7 +717,9 @@ export interface GetProjectOptions {
697
717
  }
698
718
  /**
699
719
  * List all projects in portfolio by creation date
700
- * @public */
720
+ * @public
721
+ * @documentationMaturity preview
722
+ */
701
723
  export declare function listProjects(options?: ListProjectsOptions): Promise<ListProjectsResponse>;
702
724
  export interface ListProjectsOptions {
703
725
  /** Projects limit per response is maximum 100, In the first request the cursor is None */
@@ -709,12 +731,13 @@ export interface ListProjectsOptions {
709
731
  * Pass the latest `revision` for a successful update
710
732
  * @param _id - Project ID
711
733
  * @public
734
+ * @documentationMaturity preview
712
735
  * @requiredField _id
713
736
  * @requiredField project
714
737
  * @requiredField project.revision
715
738
  * @returns The updated Project
716
739
  */
717
- export declare function updateProject(_id: string | null, project: UpdateProject, options?: UpdateProjectOptions): Promise<Project>;
740
+ export declare function updateProject(_id: string | null, project: UpdateProject): Promise<Project>;
718
741
  export interface UpdateProject {
719
742
  /**
720
743
  * Project ID
@@ -723,14 +746,10 @@ export interface UpdateProject {
723
746
  _id?: string | null;
724
747
  /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */
725
748
  revision?: string | null;
726
- /** Project name */
727
749
  title?: string | null;
728
- /** Project description */
729
750
  description?: string | null;
730
751
  /** indicates if the project should be hidden from Portfolio */
731
752
  hidden?: boolean | null;
732
- /** project's cover photo */
733
- coverImage?: CommonImage;
734
753
  /** Collections must exist to be added to a project. can be created/updated/deleted using this //TODO */
735
754
  collectionIds?: string[];
736
755
  /** Custom project details */
@@ -752,27 +771,31 @@ export interface UpdateProject {
752
771
  */
753
772
  url?: string;
754
773
  seoData?: SeoSchema;
755
- }
756
- export interface UpdateProjectOptions {
757
- /** Explicit list of fields to update */
758
- mask?: string[];
774
+ /**
775
+ * indicates if the project is synced from external platform (via integration page) and therefore will be updated from the external platform on daily basis
776
+ * @readonly
777
+ */
778
+ syncedProject?: boolean | null;
779
+ /** project's cover photo */
780
+ coverImage?: CommonImage;
781
+ /** project's cover video */
782
+ coverVideo?: Video;
759
783
  }
760
784
  /**
761
785
  * Delete a Project
762
786
  * @param projectId - Id of the Project to delete
763
787
  * @public
788
+ * @documentationMaturity preview
764
789
  * @requiredField projectId
765
790
  */
766
- export declare function deleteProject(projectId: string, options?: DeleteProjectOptions): Promise<DeleteProjectResponse>;
767
- export interface DeleteProjectOptions {
768
- /** The revision of the Project */
769
- revision?: string;
770
- }
791
+ export declare function deleteProject(projectId: string): Promise<DeleteProjectResponse>;
771
792
  /**
772
793
  * Query Projects using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
773
794
  * @public */
774
795
  export declare function queryProjects(options?: QueryProjectsOptions): ProjectsQueryBuilder;
775
- export declare type QueryProjectsOptions = Omit<QueryProjectsRequest, 'query'>;
796
+ export interface QueryProjectsOptions {
797
+ includePageUrl?: boolean | null | undefined;
798
+ }
776
799
  interface QueryCursorResult {
777
800
  hasNext: () => boolean;
778
801
  hasPrev: () => boolean;
@@ -794,6 +817,14 @@ export interface ProjectsQueryBuilder {
794
817
  * @param value - Value to compare against.
795
818
  */
796
819
  ne: (propertyName: string, value: any) => ProjectsQueryBuilder;
820
+ /** @param propertyName - Property whose value is compared with `value`.
821
+ * @param value - Value to compare against.
822
+ */
823
+ gt: (propertyName: string, value: any) => ProjectsQueryBuilder;
824
+ /** @param propertyName - Property whose value is compared with `value`.
825
+ * @param value - Value to compare against.
826
+ */
827
+ lt: (propertyName: string, value: any) => ProjectsQueryBuilder;
797
828
  /** @param propertyName - Property whose value is compared with `string`.
798
829
  * @param string - String to compare against. Case-insensitive.
799
830
  */
@@ -802,6 +833,10 @@ export interface ProjectsQueryBuilder {
802
833
  * @param values - List of values to compare against.
803
834
  */
804
835
  hasSome: (propertyName: string, value: any[]) => ProjectsQueryBuilder;
836
+ /** @param propertyName - Property whose value is compared with `values`.
837
+ * @param values - List of values to compare against.
838
+ */
839
+ hasAll: (propertyName: string, value: any[]) => ProjectsQueryBuilder;
805
840
  in: (propertyName: string, value: any) => ProjectsQueryBuilder;
806
841
  exists: (propertyName: string, value: boolean) => ProjectsQueryBuilder;
807
842
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
@@ -816,6 +851,7 @@ export interface ProjectsQueryBuilder {
816
851
  * Updates Project's order in a given Collection
817
852
  * @param sortOrder - The new sort order of the project in the given collection
818
853
  * @public
854
+ * @documentationMaturity preview
819
855
  * @requiredField identifiers
820
856
  * @requiredField identifiers.collectionId
821
857
  * @requiredField identifiers.projectId
@@ -838,6 +874,7 @@ export interface UpdateProjectOrderInCollectionIdentifiers {
838
874
  * If you want to Query project by Project properties please use Query Projects method - link //TODO
839
875
  * @param query - WQL expression
840
876
  * @public
877
+ * @documentationMaturity preview
841
878
  * @requiredField query
842
879
  */
843
880
  export declare function queryProjectsWithCollectionInfo(query: QueryV2, options?: QueryProjectsWithCollectionInfoOptions): Promise<QueryProjectWithCollectionInfoResponse>;