@wix/auto_sdk_portfolio_project-items 1.0.43 → 1.0.45

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 (49) hide show
  1. package/build/cjs/index.d.ts +10 -10
  2. package/build/cjs/index.js +124 -124
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +181 -187
  5. package/build/cjs/index.typings.js +116 -116
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +175 -175
  8. package/build/cjs/meta.js +111 -111
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +9 -9
  11. package/build/cjs/schemas.js +11 -11
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +10 -10
  14. package/build/es/index.mjs +124 -124
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +181 -187
  17. package/build/es/index.typings.mjs +116 -116
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +175 -175
  20. package/build/es/meta.mjs +111 -111
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +9 -9
  23. package/build/es/schemas.mjs +11 -11
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +10 -10
  26. package/build/internal/cjs/index.js +124 -124
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +181 -187
  29. package/build/internal/cjs/index.typings.js +116 -116
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +175 -175
  32. package/build/internal/cjs/meta.js +111 -111
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +9 -9
  35. package/build/internal/cjs/schemas.js +11 -11
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +10 -10
  38. package/build/internal/es/index.mjs +124 -124
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +181 -187
  41. package/build/internal/es/index.typings.mjs +116 -116
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +175 -175
  44. package/build/internal/es/meta.mjs +111 -111
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +9 -9
  47. package/build/internal/es/schemas.mjs +11 -11
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -156,177 +156,6 @@ interface Link {
156
156
  */
157
157
  target?: string | null;
158
158
  }
159
- interface GenerateTokenForProjectItemsRequest {
160
- /**
161
- * Media ids of requested project items
162
- * @minSize 1
163
- * @maxLength 100
164
- */
165
- mediaIds: string[];
166
- }
167
- interface GenerateTokenForProjectItemsResponse {
168
- /** Generated media tokens for project items */
169
- mediaTokens?: ProjectItemMediaToken[];
170
- }
171
- interface ProjectItemMediaToken {
172
- /** Media id of project item */
173
- mediaId?: string;
174
- /** Generated media token for project item */
175
- mediaToken?: string;
176
- }
177
- interface DomainEvent extends DomainEventBodyOneOf {
178
- createdEvent?: EntityCreatedEvent;
179
- updatedEvent?: EntityUpdatedEvent;
180
- deletedEvent?: EntityDeletedEvent;
181
- actionEvent?: ActionEvent;
182
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
183
- _id?: string;
184
- /**
185
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
186
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
187
- */
188
- entityFqdn?: string;
189
- /**
190
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
191
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
192
- */
193
- slug?: string;
194
- /** ID of the entity associated with the event. */
195
- entityId?: string;
196
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
197
- eventTime?: Date | null;
198
- /**
199
- * Whether the event was triggered as a result of a privacy regulation application
200
- * (for example, GDPR).
201
- */
202
- triggeredByAnonymizeRequest?: boolean | null;
203
- /** If present, indicates the action that triggered the event. */
204
- originatedFrom?: string | null;
205
- /**
206
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
207
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
208
- */
209
- entityEventSequence?: string | null;
210
- }
211
- /** @oneof */
212
- interface DomainEventBodyOneOf {
213
- createdEvent?: EntityCreatedEvent;
214
- updatedEvent?: EntityUpdatedEvent;
215
- deletedEvent?: EntityDeletedEvent;
216
- actionEvent?: ActionEvent;
217
- }
218
- interface EntityCreatedEvent {
219
- entity?: string;
220
- }
221
- interface RestoreInfo {
222
- deletedDate?: Date | null;
223
- }
224
- interface EntityUpdatedEvent {
225
- /**
226
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
227
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
228
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
229
- */
230
- currentEntity?: string;
231
- }
232
- interface EntityDeletedEvent {
233
- /** Entity that was deleted. */
234
- deletedEntity?: string | null;
235
- }
236
- interface ActionEvent {
237
- body?: string;
238
- }
239
- interface MessageEnvelope {
240
- /**
241
- * App instance ID.
242
- * @format GUID
243
- */
244
- instanceId?: string | null;
245
- /**
246
- * Event type.
247
- * @maxLength 150
248
- */
249
- eventType?: string;
250
- /** The identification type and identity data. */
251
- identity?: IdentificationData;
252
- /** Stringify payload. */
253
- data?: string;
254
- /** Details related to the account */
255
- accountInfo?: AccountInfo;
256
- }
257
- interface IdentificationData extends IdentificationDataIdOneOf {
258
- /**
259
- * ID of a site visitor that has not logged in to the site.
260
- * @format GUID
261
- */
262
- anonymousVisitorId?: string;
263
- /**
264
- * ID of a site visitor that has logged in to the site.
265
- * @format GUID
266
- */
267
- memberId?: string;
268
- /**
269
- * ID of a Wix user (site owner, contributor, etc.).
270
- * @format GUID
271
- */
272
- wixUserId?: string;
273
- /**
274
- * ID of an app.
275
- * @format GUID
276
- */
277
- appId?: string;
278
- /** @readonly */
279
- identityType?: WebhookIdentityTypeWithLiterals;
280
- }
281
- /** @oneof */
282
- interface IdentificationDataIdOneOf {
283
- /**
284
- * ID of a site visitor that has not logged in to the site.
285
- * @format GUID
286
- */
287
- anonymousVisitorId?: string;
288
- /**
289
- * ID of a site visitor that has logged in to the site.
290
- * @format GUID
291
- */
292
- memberId?: string;
293
- /**
294
- * ID of a Wix user (site owner, contributor, etc.).
295
- * @format GUID
296
- */
297
- wixUserId?: string;
298
- /**
299
- * ID of an app.
300
- * @format GUID
301
- */
302
- appId?: string;
303
- }
304
- declare enum WebhookIdentityType {
305
- UNKNOWN = "UNKNOWN",
306
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
307
- MEMBER = "MEMBER",
308
- WIX_USER = "WIX_USER",
309
- APP = "APP"
310
- }
311
- /** @enumType */
312
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
313
- interface AccountInfo {
314
- /**
315
- * ID of the Wix account associated with the event.
316
- * @format GUID
317
- */
318
- accountId?: string | null;
319
- /**
320
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
321
- * @format GUID
322
- */
323
- parentAccountId?: string | null;
324
- /**
325
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
326
- * @format GUID
327
- */
328
- siteId?: string | null;
329
- }
330
159
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
331
160
  /**
332
161
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -792,6 +621,68 @@ interface CreateProjectGalleryResponse {
792
621
  */
