@wix/auto_sdk_portfolio_project-items 1.0.52 → 1.0.53

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.
@@ -156,6 +156,177 @@ 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
+ }
159
330
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
160
331
  /**
161
332
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -621,68 +792,6 @@ interface CreateProjectGalleryResponse {
621
792
  */
622
793
  galleryId?: string;
623
794
  }
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
- }
686
795
  interface Empty {
687
796
  }
688
797
  interface DeletedProjectRestored {
@@ -721,115 +830,6 @@ interface CloneFromOriginRequest {
721
830
  }
722
831
  interface CloneFromOriginResponse {
723
832
  }
724
- interface MessageEnvelope {
725
- /**
726
- * App instance ID.
727
- * @format GUID
728
- */
729
- instanceId?: string | null;
730
- /**
731
- * Event type.
732
- * @maxLength 150
733
- */
734
- eventType?: string;
735
- /** The identification type and identity data. */
736
- identity?: IdentificationData;
737
- /** Stringify payload. */
738
- data?: string;
739
- /** Details related to the account */
740
- accountInfo?: AccountInfo;
741
- }
742
- interface IdentificationData extends IdentificationDataIdOneOf {
743
- /**
744
- * ID of a site visitor that has not logged in to the site.
745
- * @format GUID
746
- */
747
- anonymousVisitorId?: string;
748
- /**
749
- * ID of a site visitor that has logged in to the site.
750
- * @format GUID
751
- */
752
- memberId?: string;
753
- /**
754
- * ID of a Wix user (site owner, contributor, etc.).
755
- * @format GUID
756
- */
757
- wixUserId?: string;
758
- /**
759
- * ID of an app.
760
- * @format GUID
761
- */
762
- appId?: string;
763
- /** @readonly */
764
- identityType?: WebhookIdentityTypeWithLiterals;
765
- }
766
- /** @oneof */
767
- interface IdentificationDataIdOneOf {
768
- /**
769
- * ID of a site visitor that has not logged in to the site.
770
- * @format GUID
771
- */
772
- anonymousVisitorId?: string;
773
- /**
774
- * ID of a site visitor that has logged in to the site.
775
- * @format GUID
776
- */
777
- memberId?: string;
778
- /**
779
- * ID of a Wix user (site owner, contributor, etc.).
780
- * @format GUID
781
- */
782
- wixUserId?: string;
783
- /**
784
- * ID of an app.
785
- * @format GUID
786
- */
787
- appId?: string;
788
- }
789
- declare enum WebhookIdentityType {
790
- UNKNOWN = "UNKNOWN",
791
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
792
- MEMBER = "MEMBER",
793
- WIX_USER = "WIX_USER",
794
- APP = "APP"
795
- }
796
- /** @enumType */
797
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
798
- interface AccountInfo {
799
- /**
800
- * ID of the Wix account associated with the event.
801
- * @format GUID
802
- */
803
- accountId?: string | null;
804
- /**
805
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
806
- * @format GUID
807
- */
808
- parentAccountId?: string | null;
809
- /**
810
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
811
- * @format GUID
812
- */
813
- siteId?: string | null;
814
- }
815
- interface GenerateTokenForProjectItemsRequest {
816
- /**
817
- * Media ids of requested project items
818
- * @minSize 1
819
- * @maxLength 100
820
- */
821
- mediaIds: string[];
822
- }
823
- interface GenerateTokenForProjectItemsResponse {
824
- /** Generated media tokens for project items */
825
- mediaTokens?: ProjectItemMediaToken[];
826
- }
827
- interface ProjectItemMediaToken {
828
- /** Media id of project item */
829
- mediaId?: string;
830
- /** Generated media token for project item */
831
- mediaToken?: string;
832
- }
833
833
  interface BaseEventMetadata {
834
834
  /**
835
835
  * App instance ID.
@@ -926,6 +926,16 @@ interface ProjectItemUpdatedEnvelope {
926
926
  * @slug updated
927
927
  */
928
928
  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`, 2>>;
929
939
  /**
930
940
  * Creates a project item.
931
941
  * @param item - Project item to create.
@@ -1128,15 +1138,5 @@ interface DuplicateProjectItemsOptions {
1128
1138
  */
1129
1139
  targetProjectId: string;
1130
1140
  }
1131
- /**
1132
- * Generate media token for project items
1133
- * @param mediaIds - Media ids of requested project items
1134
- * @public
1135
- * @requiredField mediaIds
1136
- * @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
1137
- * @applicableIdentity APP
1138
- * @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
1139
- */
1140
- declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 2>>;
1141
1141
 
1142
1142
  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 CloneFromOriginRequest, type CloneFromOriginResponse, 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 };
@@ -116,71 +116,6 @@ var TRANSFORM_PATHS_9 = [
116
116
  { path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate" },
117
117
  { path: "items.item.video.videoInfo.posters.urlExpirationDate" }
118
118
  ];
119
- function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
120
- const domainToMappings = {
121
- "manage._base_domain_": [
122
- {
123
- srcPath: "/_api/portfolio-app-service",
124
- destPath: "/api"
125
- }
126
- ],
127
- "editor._base_domain_": [
128
- {
129
- srcPath: "/_api/portfolio-app-service",
130
- destPath: "/api"
131
- }
132
- ],
133
- "blocks._base_domain_": [
134
- {
135
- srcPath: "/_api/portfolio-app-service",
136
- destPath: "/api"
137
- }
138
- ],
139
- "create.editorx": [
140
- {
141
- srcPath: "/_api/portfolio-app-service",
142
- destPath: "/api"
143
- }
144
- ],
145
- _: [
146
- {
147
- srcPath: "/_api/portfolio-app-service",
148
- destPath: "/api"
149
- }
150
- ],
151
- "api._api_base_domain_": [
152
- {
153
- srcPath: "/_api/portfolio-app-service",
154
- destPath: "/api"
155
- }
156
- ],
157
- "www.wixapis.com": [
158
- {
159
- srcPath: "/portfolio/v1/settings",
160
- destPath: "/api/v1/portfolio/settings"
161
- },
162
- {
163
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
164
- destPath: "/api/v1/portfolio/settings"
165
- },
166
- {
167
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
168
- destPath: "/api/v1/portfolio/project/items/media"
169
- }
170
- ],
171
- "*.dev.wix-code.com": [
172
- {
173
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
174
- destPath: "/api/v1/portfolio/settings"
175
- },
176
- {
177
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
178
- destPath: "/api/v1/portfolio/project/items/media"
179
- }
180
- ]
181
- };
182
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
183
- }
184
119
  function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
185
120
  const domainToMappings = {
186
121
  "manage._base_domain_": [
@@ -300,7 +235,93 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
300
235
  };
301
236
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
302
237
  }
238
+ function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
239
+ const domainToMappings = {
240
+ "manage._base_domain_": [
241
+ {
242
+ srcPath: "/_api/portfolio-app-service",
243
+ destPath: "/api"
244
+ }
245
+ ],
246
+ "editor._base_domain_": [
247
+ {
248
+ srcPath: "/_api/portfolio-app-service",
249
+ destPath: "/api"
250
+ }
251
+ ],
252
+ "blocks._base_domain_": [
253
+ {
254
+ srcPath: "/_api/portfolio-app-service",
255
+ destPath: "/api"
256
+ }
257
+ ],
258
+ "create.editorx": [
259
+ {
260
+ srcPath: "/_api/portfolio-app-service",
261
+ destPath: "/api"
262
+ }
263
+ ],
264
+ _: [
265
+ {
266
+ srcPath: "/_api/portfolio-app-service",
267
+ destPath: "/api"
268
+ }
269
+ ],
270
+ "api._api_base_domain_": [
271
+ {
272
+ srcPath: "/_api/portfolio-app-service",
273
+ destPath: "/api"
274
+ }
275
+ ],
276
+ "www.wixapis.com": [
277
+ {
278
+ srcPath: "/portfolio/v1/settings",
279
+ destPath: "/api/v1/portfolio/settings"
280
+ },
281
+ {
282
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
283
+ destPath: "/api/v1/portfolio/settings"
284
+ },
285
+ {
286
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
287
+ destPath: "/api/v1/portfolio/project/items/media"
288
+ }
289
+ ],
290
+ "*.dev.wix-code.com": [
291
+ {
292
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
293
+ destPath: "/api/v1/portfolio/settings"
294
+ },
295
+ {
296
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
297
+ destPath: "/api/v1/portfolio/project/items/media"
298
+ }
299
+ ]
300
+ };
301
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
302
+ }
303
303
  var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
304
+ function generateTokenForProjectItems(payload) {
305
+ function __generateTokenForProjectItems({ host }) {
306
+ const metadata = {
307
+ entityFqdn: "wix.portfolio.project_items.v1.project_item",
308
+ method: "POST",
309
+ methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
310
+ packageName: PACKAGE_NAME,
311
+ migrationOptions: {
312
+ optInTransformResponse: true
313
+ },
314
+ url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
315
+ protoPath: "/api/v1/portfolio/project/items/media",
316
+ data: payload,
317
+ host
318
+ }),
319
+ data: payload
320
+ };
321
+ return metadata;
322
+ }
323
+ return __generateTokenForProjectItems;
324
+ }
304
325
  function createProjectItem(payload) {
305
326
  function __createProjectItem({ host }) {
306
327
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -609,27 +630,6 @@ function duplicateProjectItems(payload) {
609
630
  }
610
631
  return __duplicateProjectItems;
611
632
  }
612
- function generateTokenForProjectItems(payload) {
613
- function __generateTokenForProjectItems({ host }) {
614
- const metadata = {
615
- entityFqdn: "wix.portfolio.project_items.v1.project_item",
616
- method: "POST",
617
- methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
618
- packageName: PACKAGE_NAME,
619
- migrationOptions: {
620
- optInTransformResponse: true
621
- },
622
- url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
623
- protoPath: "/api/v1/portfolio/project/items/media",
624
- data: payload,
625
- host
626
- }),
627
- data: payload
628
- };
629
- return metadata;
630
- }
631
- return __generateTokenForProjectItems;
632
- }
633
633
 
634
634
  // src/portfolio-project-items-v1-project-item-project-items.universal.ts
635
635
  var import_image = require("@wix/sdk-runtime/transformations/image");
@@ -657,11 +657,6 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
657
657
  ImageType2["EXTERNAL"] = "EXTERNAL";
658
658
  return ImageType2;
659
659
  })(ImageType || {});
660
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
661
- SortOrder2["ASC"] = "ASC";
662
- SortOrder2["DESC"] = "DESC";
663
- return SortOrder2;
664
- })(SortOrder || {});
665
660
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
666
661
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
667
662
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -670,6 +665,36 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
670
665
  WebhookIdentityType2["APP"] = "APP";
671
666
  return WebhookIdentityType2;
672
667
  })(WebhookIdentityType || {});
668
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
669
+ SortOrder2["ASC"] = "ASC";
670
+ SortOrder2["DESC"] = "DESC";
671
+ return SortOrder2;
672
+ })(SortOrder || {});
673
+ async function generateTokenForProjectItems2(mediaIds) {
674
+ const { httpClient, sideEffects } = arguments[1];
675
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
676
+ const reqOpts = generateTokenForProjectItems(
677
+ payload
678
+ );
679
+ sideEffects?.onSiteCall?.();
680
+ try {
681
+ const result = await httpClient.request(reqOpts);
682
+ sideEffects?.onSuccess?.(result);
683
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
684
+ } catch (err) {
685
+ const transformedError = (0, import_transform_error.transformError)(
686
+ err,
687
+ {
688
+ spreadPathsToArguments: {},
689
+ explicitPathsToArguments: { mediaIds: "$[0]" },
690
+ singleArgumentUnchanged: false
691
+ },
692
+ ["mediaIds"]
693
+ );
694
+ sideEffects?.onError?.(err);
695
+ throw transformedError;
696
+ }
697
+ }
673
698
  async function createProjectItem2(item) {
674
699
  const { httpClient, sideEffects } = arguments[1];
675
700
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -1022,31 +1047,6 @@ async function duplicateProjectItems2(originProjectId, options) {
1022
1047
  throw transformedError;
1023
1048
  }
1024
1049
  }
1025
- async function generateTokenForProjectItems2(mediaIds) {
1026
- const { httpClient, sideEffects } = arguments[1];
1027
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
1028
- const reqOpts = generateTokenForProjectItems(
1029
- payload
1030
- );
1031
- sideEffects?.onSiteCall?.();
1032
- try {
1033
- const result = await httpClient.request(reqOpts);
1034
- sideEffects?.onSuccess?.(result);
1035
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1036
- } catch (err) {
1037
- const transformedError = (0, import_transform_error.transformError)(
1038
- err,
1039
- {
1040
- spreadPathsToArguments: {},
1041
- explicitPathsToArguments: { mediaIds: "$[0]" },
1042
- singleArgumentUnchanged: false
1043
- },
1044
- ["mediaIds"]
1045
- );
1046
- sideEffects?.onError?.(err);
1047
- throw transformedError;
1048
- }
1049
- }
1050
1050
  // Annotate the CommonJS export names for ESM import in node:
1051
1051
  0 && (module.exports = {
1052
1052
  ImageType,