@wix/portfolio 1.0.73 → 1.0.75

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.73",
3
+ "version": "1.0.75",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -22,8 +22,8 @@
22
22
  "@wix/portfolio_portfolio-settings": "1.0.3",
23
23
  "@wix/portfolio_project-in-collections": "1.0.16",
24
24
  "@wix/portfolio_project-items": "1.0.21",
25
- "@wix/portfolio_projects": "1.0.22",
26
- "@wix/portfolio_synced-project": "1.0.0"
25
+ "@wix/portfolio_projects": "1.0.23",
26
+ "@wix/portfolio_synced-project": "1.0.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "glob": "^10.4.1",
@@ -47,5 +47,5 @@
47
47
  "fqdn": ""
48
48
  }
49
49
  },
50
- "falconPackageHash": "be8d191ae28ffe921dafe6c3448fa1e26762e8d0492dc4ae28491434"
50
+ "falconPackageHash": "a431aff90cdd777ab2143fd3b0fab225abe8ebd0f0dea2d2d4fd890b"
51
51
  }
@@ -391,41 +391,41 @@ interface CollectionsQueryBuilder {
391
391
  find: () => Promise<CollectionsQueryResult>;
392
392
  }
393
393
 
394
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
395
- interface HttpClient {
396
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
394
+ type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
395
+ interface HttpClient$5 {
396
+ request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
397
397
  fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
398
398
  }
399
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
400
- type HttpResponse<T = any> = {
399
+ type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
400
+ type HttpResponse$5<T = any> = {
401
401
  data: T;
402
402
  status: number;
403
403
  statusText: string;
404
404
  headers: any;
405
405
  request?: any;
406
406
  };
407
- type RequestOptions<_TResponse = any, Data = any> = {
407
+ type RequestOptions$5<_TResponse = any, Data = any> = {
408
408
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
409
409
  url: string;
410
410
  data?: Data;
411
411
  params?: URLSearchParams;
412
- } & APIMetadata;
413
- type APIMetadata = {
412
+ } & APIMetadata$5;
413
+ type APIMetadata$5 = {
414
414
  methodFqn?: string;
415
415
  entityFqdn?: string;
416
416
  packageName?: string;
417
417
  };
418
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
419
- type EventDefinition<Payload = unknown, Type extends string = string> = {
418
+ type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
419
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
420
420
  __type: 'event-definition';
421
421
  type: Type;
422
422
  isDomainEvent?: boolean;
423
423
  transformations?: (envelope: unknown) => Payload;
424
424
  __payload: Payload;
425
425
  };
426
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
427
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
428
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
426
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
427
+ type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
428
+ type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
429
429
 
430
430
  declare global {
431
431
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -434,7 +434,7 @@ declare global {
434
434
  }
435
435
  }
436
436
 
437
- declare function createCollection$1(httpClient: HttpClient): (collection: Collection) => Promise<Collection & {
437
+ declare function createCollection$1(httpClient: HttpClient$5): (collection: Collection) => Promise<Collection & {
438
438
  coverImage?: {
439
439
  imageInfo: string;
440
440
  focalPoint?: {
@@ -459,7 +459,7 @@ declare function createCollection$1(httpClient: HttpClient): (collection: Collec
459
459
  } | undefined;
460
460
  } | undefined;
461
461
  }>;
462
- declare function getCollection$1(httpClient: HttpClient): (collectionId: string, options?: GetCollectionOptions) => Promise<Collection & {
462
+ declare function getCollection$1(httpClient: HttpClient$5): (collectionId: string, options?: GetCollectionOptions) => Promise<Collection & {
463
463
  coverImage?: {
464
464
  imageInfo: string;
465
465
  focalPoint?: {
@@ -484,8 +484,8 @@ declare function getCollection$1(httpClient: HttpClient): (collectionId: string,
484
484
  } | undefined;
485
485
  } | undefined;
486
486
  }>;
487
- declare function listCollections$1(httpClient: HttpClient): (options?: ListCollectionsOptions) => Promise<ListCollectionsResponse & ListCollectionsResponseNonNullableFields>;
488
- declare function updateCollection$1(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<Collection & {
487
+ declare function listCollections$1(httpClient: HttpClient$5): (options?: ListCollectionsOptions) => Promise<ListCollectionsResponse & ListCollectionsResponseNonNullableFields>;
488
+ declare function updateCollection$1(httpClient: HttpClient$5): (_id: string | null, collection: UpdateCollection) => Promise<Collection & {
489
489
  coverImage?: {
490
490
  imageInfo: string;
491
491
  focalPoint?: {
@@ -510,21 +510,21 @@ declare function updateCollection$1(httpClient: HttpClient): (_id: string | null
510
510
  } | undefined;
511
511
  } | undefined;
512
512
  }>;
513
- declare function deleteCollection$1(httpClient: HttpClient): (collectionId: string) => Promise<DeleteCollectionResponse & DeleteCollectionResponseNonNullableFields>;
514
- declare function queryCollections$1(httpClient: HttpClient): (options?: QueryCollectionsOptions) => CollectionsQueryBuilder;
515
- declare const onCollectionCreated$1: EventDefinition<CollectionCreatedEnvelope, "wix.portfolio.collections.v1.collection_created">;
516
- declare const onCollectionUpdated$1: EventDefinition<CollectionUpdatedEnvelope, "wix.portfolio.collections.v1.collection_updated">;
517
- declare const onCollectionDeleted$1: EventDefinition<CollectionDeletedEnvelope, "wix.portfolio.collections.v1.collection_deleted">;
513
+ declare function deleteCollection$1(httpClient: HttpClient$5): (collectionId: string) => Promise<DeleteCollectionResponse & DeleteCollectionResponseNonNullableFields>;
514
+ declare function queryCollections$1(httpClient: HttpClient$5): (options?: QueryCollectionsOptions) => CollectionsQueryBuilder;
515
+ declare const onCollectionCreated$1: EventDefinition$3<CollectionCreatedEnvelope, "wix.portfolio.collections.v1.collection_created">;
516
+ declare const onCollectionUpdated$1: EventDefinition$3<CollectionUpdatedEnvelope, "wix.portfolio.collections.v1.collection_updated">;
517
+ declare const onCollectionDeleted$1: EventDefinition$3<CollectionDeletedEnvelope, "wix.portfolio.collections.v1.collection_deleted">;
518
518
 
519
- declare const createCollection: BuildRESTFunction<typeof createCollection$1>;
520
- declare const getCollection: BuildRESTFunction<typeof getCollection$1>;
521
- declare const listCollections: BuildRESTFunction<typeof listCollections$1>;
522
- declare const updateCollection: BuildRESTFunction<typeof updateCollection$1>;
523
- declare const deleteCollection: BuildRESTFunction<typeof deleteCollection$1>;
524
- declare const queryCollections: BuildRESTFunction<typeof queryCollections$1>;
525
- declare const onCollectionCreated: BuildEventDefinition<typeof onCollectionCreated$1>;
526
- declare const onCollectionUpdated: BuildEventDefinition<typeof onCollectionUpdated$1>;
527
- declare const onCollectionDeleted: BuildEventDefinition<typeof onCollectionDeleted$1>;
519
+ declare const createCollection: BuildRESTFunction$5<typeof createCollection$1>;
520
+ declare const getCollection: BuildRESTFunction$5<typeof getCollection$1>;
521
+ declare const listCollections: BuildRESTFunction$5<typeof listCollections$1>;
522
+ declare const updateCollection: BuildRESTFunction$5<typeof updateCollection$1>;
523
+ declare const deleteCollection: BuildRESTFunction$5<typeof deleteCollection$1>;
524
+ declare const queryCollections: BuildRESTFunction$5<typeof queryCollections$1>;
525
+ declare const onCollectionCreated: BuildEventDefinition$3<typeof onCollectionCreated$1>;
526
+ declare const onCollectionUpdated: BuildEventDefinition$3<typeof onCollectionUpdated$1>;
527
+ declare const onCollectionDeleted: BuildEventDefinition$3<typeof onCollectionDeleted$1>;
528
528
 
529
529
  declare const context$5_createCollection: typeof createCollection;
530
530
  declare const context$5_deleteCollection: typeof deleteCollection;
@@ -600,18 +600,51 @@ interface UpdatePortfolioSettingsResponseNonNullableFields {
600
600
  };
601
601
  }
602
602
 
603
- declare function createPortfolioSettings$1(httpClient: HttpClient): (portfolioSettings: PortfolioSettings) => Promise<PortfolioSettings & {
603
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
604
+ interface HttpClient$4 {
605
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
606
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
607
+ }
608
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
609
+ type HttpResponse$4<T = any> = {
610
+ data: T;
611
+ status: number;
612
+ statusText: string;
613
+ headers: any;
614
+ request?: any;
615
+ };
616
+ type RequestOptions$4<_TResponse = any, Data = any> = {
617
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
618
+ url: string;
619
+ data?: Data;
620
+ params?: URLSearchParams;
621
+ } & APIMetadata$4;
622
+ type APIMetadata$4 = {
623
+ methodFqn?: string;
624
+ entityFqdn?: string;
625
+ packageName?: string;
626
+ };
627
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
628
+
629
+ declare global {
630
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
631
+ interface SymbolConstructor {
632
+ readonly observable: symbol;
633
+ }
634
+ }
635
+
636
+ declare function createPortfolioSettings$1(httpClient: HttpClient$4): (portfolioSettings: PortfolioSettings) => Promise<PortfolioSettings & {
604
637
  projectItemSettings?: {
605
638
  addItemDirection: AddItemDirection;
606
639
  defaultItemName: DefaultItemName;
607
640
  } | undefined;
608
641
  }>;
609
- declare function getPortfolioSettings$1(httpClient: HttpClient): () => Promise<GetPortfolioSettingsResponse & GetPortfolioSettingsResponseNonNullableFields>;
610
- declare function updatePortfolioSettings$1(httpClient: HttpClient): (portfolioSettings: PortfolioSettings) => Promise<UpdatePortfolioSettingsResponse & UpdatePortfolioSettingsResponseNonNullableFields>;
642
+ declare function getPortfolioSettings$1(httpClient: HttpClient$4): () => Promise<GetPortfolioSettingsResponse & GetPortfolioSettingsResponseNonNullableFields>;
643
+ declare function updatePortfolioSettings$1(httpClient: HttpClient$4): (portfolioSettings: PortfolioSettings) => Promise<UpdatePortfolioSettingsResponse & UpdatePortfolioSettingsResponseNonNullableFields>;
611
644
 
612
- declare const createPortfolioSettings: BuildRESTFunction<typeof createPortfolioSettings$1>;
613
- declare const getPortfolioSettings: BuildRESTFunction<typeof getPortfolioSettings$1>;
614
- declare const updatePortfolioSettings: BuildRESTFunction<typeof updatePortfolioSettings$1>;
645
+ declare const createPortfolioSettings: BuildRESTFunction$4<typeof createPortfolioSettings$1>;
646
+ declare const getPortfolioSettings: BuildRESTFunction$4<typeof getPortfolioSettings$1>;
647
+ declare const updatePortfolioSettings: BuildRESTFunction$4<typeof updatePortfolioSettings$1>;
615
648
 
616
649
  declare const context$4_createPortfolioSettings: typeof createPortfolioSettings;
617
650
  declare const context$4_getPortfolioSettings: typeof getPortfolioSettings;
@@ -1089,7 +1122,50 @@ interface DuplicateProjectItemsOptions {
1089
1122
  targetProjectId: string;
1090
1123
  }
1091
1124
 
1092
- declare function createProjectItem$1(httpClient: HttpClient): (item: Item) => Promise<Item & {
1125
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
1126
+ interface HttpClient$3 {
1127
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
1128
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1129
+ }
1130
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
1131
+ type HttpResponse$3<T = any> = {
1132
+ data: T;
1133
+ status: number;
1134
+ statusText: string;
1135
+ headers: any;
1136
+ request?: any;
1137
+ };
1138
+ type RequestOptions$3<_TResponse = any, Data = any> = {
1139
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1140
+ url: string;
1141
+ data?: Data;
1142
+ params?: URLSearchParams;
1143
+ } & APIMetadata$3;
1144
+ type APIMetadata$3 = {
1145
+ methodFqn?: string;
1146
+ entityFqdn?: string;
1147
+ packageName?: string;
1148
+ };
1149
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
1150
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
1151
+ __type: 'event-definition';
1152
+ type: Type;
1153
+ isDomainEvent?: boolean;
1154
+ transformations?: (envelope: unknown) => Payload;
1155
+ __payload: Payload;
1156
+ };
1157
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
1158
+ type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
1159
+ type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
1160
+
1161
+ declare global {
1162
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1163
+ interface SymbolConstructor {
1164
+ readonly observable: symbol;
1165
+ }
1166
+ }
1167
+
1168
+ declare function createProjectItem$1(httpClient: HttpClient$3): (item: Item) => Promise<Item & {
1093
1169
  image?: {
1094
1170
  imageInfo: string;
1095
1171
  focalPoint?: {
@@ -1102,8 +1178,8 @@ declare function createProjectItem$1(httpClient: HttpClient): (item: Item) => Pr
1102
1178
  } | undefined;
1103
1179
  type: Type;
1104
1180
  }>;
1105
- declare function bulkCreateProjectItems$1(httpClient: HttpClient): (options?: BulkCreateProjectItemsOptions) => Promise<BulkCreateProjectItemsResponse & BulkCreateProjectItemsResponseNonNullableFields>;
1106
- declare function getProjectItem$1(httpClient: HttpClient): (itemId: string) => Promise<Item & {
1181
+ declare function bulkCreateProjectItems$1(httpClient: HttpClient$3): (options?: BulkCreateProjectItemsOptions) => Promise<BulkCreateProjectItemsResponse & BulkCreateProjectItemsResponseNonNullableFields>;
1182
+ declare function getProjectItem$1(httpClient: HttpClient$3): (itemId: string) => Promise<Item & {
1107
1183
  image?: {
1108
1184
  imageInfo: string;
1109
1185
  focalPoint?: {
@@ -1116,8 +1192,8 @@ declare function getProjectItem$1(httpClient: HttpClient): (itemId: string) => P
1116
1192
  } | undefined;
1117
1193
  type: Type;
1118
1194
  }>;
1119
- declare function listProjectItems$1(httpClient: HttpClient): (projectId: string, options?: ListProjectItemsOptions) => Promise<ListProjectItemsResponse & ListProjectItemsResponseNonNullableFields>;
1120
- declare function updateProjectItem$1(httpClient: HttpClient): (_id: string | null, item: UpdateProjectItem) => Promise<Item & {
1195
+ declare function listProjectItems$1(httpClient: HttpClient$3): (projectId: string, options?: ListProjectItemsOptions) => Promise<ListProjectItemsResponse & ListProjectItemsResponseNonNullableFields>;
1196
+ declare function updateProjectItem$1(httpClient: HttpClient$3): (_id: string | null, item: UpdateProjectItem) => Promise<Item & {
1121
1197
  image?: {
1122
1198
  imageInfo: string;
1123
1199
  focalPoint?: {
@@ -1130,26 +1206,26 @@ declare function updateProjectItem$1(httpClient: HttpClient): (_id: string | nul
1130
1206
  } | undefined;
1131
1207
  type: Type;
1132
1208
  }>;
1133
- declare function bulkUpdateProjectItems$1(httpClient: HttpClient): (options?: BulkUpdateProjectItemsOptions) => Promise<BulkUpdateProjectItemsResponse & BulkUpdateProjectItemsResponseNonNullableFields>;
1134
- declare function deleteProjectItem$1(httpClient: HttpClient): (itemId: string) => Promise<DeleteProjectItemResponse & DeleteProjectItemResponseNonNullableFields>;
1135
- declare function bulkDeleteProjectItems$1(httpClient: HttpClient): (options: BulkDeleteProjectItemsOptions) => Promise<BulkDeleteProjectItemsResponse & BulkDeleteProjectItemsResponseNonNullableFields>;
1136
- declare function duplicateProjectItems$1(httpClient: HttpClient): (originProjectId: string, options: DuplicateProjectItemsOptions) => Promise<DuplicateProjectItemsResponse & DuplicateProjectItemsResponseNonNullableFields>;
1137
- declare const onProjectItemCreated$1: EventDefinition<ProjectItemCreatedEnvelope, "wix.portfolio.project_items.v1.project_item_created">;
1138
- declare const onProjectItemUpdated$1: EventDefinition<ProjectItemUpdatedEnvelope, "wix.portfolio.project_items.v1.project_item_updated">;
1139
- declare const onProjectItemDeleted$1: EventDefinition<ProjectItemDeletedEnvelope, "wix.portfolio.project_items.v1.project_item_deleted">;
1209
+ declare function bulkUpdateProjectItems$1(httpClient: HttpClient$3): (options?: BulkUpdateProjectItemsOptions) => Promise<BulkUpdateProjectItemsResponse & BulkUpdateProjectItemsResponseNonNullableFields>;
1210
+ declare function deleteProjectItem$1(httpClient: HttpClient$3): (itemId: string) => Promise<DeleteProjectItemResponse & DeleteProjectItemResponseNonNullableFields>;
1211
+ declare function bulkDeleteProjectItems$1(httpClient: HttpClient$3): (options: BulkDeleteProjectItemsOptions) => Promise<BulkDeleteProjectItemsResponse & BulkDeleteProjectItemsResponseNonNullableFields>;
1212
+ declare function duplicateProjectItems$1(httpClient: HttpClient$3): (originProjectId: string, options: DuplicateProjectItemsOptions) => Promise<DuplicateProjectItemsResponse & DuplicateProjectItemsResponseNonNullableFields>;
1213
+ declare const onProjectItemCreated$1: EventDefinition$2<ProjectItemCreatedEnvelope, "wix.portfolio.project_items.v1.project_item_created">;
1214
+ declare const onProjectItemUpdated$1: EventDefinition$2<ProjectItemUpdatedEnvelope, "wix.portfolio.project_items.v1.project_item_updated">;
1215
+ declare const onProjectItemDeleted$1: EventDefinition$2<ProjectItemDeletedEnvelope, "wix.portfolio.project_items.v1.project_item_deleted">;
1140
1216
 
1141
- declare const createProjectItem: BuildRESTFunction<typeof createProjectItem$1>;
1142
- declare const bulkCreateProjectItems: BuildRESTFunction<typeof bulkCreateProjectItems$1>;
1143
- declare const getProjectItem: BuildRESTFunction<typeof getProjectItem$1>;
1144
- declare const listProjectItems: BuildRESTFunction<typeof listProjectItems$1>;
1145
- declare const updateProjectItem: BuildRESTFunction<typeof updateProjectItem$1>;
1146
- declare const bulkUpdateProjectItems: BuildRESTFunction<typeof bulkUpdateProjectItems$1>;
1147
- declare const deleteProjectItem: BuildRESTFunction<typeof deleteProjectItem$1>;
1148
- declare const bulkDeleteProjectItems: BuildRESTFunction<typeof bulkDeleteProjectItems$1>;
1149
- declare const duplicateProjectItems: BuildRESTFunction<typeof duplicateProjectItems$1>;
1150
- declare const onProjectItemCreated: BuildEventDefinition<typeof onProjectItemCreated$1>;
1151
- declare const onProjectItemUpdated: BuildEventDefinition<typeof onProjectItemUpdated$1>;
1152
- declare const onProjectItemDeleted: BuildEventDefinition<typeof onProjectItemDeleted$1>;
1217
+ declare const createProjectItem: BuildRESTFunction$3<typeof createProjectItem$1>;
1218
+ declare const bulkCreateProjectItems: BuildRESTFunction$3<typeof bulkCreateProjectItems$1>;
1219
+ declare const getProjectItem: BuildRESTFunction$3<typeof getProjectItem$1>;
1220
+ declare const listProjectItems: BuildRESTFunction$3<typeof listProjectItems$1>;
1221
+ declare const updateProjectItem: BuildRESTFunction$3<typeof updateProjectItem$1>;
1222
+ declare const bulkUpdateProjectItems: BuildRESTFunction$3<typeof bulkUpdateProjectItems$1>;
1223
+ declare const deleteProjectItem: BuildRESTFunction$3<typeof deleteProjectItem$1>;
1224
+ declare const bulkDeleteProjectItems: BuildRESTFunction$3<typeof bulkDeleteProjectItems$1>;
1225
+ declare const duplicateProjectItems: BuildRESTFunction$3<typeof duplicateProjectItems$1>;
1226
+ declare const onProjectItemCreated: BuildEventDefinition$2<typeof onProjectItemCreated$1>;
1227
+ declare const onProjectItemUpdated: BuildEventDefinition$2<typeof onProjectItemUpdated$1>;
1228
+ declare const onProjectItemDeleted: BuildEventDefinition$2<typeof onProjectItemDeleted$1>;
1153
1229
 
1154
1230
  declare const context$3_bulkCreateProjectItems: typeof bulkCreateProjectItems;
1155
1231
  declare const context$3_bulkDeleteProjectItems: typeof bulkDeleteProjectItems;
@@ -1935,8 +2011,51 @@ interface QueryProjectsWithCollectionInfoOptions {
1935
2011
  includePageUrl?: boolean | null;
1936
2012
  }
1937
2013
 
1938
- declare function getProjectPageData$1(httpClient: HttpClient): (identifiers: GetProjectPageDataIdentifiers) => Promise<GetProjectPageDataResponse & GetProjectPageDataResponseNonNullableFields>;
1939
- declare function createProject$1(httpClient: HttpClient): (project: Project$1) => Promise<Project$1 & {
2014
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
2015
+ interface HttpClient$2 {
2016
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
2017
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2018
+ }
2019
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
2020
+ type HttpResponse$2<T = any> = {
2021
+ data: T;
2022
+ status: number;
2023
+ statusText: string;
2024
+ headers: any;
2025
+ request?: any;
2026
+ };
2027
+ type RequestOptions$2<_TResponse = any, Data = any> = {
2028
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2029
+ url: string;
2030
+ data?: Data;
2031
+ params?: URLSearchParams;
2032
+ } & APIMetadata$2;
2033
+ type APIMetadata$2 = {
2034
+ methodFqn?: string;
2035
+ entityFqdn?: string;
2036
+ packageName?: string;
2037
+ };
2038
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
2039
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
2040
+ __type: 'event-definition';
2041
+ type: Type;
2042
+ isDomainEvent?: boolean;
2043
+ transformations?: (envelope: unknown) => Payload;
2044
+ __payload: Payload;
2045
+ };
2046
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
2047
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
2048
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
2049
+
2050
+ declare global {
2051
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2052
+ interface SymbolConstructor {
2053
+ readonly observable: symbol;
2054
+ }
2055
+ }
2056
+
2057
+ declare function getProjectPageData$1(httpClient: HttpClient$2): (identifiers: GetProjectPageDataIdentifiers) => Promise<GetProjectPageDataResponse & GetProjectPageDataResponseNonNullableFields>;
2058
+ declare function createProject$1(httpClient: HttpClient$2): (project: Project$1) => Promise<Project$1 & {
1940
2059
  coverImage?: {
1941
2060
  imageInfo: string;
1942
2061
  focalPoint?: {
@@ -1969,7 +2088,7 @@ declare function createProject$1(httpClient: HttpClient): (project: Project$1) =
1969
2088
  } | undefined;
1970
2089
  } | undefined;
1971
2090
  }>;
1972
- declare function getProject$1(httpClient: HttpClient): (projectId: string, options?: GetProjectOptions) => Promise<Project$1 & {
2091
+ declare function getProject$1(httpClient: HttpClient$2): (projectId: string, options?: GetProjectOptions) => Promise<Project$1 & {
1973
2092
  coverImage?: {
1974
2093
  imageInfo: string;
1975
2094
  focalPoint?: {
@@ -2002,8 +2121,8 @@ declare function getProject$1(httpClient: HttpClient): (projectId: string, optio
2002
2121
  } | undefined;
2003
2122
  } | undefined;
2004
2123
  }>;
2005
- declare function listProjects$1(httpClient: HttpClient): (options?: ListProjectsOptions) => Promise<ListProjectsResponse & ListProjectsResponseNonNullableFields>;
2006
- declare function updateProject$1(httpClient: HttpClient): (_id: string | null, project: UpdateProject) => Promise<Project$1 & {
2124
+ declare function listProjects$1(httpClient: HttpClient$2): (options?: ListProjectsOptions) => Promise<ListProjectsResponse & ListProjectsResponseNonNullableFields>;
2125
+ declare function updateProject$1(httpClient: HttpClient$2): (_id: string | null, project: UpdateProject) => Promise<Project$1 & {
2007
2126
  coverImage?: {
2008
2127
  imageInfo: string;
2009
2128
  focalPoint?: {
@@ -2036,28 +2155,28 @@ declare function updateProject$1(httpClient: HttpClient): (_id: string | null, p
2036
2155
  } | undefined;
2037
2156
  } | undefined;
2038
2157
  }>;
2039
- declare function bulkUpdateProjects$1(httpClient: HttpClient): (options?: BulkUpdateProjectsOptions) => Promise<BulkUpdateProjectsResponse & BulkUpdateProjectsResponseNonNullableFields>;
2040
- declare function deleteProject$1(httpClient: HttpClient): (projectId: string) => Promise<DeleteProjectResponse & DeleteProjectResponseNonNullableFields>;
2041
- declare function queryProjects$1(httpClient: HttpClient): (options?: QueryProjectsOptions) => ProjectsQueryBuilder;
2042
- declare function updateProjectOrderInCollection$3(httpClient: HttpClient): (identifiers: UpdateProjectOrderInCollectionIdentifiers$1, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse$1 & UpdateProjectOrderInCollectionResponseNonNullableFields$1>;
2043
- declare function queryProjectsWithCollectionInfo$1(httpClient: HttpClient): (query: QueryV2, options?: QueryProjectsWithCollectionInfoOptions) => Promise<QueryProjectWithCollectionInfoResponse & QueryProjectWithCollectionInfoResponseNonNullableFields>;
2044
- declare const onProjectCreated$1: EventDefinition<ProjectCreatedEnvelope, "wix.portfolio.projects.v1.project_created">;
2045
- declare const onProjectUpdated$1: EventDefinition<ProjectUpdatedEnvelope, "wix.portfolio.projects.v1.project_updated">;
2046
- declare const onProjectDeleted$1: EventDefinition<ProjectDeletedEnvelope, "wix.portfolio.projects.v1.project_deleted">;
2158
+ declare function bulkUpdateProjects$1(httpClient: HttpClient$2): (options?: BulkUpdateProjectsOptions) => Promise<BulkUpdateProjectsResponse & BulkUpdateProjectsResponseNonNullableFields>;
2159
+ declare function deleteProject$1(httpClient: HttpClient$2): (projectId: string) => Promise<DeleteProjectResponse & DeleteProjectResponseNonNullableFields>;
2160
+ declare function queryProjects$1(httpClient: HttpClient$2): (options?: QueryProjectsOptions) => ProjectsQueryBuilder;
2161
+ declare function updateProjectOrderInCollection$3(httpClient: HttpClient$2): (identifiers: UpdateProjectOrderInCollectionIdentifiers$1, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse$1 & UpdateProjectOrderInCollectionResponseNonNullableFields$1>;
2162
+ declare function queryProjectsWithCollectionInfo$1(httpClient: HttpClient$2): (query: QueryV2, options?: QueryProjectsWithCollectionInfoOptions) => Promise<QueryProjectWithCollectionInfoResponse & QueryProjectWithCollectionInfoResponseNonNullableFields>;
2163
+ declare const onProjectCreated$1: EventDefinition$1<ProjectCreatedEnvelope, "wix.portfolio.projects.v1.project_created">;
2164
+ declare const onProjectUpdated$1: EventDefinition$1<ProjectUpdatedEnvelope, "wix.portfolio.projects.v1.project_updated">;
2165
+ declare const onProjectDeleted$1: EventDefinition$1<ProjectDeletedEnvelope, "wix.portfolio.projects.v1.project_deleted">;
2047
2166
 
2048
- declare const getProjectPageData: BuildRESTFunction<typeof getProjectPageData$1>;
2049
- declare const createProject: BuildRESTFunction<typeof createProject$1>;
2050
- declare const getProject: BuildRESTFunction<typeof getProject$1>;
2051
- declare const listProjects: BuildRESTFunction<typeof listProjects$1>;
2052
- declare const updateProject: BuildRESTFunction<typeof updateProject$1>;
2053
- declare const bulkUpdateProjects: BuildRESTFunction<typeof bulkUpdateProjects$1>;
2054
- declare const deleteProject: BuildRESTFunction<typeof deleteProject$1>;
2055
- declare const queryProjects: BuildRESTFunction<typeof queryProjects$1>;
2056
- declare const updateProjectOrderInCollection$2: BuildRESTFunction<typeof updateProjectOrderInCollection$3>;
2057
- declare const queryProjectsWithCollectionInfo: BuildRESTFunction<typeof queryProjectsWithCollectionInfo$1>;
2058
- declare const onProjectCreated: BuildEventDefinition<typeof onProjectCreated$1>;
2059
- declare const onProjectUpdated: BuildEventDefinition<typeof onProjectUpdated$1>;
2060
- declare const onProjectDeleted: BuildEventDefinition<typeof onProjectDeleted$1>;
2167
+ declare const getProjectPageData: BuildRESTFunction$2<typeof getProjectPageData$1>;
2168
+ declare const createProject: BuildRESTFunction$2<typeof createProject$1>;
2169
+ declare const getProject: BuildRESTFunction$2<typeof getProject$1>;
2170
+ declare const listProjects: BuildRESTFunction$2<typeof listProjects$1>;
2171
+ declare const updateProject: BuildRESTFunction$2<typeof updateProject$1>;
2172
+ declare const bulkUpdateProjects: BuildRESTFunction$2<typeof bulkUpdateProjects$1>;
2173
+ declare const deleteProject: BuildRESTFunction$2<typeof deleteProject$1>;
2174
+ declare const queryProjects: BuildRESTFunction$2<typeof queryProjects$1>;
2175
+ declare const updateProjectOrderInCollection$2: BuildRESTFunction$2<typeof updateProjectOrderInCollection$3>;
2176
+ declare const queryProjectsWithCollectionInfo: BuildRESTFunction$2<typeof queryProjectsWithCollectionInfo$1>;
2177
+ declare const onProjectCreated: BuildEventDefinition$1<typeof onProjectCreated$1>;
2178
+ declare const onProjectUpdated: BuildEventDefinition$1<typeof onProjectUpdated$1>;
2179
+ declare const onProjectDeleted: BuildEventDefinition$1<typeof onProjectDeleted$1>;
2061
2180
 
2062
2181
  declare const context$2_bulkUpdateProjects: typeof bulkUpdateProjects;
2063
2182
  declare const context$2_createProject: typeof createProject;
@@ -2454,12 +2573,55 @@ interface UpdateProjectOrderInCollectionIdentifiers {
2454
2573
  collectionId: string;
2455
2574
  }
2456
2575
 
2457
- declare function queryProjectInCollections$1(httpClient: HttpClient): (options?: QueryProjectInCollectionsOptions) => ProjectInCollectionsQueryBuilder;
2458
- declare function updateProjectOrderInCollection$1(httpClient: HttpClient): (identifiers: UpdateProjectOrderInCollectionIdentifiers, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse & UpdateProjectOrderInCollectionResponseNonNullableFields>;
2576
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
2577
+ interface HttpClient$1 {
2578
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
2579
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2580
+ }
2581
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
2582
+ type HttpResponse$1<T = any> = {
2583
+ data: T;
2584
+ status: number;
2585
+ statusText: string;
2586
+ headers: any;
2587
+ request?: any;
2588
+ };
2589
+ type RequestOptions$1<_TResponse = any, Data = any> = {
2590
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2591
+ url: string;
2592
+ data?: Data;
2593
+ params?: URLSearchParams;
2594
+ } & APIMetadata$1;
2595
+ type APIMetadata$1 = {
2596
+ methodFqn?: string;
2597
+ entityFqdn?: string;
2598
+ packageName?: string;
2599
+ };
2600
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
2601
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
2602
+ __type: 'event-definition';
2603
+ type: Type;
2604
+ isDomainEvent?: boolean;
2605
+ transformations?: (envelope: unknown) => Payload;
2606
+ __payload: Payload;
2607
+ };
2608
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2609
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
2610
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
2611
+
2612
+ declare global {
2613
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2614
+ interface SymbolConstructor {
2615
+ readonly observable: symbol;
2616
+ }
2617
+ }
2618
+
2619
+ declare function queryProjectInCollections$1(httpClient: HttpClient$1): (options?: QueryProjectInCollectionsOptions) => ProjectInCollectionsQueryBuilder;
2620
+ declare function updateProjectOrderInCollection$1(httpClient: HttpClient$1): (identifiers: UpdateProjectOrderInCollectionIdentifiers, sortOrder: number | null) => Promise<UpdateProjectOrderInCollectionResponse & UpdateProjectOrderInCollectionResponseNonNullableFields>;
2459
2621
  declare const onProjectInCollectionProjectOrderInCollectionUpdatedEvent$1: EventDefinition<ProjectInCollectionProjectOrderInCollectionUpdatedEnvelope, "wix.portfolio.projects.v1.project_in_collection_project_order_in_collection_updated_event">;
2460
2622
 
2461
- declare const queryProjectInCollections: BuildRESTFunction<typeof queryProjectInCollections$1>;
2462
- declare const updateProjectOrderInCollection: BuildRESTFunction<typeof updateProjectOrderInCollection$1>;
2623
+ declare const queryProjectInCollections: BuildRESTFunction$1<typeof queryProjectInCollections$1>;
2624
+ declare const updateProjectOrderInCollection: BuildRESTFunction$1<typeof updateProjectOrderInCollection$1>;
2463
2625
  declare const onProjectInCollectionProjectOrderInCollectionUpdatedEvent: BuildEventDefinition<typeof onProjectInCollectionProjectOrderInCollectionUpdatedEvent$1>;
2464
2626
 
2465
2627
  declare const context$1_onProjectInCollectionProjectOrderInCollectionUpdatedEvent: typeof onProjectInCollectionProjectOrderInCollectionUpdatedEvent;
@@ -2476,11 +2638,11 @@ interface SyncedProject {
2476
2638
  externalId?: string;
2477
2639
  /** Project name */
2478
2640
  title?: string | null;
2479
- /** google.protobuf.StringValue description = 4 [(wix.api.maxLength) = 1000]; // Project description */
2641
+ /** Project media count */
2480
2642
  mediaCount?: number;
2481
- /** project image url */
2643
+ /** Project image url */
2482
2644
  coverImage?: string | null;
2483
- /** project url in external */
2645
+ /** Project url in external */
2484
2646
  link?: string | null;
2485
2647
  /**
2486
2648
  * Represents the last time project was synced - returned only if external project is synced
@@ -2512,7 +2674,7 @@ interface CursorPaging {
2512
2674
  cursor?: string | null;
2513
2675
  }
2514
2676
  interface GetProjectsResponse {
2515
- /** provider appDefId */
2677
+ /** Provider appDefId */
2516
2678
  projects?: SyncedProject[];
2517
2679
  /** Paging metadata */
2518
2680
  metadata?: PagingMetadataV2;
@@ -2540,7 +2702,7 @@ interface SyncProjectResponse {
2540
2702
  project?: SyncedProject;
2541
2703
  }
2542
2704
  interface GetSyncStatusResponse {
2543
- /** provider appDefId */
2705
+ /** Provider appDefId */
2544
2706
  appDefId?: string;
2545
2707
  /** External Project ID */
2546
2708
  externalId?: string;
@@ -2548,15 +2710,15 @@ interface GetSyncStatusResponse {
2548
2710
  status?: SyncStatus;
2549
2711
  }
2550
2712
  interface StopSyncResponse {
2551
- /** provider appDefId */
2713
+ /** Provider appDefId */
2552
2714
  appDefId?: string;
2553
2715
  /** External Project ID */
2554
2716
  externalId?: string;
2555
2717
  }
2556
2718
  interface GetLoginRedirectableUrlResponse {
2557
- /** provider appDefId */
2719
+ /** Provider appDefId */
2558
2720
  appDefId?: string;
2559
- /** login url */
2721
+ /** Login url */
2560
2722
  url?: string;
2561
2723
  }
2562
2724
  interface GetProjectsResponseNonNullableFields {
@@ -2587,28 +2749,61 @@ interface GetLoginRedirectableUrlResponseNonNullableFields {
2587
2749
  url: string;
2588
2750
  }
2589
2751
  interface GetProjectsOptions {
2590
- /** paging */
2752
+ /** Paging */
2591
2753
  paging?: CursorPaging;
2592
2754
  }
2593
2755
  interface SyncProjectIdentifiers {
2594
- /** provider appDefId */
2756
+ /** Provider appDefId */
2595
2757
  appDefId: string;
2596
2758
  /** External Project ID */
2597
2759
  externalId: string;
2598
2760
  }
2599
2761
  interface GetSyncStatusIdentifiers {
2600
- /** provider appDefId */
2762
+ /** Provider appDefId */
2601
2763
  appDefId: string;
2602
2764
  /** External Project ID */
2603
2765
  externalId: string;
2604
2766
  }
2605
2767
  interface StopSyncIdentifiers {
2606
- /** provider appDefId */
2768
+ /** Provider appDefId */
2607
2769
  appDefId: string;
2608
2770
  /** External Project ID */
2609
2771
  externalId: string;
2610
2772
  }
2611
2773
 
2774
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2775
+ interface HttpClient {
2776
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2777
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2778
+ }
2779
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2780
+ type HttpResponse<T = any> = {
2781
+ data: T;
2782
+ status: number;
2783
+ statusText: string;
2784
+ headers: any;
2785
+ request?: any;
2786
+ };
2787
+ type RequestOptions<_TResponse = any, Data = any> = {
2788
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2789
+ url: string;
2790
+ data?: Data;
2791
+ params?: URLSearchParams;
2792
+ } & APIMetadata;
2793
+ type APIMetadata = {
2794
+ methodFqn?: string;
2795
+ entityFqdn?: string;
2796
+ packageName?: string;
2797
+ };
2798
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
2799
+
2800
+ declare global {
2801
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2802
+ interface SymbolConstructor {
2803
+ readonly observable: symbol;
2804
+ }
2805
+ }
2806
+
2612
2807
  declare function getProjects$1(httpClient: HttpClient): (appDefId: string, options?: GetProjectsOptions) => Promise<GetProjectsResponse & GetProjectsResponseNonNullableFields>;
2613
2808
  declare function syncProject$1(httpClient: HttpClient): (identifiers: SyncProjectIdentifiers) => Promise<SyncProjectResponse & SyncProjectResponseNonNullableFields>;
2614
2809
  declare function getSyncStatus$1(httpClient: HttpClient): (identifiers: GetSyncStatusIdentifiers) => Promise<GetSyncStatusResponse & GetSyncStatusResponseNonNullableFields>;