793
622
  galleryId?: string;
794
623
  }
624
+ interface DomainEvent extends DomainEventBodyOneOf {
625
+ createdEvent?: EntityCreatedEvent;
626
+ updatedEvent?: EntityUpdatedEvent;
627
+ deletedEvent?: EntityDeletedEvent;
628
+ actionEvent?: ActionEvent;
629
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
630
+ _id?: string;
631
+ /**
632
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
633
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
634
+ */
635
+ entityFqdn?: string;
636
+ /**
637
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
638
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
639
+ */
640
+ slug?: string;
641
+ /** ID of the entity associated with the event. */
642
+ entityId?: string;
643
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
644
+ eventTime?: Date | null;
645
+ /**
646
+ * Whether the event was triggered as a result of a privacy regulation application
647
+ * (for example, GDPR).
648
+ */
649
+ triggeredByAnonymizeRequest?: boolean | null;
650
+ /** If present, indicates the action that triggered the event. */
651
+ originatedFrom?: string | null;
652
+ /**
653
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
654
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
655
+ */
656
+ entityEventSequence?: string | null;
657
+ }
658
+ /** @oneof */
659
+ interface DomainEventBodyOneOf {
660
+ createdEvent?: EntityCreatedEvent;
661
+ updatedEvent?: EntityUpdatedEvent;
662
+ deletedEvent?: EntityDeletedEvent;
663
+ actionEvent?: ActionEvent;
664
+ }
665
+ interface EntityCreatedEvent {
666
+ entity?: string;
667
+ }
668
+ interface RestoreInfo {
669
+ deletedDate?: Date | null;
670
+ }
671
+ interface EntityUpdatedEvent {
672
+ /**
673
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
674
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
675
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
676
+ */
677
+ currentEntity?: string;
678
+ }
679
+ interface EntityDeletedEvent {
680
+ /** Entity that was deleted. */
681
+ deletedEntity?: string | null;
682
+ }
683
+ interface ActionEvent {
684
+ body?: string;
685
+ }
795
686
  interface Empty {
796
687
  }
