@wix/auto_sdk_portfolio_project-items 1.0.49 → 1.0.50
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/build/cjs/index.d.ts +10 -10
- package/build/cjs/index.js +124 -124
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +181 -181
- package/build/cjs/index.typings.js +116 -116
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +175 -175
- package/build/cjs/meta.js +111 -111
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +124 -124
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +181 -181
- package/build/es/index.typings.mjs +116 -116
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +175 -175
- package/build/es/meta.mjs +111 -111
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.typings.d.ts +181 -181
- package/build/internal/cjs/meta.d.ts +217 -217
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.typings.d.mts +181 -181
- package/build/internal/es/meta.d.mts +217 -217
- package/package.json +2 -2
|
@@ -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 {
|
|
@@ -715,115 +824,6 @@ interface DuplicateProjectItemsResponse {
|
|
|
715
824
|
/** Bulk action metadata. */
|
|
716
825
|
bulkActionMetadata?: BulkActionMetadata;
|
|
717
826
|
}
|
|
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.
|
|
@@ -920,6 +920,16 @@ interface ProjectItemUpdatedEnvelope {
|
|
|
920
920
|
* @slug updated
|
|
921
921
|
*/
|
|
922
922
|
declare function onProjectItemUpdated(handler: (event: ProjectItemUpdatedEnvelope) => void | Promise<void>): void;
|
|
923
|
+
/**
|
|
924
|
+
* Generate media token for project items
|
|
925
|
+
* @param mediaIds - Media ids of requested project items
|
|
926
|
+
* @public
|
|
927
|
+
* @requiredField mediaIds
|
|
928
|
+
* @permissionId PORTFOLIO.PROJECT_ITEM_CREATE
|
|
929
|
+
* @applicableIdentity APP
|
|
930
|
+
* @fqn com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems
|
|
931
|
+
*/
|
|
932
|
+
declare function generateTokenForProjectItems(mediaIds: string[]): Promise<NonNullablePaths<GenerateTokenForProjectItemsResponse, `mediaTokens` | `mediaTokens.${number}.mediaId` | `mediaTokens.${number}.mediaToken`, 4>>;
|
|
923
933
|
/**
|
|
924
934
|
* Creates a project item.
|
|
925
935
|
* @param item - Project item to create.
|
|
@@ -1122,15 +1132,5 @@ interface DuplicateProjectItemsOptions {
|
|
|
1122
1132
|
*/
|
|
1123
1133
|
targetProjectId: string;
|
|
1124
1134
|
}
|
|
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>>;
|
|
1135
1135
|
|
|
1136
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 };
|
|
@@ -50,71 +50,6 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
50
50
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
51
51
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
52
52
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
53
|
-
function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
|
|
54
|
-
const domainToMappings = {
|
|
55
|
-
"manage._base_domain_": [
|
|
56
|
-
{
|
|
57
|
-
srcPath: "/_api/portfolio-app-service",
|
|
58
|
-
destPath: "/api"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"editor._base_domain_": [
|
|
62
|
-
{
|
|
63
|
-
srcPath: "/_api/portfolio-app-service",
|
|
64
|
-
destPath: "/api"
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"blocks._base_domain_": [
|
|
68
|
-
{
|
|
69
|
-
srcPath: "/_api/portfolio-app-service",
|
|
70
|
-
destPath: "/api"
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"create.editorx": [
|
|
74
|
-
{
|
|
75
|
-
srcPath: "/_api/portfolio-app-service",
|
|
76
|
-
destPath: "/api"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
_: [
|
|
80
|
-
{
|
|
81
|
-
srcPath: "/_api/portfolio-app-service",
|
|
82
|
-
destPath: "/api"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"api._api_base_domain_": [
|
|
86
|
-
{
|
|
87
|
-
srcPath: "/_api/portfolio-app-service",
|
|
88
|
-
destPath: "/api"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"www.wixapis.com": [
|
|
92
|
-
{
|
|
93
|
-
srcPath: "/portfolio/v1/settings",
|
|
94
|
-
destPath: "/api/v1/portfolio/settings"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
98
|
-
destPath: "/api/v1/portfolio/settings"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
102
|
-
destPath: "/api/v1/portfolio/project/items/media"
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"*.dev.wix-code.com": [
|
|
106
|
-
{
|
|
107
|
-
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
108
|
-
destPath: "/api/v1/portfolio/settings"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
112
|
-
destPath: "/api/v1/portfolio/project/items/media"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
};
|
|
116
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
117
|
-
}
|
|
118
53
|
function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
|
|
119
54
|
const domainToMappings = {
|
|
120
55
|
"manage._base_domain_": [
|
|
@@ -234,7 +169,93 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
|
|
|
234
169
|
};
|
|
235
170
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
236
171
|
}
|
|
172
|
+
function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
|
|
173
|
+
const domainToMappings = {
|
|
174
|
+
"manage._base_domain_": [
|
|
175
|
+
{
|
|
176
|
+
srcPath: "/_api/portfolio-app-service",
|
|
177
|
+
destPath: "/api"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"editor._base_domain_": [
|
|
181
|
+
{
|
|
182
|
+
srcPath: "/_api/portfolio-app-service",
|
|
183
|
+
destPath: "/api"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"blocks._base_domain_": [
|
|
187
|
+
{
|
|
188
|
+
srcPath: "/_api/portfolio-app-service",
|
|
189
|
+
destPath: "/api"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"create.editorx": [
|
|
193
|
+
{
|
|
194
|
+
srcPath: "/_api/portfolio-app-service",
|
|
195
|
+
destPath: "/api"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
_: [
|
|
199
|
+
{
|
|
200
|
+
srcPath: "/_api/portfolio-app-service",
|
|
201
|
+
destPath: "/api"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"api._api_base_domain_": [
|
|
205
|
+
{
|
|
206
|
+
srcPath: "/_api/portfolio-app-service",
|
|
207
|
+
destPath: "/api"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"www.wixapis.com": [
|
|
211
|
+
{
|
|
212
|
+
srcPath: "/portfolio/v1/settings",
|
|
213
|
+
destPath: "/api/v1/portfolio/settings"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
217
|
+
destPath: "/api/v1/portfolio/settings"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
221
|
+
destPath: "/api/v1/portfolio/project/items/media"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"*.dev.wix-code.com": [
|
|
225
|
+
{
|
|
226
|
+
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
227
|
+
destPath: "/api/v1/portfolio/settings"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
231
|
+
destPath: "/api/v1/portfolio/project/items/media"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
};
|
|
235
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
236
|
+
}
|
|
237
237
|
var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
|
|
238
|
+
function generateTokenForProjectItems(payload) {
|
|
239
|
+
function __generateTokenForProjectItems({ host }) {
|
|
240
|
+
const metadata = {
|
|
241
|
+
entityFqdn: "wix.portfolio.project_items.v1.project_item",
|
|
242
|
+
method: "POST",
|
|
243
|
+
methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
|
|
244
|
+
packageName: PACKAGE_NAME,
|
|
245
|
+
migrationOptions: {
|
|
246
|
+
optInTransformResponse: true
|
|
247
|
+
},
|
|
248
|
+
url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
|
|
249
|
+
protoPath: "/api/v1/portfolio/project/items/media",
|
|
250
|
+
data: payload,
|
|
251
|
+
host
|
|
252
|
+
}),
|
|
253
|
+
data: payload
|
|
254
|
+
};
|
|
255
|
+
return metadata;
|
|
256
|
+
}
|
|
257
|
+
return __generateTokenForProjectItems;
|
|
258
|
+
}
|
|
238
259
|
function createProjectItem(payload) {
|
|
239
260
|
function __createProjectItem({ host }) {
|
|
240
261
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -703,27 +724,6 @@ function duplicateProjectItems(payload) {
|
|
|
703
724
|
}
|
|
704
725
|
return __duplicateProjectItems;
|
|
705
726
|
}
|
|
706
|
-
function generateTokenForProjectItems(payload) {
|
|
707
|
-
function __generateTokenForProjectItems({ host }) {
|
|
708
|
-
const metadata = {
|
|
709
|
-
entityFqdn: "wix.portfolio.project_items.v1.project_item",
|
|
710
|
-
method: "POST",
|
|
711
|
-
methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
|
|
712
|
-
packageName: PACKAGE_NAME,
|
|
713
|
-
migrationOptions: {
|
|
714
|
-
optInTransformResponse: true
|
|
715
|
-
},
|
|
716
|
-
url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
|
|
717
|
-
protoPath: "/api/v1/portfolio/project/items/media",
|
|
718
|
-
data: payload,
|
|
719
|
-
host
|
|
720
|
-
}),
|
|
721
|
-
data: payload
|
|
722
|
-
};
|
|
723
|
-
return metadata;
|
|
724
|
-
}
|
|
725
|
-
return __generateTokenForProjectItems;
|
|
726
|
-
}
|
|
727
727
|
|
|
728
728
|
// src/portfolio-project-items-v1-project-item-project-items.universal.ts
|
|
729
729
|
var import_image = require("@wix/sdk-runtime/transformations/image");
|
|
@@ -743,11 +743,6 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
|
|
|
743
743
|
ImageType2["EXTERNAL"] = "EXTERNAL";
|
|
744
744
|
return ImageType2;
|
|
745
745
|
})(ImageType || {});
|
|
746
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
747
|
-
SortOrder2["ASC"] = "ASC";
|
|
748
|
-
SortOrder2["DESC"] = "DESC";
|
|
749
|
-
return SortOrder2;
|
|
750
|
-
})(SortOrder || {});
|
|
751
746
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
752
747
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
753
748
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -756,6 +751,36 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
756
751
|
WebhookIdentityType2["APP"] = "APP";
|
|
757
752
|
return WebhookIdentityType2;
|
|
758
753
|
})(WebhookIdentityType || {});
|
|
754
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
755
|
+
SortOrder2["ASC"] = "ASC";
|
|
756
|
+
SortOrder2["DESC"] = "DESC";
|
|
757
|
+
return SortOrder2;
|
|
758
|
+
})(SortOrder || {});
|
|
759
|
+
async function generateTokenForProjectItems2(mediaIds) {
|
|
760
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
761
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
|
|
762
|
+
const reqOpts = generateTokenForProjectItems(
|
|
763
|
+
payload
|
|
764
|
+
);
|
|
765
|
+
sideEffects?.onSiteCall?.();
|
|
766
|
+
try {
|
|
767
|
+
const result = await httpClient.request(reqOpts);
|
|
768
|
+
sideEffects?.onSuccess?.(result);
|
|
769
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
770
|
+
} catch (err) {
|
|
771
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
772
|
+
err,
|
|
773
|
+
{
|
|
774
|
+
spreadPathsToArguments: {},
|
|
775
|
+
explicitPathsToArguments: { mediaIds: "$[0]" },
|
|
776
|
+
singleArgumentUnchanged: false
|
|
777
|
+
},
|
|
778
|
+
["mediaIds"]
|
|
779
|
+
);
|
|
780
|
+
sideEffects?.onError?.(err);
|
|
781
|
+
throw transformedError;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
759
784
|
async function createProjectItem2(item) {
|
|
760
785
|
const { httpClient, sideEffects } = arguments[1];
|
|
761
786
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1108,31 +1133,6 @@ async function duplicateProjectItems2(originProjectId, options) {
|
|
|
1108
1133
|
throw transformedError;
|
|
1109
1134
|
}
|
|
1110
1135
|
}
|
|
1111
|
-
async function generateTokenForProjectItems2(mediaIds) {
|
|
1112
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1113
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
|
|
1114
|
-
const reqOpts = generateTokenForProjectItems(
|
|
1115
|
-
payload
|
|
1116
|
-
);
|
|
1117
|
-
sideEffects?.onSiteCall?.();
|
|
1118
|
-
try {
|
|
1119
|
-
const result = await httpClient.request(reqOpts);
|
|
1120
|
-
sideEffects?.onSuccess?.(result);
|
|
1121
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1122
|
-
} catch (err) {
|
|
1123
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1124
|
-
err,
|
|
1125
|
-
{
|
|
1126
|
-
spreadPathsToArguments: {},
|
|
1127
|
-
explicitPathsToArguments: { mediaIds: "$[0]" },
|
|
1128
|
-
singleArgumentUnchanged: false
|
|
1129
|
-
},
|
|
1130
|
-
["mediaIds"]
|
|
1131
|
-
);
|
|
1132
|
-
sideEffects?.onError?.(err);
|
|
1133
|
-
throw transformedError;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
1136
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1137
1137
|
0 && (module.exports = {
|
|
1138
1138
|
ImageType,
|