797
688
  interface DeletedProjectRestored {
@@ -824,6 +715,115 @@ interface DuplicateProjectItemsResponse {
824
715
  /** Bulk action metadata. */
825
716
  bulkActionMetadata?: BulkActionMetadata;
826
717
  }
718
+ interface MessageEnvelope {
719
+ /**
720
+ * App instance ID.
721
+ * @format GUID
722
+ */
723
+ instanceId?: string | null;
724
+ /**
725
+ * Event type.
726
+ * @maxLength 150
727
+ */
728
+ eventType?: string;
729
+ /** The identification type and identity data. */
730
+ identity?: IdentificationData;
731
+ /** Stringify payload. */
732
+ data?: string;
733
+ /** Details related to the account */
734
+ accountInfo?: AccountInfo;
735
+ }
736
+ interface IdentificationData extends IdentificationDataIdOneOf {
737
+ /**
738
+ * ID of a site visitor that has not logged in to the site.
739
+ * @format GUID
740
+ */
741
+ anonymousVisitorId?: string;
742
+ /**
743
+ * ID of a site visitor that has logged in to the site.
744
+ * @format GUID
745
+ */
746
+ memberId?: string;
747
+ /**
748
+ * ID of a Wix user (site owner, contributor, etc.).
749
+ * @format GUID
750
+ */
751
+ wixUserId?: string;
752
+ /**
753
+ * ID of an app.
754
+ * @format GUID
755
+ */
756
+ appId?: string;
757
+ /** @readonly */
758
+ identityType?: WebhookIdentityTypeWithLiterals;
759
+ }
760
+ /** @oneof */
761
+ interface IdentificationDataIdOneOf {
762
+ /**
763
+ * ID of a site visitor that has not logged in to the site.
764
+ * @format GUID
765
+ */
766
+ anonymousVisitorId?: string;
767
+ /**
768
+ * ID of a site visitor that has logged in to the site.
769
+ * @format GUID
770
+ */
771
+ memberId?: string;
772
+ /**
773
+ * ID of a Wix user (site owner, contributor, etc.).
774
+ * @format GUID
775
+ */
776
+ wixUserId?: string;
777
+ /**
778
+ * ID of an app.
779
+ * @format GUID
780
+ */
781
+ appId?: string;
782
+ }
783
+ declare enum WebhookIdentityType {
784
+ UNKNOWN = "UNKNOWN",
785
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
786
+ MEMBER = "MEMBER",
787
+ WIX_USER = "WIX_USER",
788
+ APP = "APP"
789
+ }
790
+ /** @enumType */
791
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
792
+ interface AccountInfo {
793
+ /**
794
+ * ID of the Wix account associated with the event.
795
+ * @format GUID
796
+ */
797
+ accountId?: string | null;
798
+ /**
799
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
800
+ * @format GUID
801
+ */
802
+ parentAccountId?: string | null;
803
+ /**
804
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
805
+ * @format GUID
806
+ */
807
+ siteId?: string | null;
808
+ }
809
+ interface GenerateTokenForProjectItemsRequest {
810
+ /**
811
+ * Media ids of requested project items
812
+ * @minSize 1
813
+ * @maxLength 100
814
+ */
815
+ mediaIds: string[];
816
+ }
817
+ interface GenerateTokenForProjectItemsResponse {
818
+ /** Generated media tokens for project items */
819
+ mediaTokens?: ProjectItemMediaToken[];
820
+ }
821
+ interface ProjectItemMediaToken {
822
+ /** Media id of project item */
823
+ mediaId?: string;
824
+ /** Generated media token for project item */
825
+ mediaToken?: string;
826
+ }
827
827
  interface BaseEventMetadata {
828
828
  /**
829
829
  * App instance ID.
@@ -885,8 +885,6 @@ interface ProjectItemCreatedEnvelope {
885
885
  }
886
886
  /**
887
887
  * Triggered when a project item is created.
888
- * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read
889
- * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ
890
888
  * @permissionScope Manage Portfolio
891
889
  * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
892
890
  * @permissionId PORTFOLIO.PROJECT_ITEM_READ
@@ -900,8 +898,6 @@ interface ProjectItemDeletedEnvelope {
900
898
  }
901
899
  /**
902
900
  * Triggered when a project item is deleted.
903
- * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read
904
- * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ
905
901
  * @permissionScope Manage Portfolio
906
902
  * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
907
903
  * @permissionId PORTFOLIO.PROJECT_ITEM_READ
@@ -916,8 +912,6 @@ interface ProjectItemUpdatedEnvelope {
916
912
  }
917
913
  /**
918
914
  * Triggered when a project item is updated.
919
- * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read
920
- * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ
921
915
  * @permissionScope Manage Portfolio
922
916
  * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
923
917
  * @permissionId PORTFOLIO.PROJECT_ITEM_READ
@@ -926,16 +920,6 @@ interface ProjectItemUpdatedEnvelope {
926
920
  * @slug updated
927
921
  */
928
922
  declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise<void>): void;
929
- /**
930
- * Generate media token for project items
931
- * @param mediaIds - Media ids of requested project items
932
- * @public
933
- * @requiredField mediaIds
934
- * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
935
- * @applicableIdentity APP
936
- * @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
937
- */
938
- declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 4>>;
939
923
  /**
940
924
  * Creates a project item.
941
925
  * @param item - Project item to create.
@@ -1138,5 +1122,15 @@ interface DuplicateProjectItemsOptions {
1138
1122
  */
1139
1123
  targetProjectId: string;
1140
1124
  }
1125
+ /**
1126
+ * Generate media token for project items
1127
+ * @param mediaIds - Media ids of requested project items
1128
+ * @public
1129
+ * @requiredField mediaIds
1130
+ * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
1131
+ * @applicableIdentity APP
1132
+ * @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
1133
+ */
1134
+ declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 4>>;
1141
1135
 
1142
1136
  export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateProjectItemResult, type BulkCreateProjectItemsOptions, type BulkCreateProjectItemsRequest, type BulkCreateProjectItemsResponse, type BulkDeleteProjectItemResult, type BulkDeleteProjectItemsOptions, type BulkDeleteProjectItemsRequest, type BulkDeleteProjectItemsResponse, type BulkUpdateProjectItemResult, type BulkUpdateProjectItemsOptions, type BulkUpdateProjectItemsRequest, type BulkUpdateProjectItemsResponse, type CreateProjectGalleryRequest, type CreateProjectGalleryResponse, type CreateProjectItemRequest, type CreateProjectItemResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteProjectItemRequest, type DeleteProjectItemResponse, type DeletedProjectRestored, type DomainEvent, type DomainEventBodyOneOf, type DuplicateProjectItemsOptions, type DuplicateProjectItemsRequest, type DuplicateProjectItemsResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type GenerateTokenForProjectItemsRequest, type GenerateTokenForProjectItemsResponse, type GetProjectItemRequest, type GetProjectItemResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type InvalidateCache, type InvalidateCacheGetByOneOf, type Item, type ItemMetadata, type ItemMetadataOneOf, type Link, type ListProjectItemsOptions, type ListProjectItemsRequest, type ListProjectItemsResponse, type MaskedItem, type MessageEnvelope, type Page, type Pages, type Paging, type PagingMetadataV2, type Point, type ProjectItemCreatedEnvelope, type ProjectItemDeletedEnvelope, type ProjectItemMediaToken, type ProjectItemUpdatedEnvelope, type QueryProjectItemsRequest, type QueryProjectItemsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Tags, Type, type TypeWithLiterals, type URI, type URIs, type UnsharpMasking, type UpdateProjectItem, type UpdateProjectItemRequest, type UpdateProjectItemResponse, type Video, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateProjectItems, bulkDeleteProjectItems, bulkUpdateProjectItems, createProjectItem, deleteProjectItem, duplicateProjectItems, generateTokenForProjectItems, getProjectItem, listProjectItems, onProjectItemCreated, onProjectItemDeleted, onProjectItemUpdated, updateProjectItem };
@@ -14,6 +14,71 @@ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transform
14
14
  import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
15
15
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
16
16
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
+ function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
18
+ const domainToMappings = {
19
+ "manage._base_domain_": [
20
+ {
21
+ srcPath: "/_api/portfolio-app-service",
22
+ destPath: "/api"
23
+ }
24
+ ],
25
+ "editor._base_domain_": [
26
+ {
27
+ srcPath: "/_api/portfolio-app-service",
28
+ destPath: "/api"
29
+ }
30
+ ],
31
+ "blocks._base_domain_": [
32
+ {
33
+ srcPath: "/_api/portfolio-app-service",
34
+ destPath: "/api"
35
+ }
36
+ ],
37
+ "create.editorx": [
38
+ {
39
+ srcPath: "/_api/portfolio-app-service",
40
+ destPath: "/api"
41
+ }
42
+ ],
43
+ _: [
44
+ {
45
+ srcPath: "/_api/portfolio-app-service",
46
+ destPath: "/api"
47
+ }
48
+ ],
49
+ "api._api_base_domain_": [
50
+ {
51
+ srcPath: "/_api/portfolio-app-service",
52
+ destPath: "/api"
53
+ }
54
+ ],
55
+ "www.wixapis.com": [
56
+ {
57
+ srcPath: "/portfolio/v1/settings",
58
+ destPath: "/api/v1/portfolio/settings"
59
+ },
60
+ {
61
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
62
+ destPath: "/api/v1/portfolio/settings"
63
+ },
64
+ {
65
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
66
+ destPath: "/api/v1/portfolio/project/items/media"
67
+ }
68
+ ],
69
+ "*.dev.wix-code.com": [
70
+ {
71
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
72
+ destPath: "/api/v1/portfolio/settings"
73
+ },
74
+ {
75
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
76
+ destPath: "/api/v1/portfolio/project/items/media"
77
+ }
78
+ ]
79
+ };
80
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
81
+ }
17
82
  function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
18
83
  const domainToMappings = {
19
84
  "manage._base_domain_": [
@@ -133,93 +198,7 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
133
198
  };
134
199
  return resolveUrl(Object.assign(opts, { domainToMappings }));
135
200
  }
136
- function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
137
- const domainToMappings = {
138
- "manage._base_domain_": [
139
- {
140
- srcPath: "/_api/portfolio-app-service",
141
- destPath: "/api"
142
- }
143
- ],
144
- "editor._base_domain_": [
145
- {
146
- srcPath: "/_api/portfolio-app-service",
147
- destPath: "/api"
148
- }
149
- ],
150
- "blocks._base_domain_": [
151
- {
152
- srcPath: "/_api/portfolio-app-service",
153
- destPath: "/api"
154
- }
155
- ],
156
- "create.editorx": [
157
- {
158
- srcPath: "/_api/portfolio-app-service",
159
- destPath: "/api"
160
- }
161
- ],
162
- _: [
163
- {
164
- srcPath: "/_api/portfolio-app-service",
165
- destPath: "/api"
166
- }
167
- ],
168
- "api._api_base_domain_": [
169
- {
170
- srcPath: "/_api/portfolio-app-service",
171
- destPath: "/api"
172
- }
173
- ],
174
- "www.wixapis.com": [
175
- {
176
- srcPath: "/portfolio/v1/settings",
177
- destPath: "/api/v1/portfolio/settings"
178
- },
179
- {
180
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
181
- destPath: "/api/v1/portfolio/settings"
182
- },
183
- {
184
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
185
- destPath: "/api/v1/portfolio/project/items/media"
186
- }
187
- ],
188
- "*.dev.wix-code.com": [
189
- {
190
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
191
- destPath: "/api/v1/portfolio/settings"
192
- },
193
- {
194
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
195
- destPath: "/api/v1/portfolio/project/items/media"
196
- }
197
- ]
198
- };
199
- return resolveUrl(Object.assign(opts, { domainToMappings }));
200
- }
201
201
  var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
202
- function generateTokenForProjectItems(payload) {
203
- function __generateTokenForProjectItems({ host }) {
204
- const metadata = {
205
- entityFqdn: "wix.portfolio.project_items.v1.project_item",
206
- method: "POST",
207
- methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
208
- packageName: PACKAGE_NAME,
209
- migrationOptions: {
210
- optInTransformResponse: true
211
- },
212
- url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
213
- protoPath: "/api/v1/portfolio/project/items/media",
214
- data: payload,
215
- host
216
- }),
217
- data: payload
218
- };
219
- return metadata;
220
- }
221
- return __generateTokenForProjectItems;
222
- }
223
202
  function createProjectItem(payload) {
224
203
  function __createProjectItem({ host }) {
225
204
  const serializedData = transformPaths(payload, [
@@ -688,6 +667,27 @@ function duplicateProjectItems(payload) {
688
667
  }
689
668
  return __duplicateProjectItems;
690
669
  }
670
+ function generateTokenForProjectItems(payload) {
671
+ function __generateTokenForProjectItems({ host }) {
672
+ const metadata = {
673
+ entityFqdn: "wix.portfolio.project_items.v1.project_item",
674
+ method: "POST",
675
+ methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
676
+ packageName: PACKAGE_NAME,
677
+ migrationOptions: {
678
+ optInTransformResponse: true
679
+ },
680
+ url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
681
+ protoPath: "/api/v1/portfolio/project/items/media",
682
+ data: payload,
683
+ host
684
+ }),
685
+ data: payload
686
+ };
687
+ return metadata;
688
+ }
689
+ return __generateTokenForProjectItems;
690
+ }
691
691
 
692
692
  // src/portfolio-project-items-v1-project-item-project-items.universal.ts
693
693
  import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
@@ -707,6 +707,11 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
707
707
  ImageType2["EXTERNAL"] = "EXTERNAL";
708
708
  return ImageType2;
709
709
  })(ImageType || {});
710
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
711
+ SortOrder2["ASC"] = "ASC";
712
+ SortOrder2["DESC"] = "DESC";
713
+ return SortOrder2;
714
+ })(SortOrder || {});
710
715
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
711
716
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
712
717
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -715,36 +720,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
715
720
  WebhookIdentityType2["APP"] = "APP";
716
721
  return WebhookIdentityType2;
717
722
  })(WebhookIdentityType || {});
718
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
719
- SortOrder2["ASC"] = "ASC";
720
- SortOrder2["DESC"] = "DESC";
721
- return SortOrder2;
722
- })(SortOrder || {});
723
- async function generateTokenForProjectItems2(mediaIds) {
724
- const { httpClient, sideEffects } = arguments[1];
725
- const payload = renameKeysFromSDKRequestToRESTRequest({ mediaIds });
726
- const reqOpts = generateTokenForProjectItems(
727
- payload
728
- );
729
- sideEffects?.onSiteCall?.();
730
- try {
731
- const result = await httpClient.request(reqOpts);
732
- sideEffects?.onSuccess?.(result);
733
- return renameKeysFromRESTResponseToSDKResponse(result.data);
734
- } catch (err) {
735
- const transformedError = sdkTransformError(
736
- err,
737
- {
738
- spreadPathsToArguments: {},
739
- explicitPathsToArguments: { mediaIds: "$[0]" },
740
- singleArgumentUnchanged: false
741
- },
742
- ["mediaIds"]
743
- );
744
- sideEffects?.onError?.(err);
745
- throw transformedError;
746
- }
747
- }
748
723
  async function createProjectItem2(item) {
749
724
  const { httpClient, sideEffects } = arguments[1];
750
725
  const payload = transformPaths2(
@@ -1097,6 +1072,31 @@ async function duplicateProjectItems2(originProjectId, options) {
1097
1072
  throw transformedError;
1098
1073
  }
1099
1074
  }
1075
+ async function generateTokenForProjectItems2(mediaIds) {
1076
+ const { httpClient, sideEffects } = arguments[1];
1077
+ const payload = renameKeysFromSDKRequestToRESTRequest({ mediaIds });
1078
+ const reqOpts = generateTokenForProjectItems(
1079
+ payload
1080
+ );
1081
+ sideEffects?.onSiteCall?.();
1082
+ try {
1083
+ const result = await httpClient.request(reqOpts);
1084
+ sideEffects?.onSuccess?.(result);
1085
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1086
+ } catch (err) {
1087
+ const transformedError = sdkTransformError(
1088
+ err,
1089
+ {
1090
+ spreadPathsToArguments: {},
1091
+ explicitPathsToArguments: { mediaIds: "$[0]" },
1092
+ singleArgumentUnchanged: false
1093
+ },
1094
+ ["mediaIds"]
1095
+ );
1096
+ sideEffects?.onError?.(err);
1097
+ throw transformedError;
1098
+ }
1099
+ }
1100
1100
  export {
1101
1101
  ImageType,
1102
1102
  SortOrder,