@wix/media 1.0.59 → 1.0.61

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 (146) hide show
  1. package/build/cjs/context.d.ts +4 -0
  2. package/build/cjs/context.js +31 -0
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +2 -0
  5. package/build/cjs/index.js +3 -1
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/index.typings.d.ts +2 -0
  8. package/build/cjs/index.typings.js +3 -1
  9. package/build/cjs/index.typings.js.map +1 -1
  10. package/build/cjs/meta.d.ts +2 -0
  11. package/build/cjs/meta.js +3 -1
  12. package/build/cjs/meta.js.map +1 -1
  13. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +8 -0
  14. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js +77 -0
  15. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +1 -0
  16. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +16 -0
  17. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js +245 -0
  18. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +1 -0
  19. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +24 -0
  20. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js +142 -0
  21. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +1 -0
  22. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +26 -0
  23. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js +49 -0
  24. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +1 -0
  25. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +221 -0
  26. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js +22 -0
  27. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +1 -0
  28. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +315 -0
  29. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js +407 -0
  30. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +1 -0
  31. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +13 -0
  32. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js +137 -0
  33. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +1 -0
  34. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +29 -0
  35. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js +446 -0
  36. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +1 -0
  37. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +33 -0
  38. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js +237 -0
  39. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +1 -0
  40. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +59 -0
  41. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js +81 -0
  42. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +1 -0
  43. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +949 -0
  44. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js +27 -0
  45. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +1 -0
  46. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +907 -0
  47. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js +748 -0
  48. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +1 -0
  49. package/build/cjs/src/media-site-media-v1-file-descriptor.context.d.ts +18 -0
  50. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js +197 -0
  51. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js.map +1 -0
  52. package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +16 -17
  53. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +6 -4
  54. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  55. package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +2 -1
  56. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +6 -1
  57. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
  58. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +31 -24
  59. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +6 -30
  60. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  61. package/build/cjs/src/media-site-media-v1-folder.context.d.ts +11 -0
  62. package/build/cjs/src/media-site-media-v1-folder.context.js +113 -0
  63. package/build/cjs/src/media-site-media-v1-folder.context.js.map +1 -0
  64. package/build/cjs/src/media-site-media-v1-folder.http.d.ts +9 -10
  65. package/build/cjs/src/media-site-media-v1-folder.http.js +6 -4
  66. package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -1
  67. package/build/cjs/src/media-site-media-v1-folder.public.d.ts +2 -1
  68. package/build/cjs/src/media-site-media-v1-folder.public.js +5 -1
  69. package/build/cjs/src/media-site-media-v1-folder.public.js.map +1 -1
  70. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +30 -24
  71. package/build/cjs/src/media-site-media-v1-folder.universal.js +5 -23
  72. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -1
  73. package/build/es/context.d.ts +4 -0
  74. package/build/es/context.js +5 -0
  75. package/build/es/context.js.map +1 -0
  76. package/build/es/index.d.ts +2 -0
  77. package/build/es/index.js +2 -0
  78. package/build/es/index.js.map +1 -1
  79. package/build/es/index.typings.d.ts +2 -0
  80. package/build/es/index.typings.js +2 -0
  81. package/build/es/index.typings.js.map +1 -1
  82. package/build/es/meta.d.ts +2 -0
  83. package/build/es/meta.js +2 -0
  84. package/build/es/meta.js.map +1 -1
  85. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +8 -0
  86. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js +68 -0
  87. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +1 -0
  88. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +16 -0
  89. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js +236 -0
  90. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +1 -0
  91. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +24 -0
  92. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js +110 -0
  93. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +1 -0
  94. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +26 -0
  95. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js +35 -0
  96. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +1 -0
  97. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +221 -0
  98. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js +19 -0
  99. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +1 -0
  100. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +315 -0
  101. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js +375 -0
  102. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +1 -0
  103. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +13 -0
  104. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js +123 -0
  105. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +1 -0
  106. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +29 -0
  107. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js +432 -0
  108. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +1 -0
  109. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +33 -0
  110. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js +200 -0
  111. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +1 -0
  112. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +59 -0
  113. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js +60 -0
  114. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +1 -0
  115. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +949 -0
  116. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js +24 -0
  117. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +1 -0
  118. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +907 -0
  119. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js +711 -0
  120. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +1 -0
  121. package/build/es/src/media-site-media-v1-file-descriptor.context.d.ts +18 -0
  122. package/build/es/src/media-site-media-v1-file-descriptor.context.js +178 -0
  123. package/build/es/src/media-site-media-v1-file-descriptor.context.js.map +1 -0
  124. package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +16 -17
  125. package/build/es/src/media-site-media-v1-file-descriptor.http.js +6 -4
  126. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  127. package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +2 -1
  128. package/build/es/src/media-site-media-v1-file-descriptor.public.js +1 -0
  129. package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
  130. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +31 -24
  131. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +5 -29
  132. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  133. package/build/es/src/media-site-media-v1-folder.context.d.ts +11 -0
  134. package/build/es/src/media-site-media-v1-folder.context.js +101 -0
  135. package/build/es/src/media-site-media-v1-folder.context.js.map +1 -0
  136. package/build/es/src/media-site-media-v1-folder.http.d.ts +9 -10
  137. package/build/es/src/media-site-media-v1-folder.http.js +6 -4
  138. package/build/es/src/media-site-media-v1-folder.http.js.map +1 -1
  139. package/build/es/src/media-site-media-v1-folder.public.d.ts +2 -1
  140. package/build/es/src/media-site-media-v1-folder.public.js +1 -0
  141. package/build/es/src/media-site-media-v1-folder.public.js.map +1 -1
  142. package/build/es/src/media-site-media-v1-folder.universal.d.ts +30 -24
  143. package/build/es/src/media-site-media-v1-folder.universal.js +4 -22
  144. package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -1
  145. package/context/package.json +6 -0
  146. package/package.json +7 -5
@@ -0,0 +1,221 @@
1
+ export interface EnterpriseCategory {
2
+ /**
3
+ * Id of the category
4
+ * @readonly
5
+ */
6
+ id?: string;
7
+ /** The display name that will be shown for the item */
8
+ displayName?: string | null;
9
+ /** Id of the parent category, will default to the account master category */
10
+ parentCategoryId?: string | null;
11
+ /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
12
+ sortOrder?: number | null;
13
+ /** Publish status of the category */
14
+ publishStatus?: PublishStatus;
15
+ /**
16
+ * Date and time the category was created.
17
+ * @readonly
18
+ */
19
+ createdDate?: Date;
20
+ /**
21
+ * Date and time the category was updated.
22
+ * @readonly
23
+ */
24
+ updatedDate?: Date;
25
+ }
26
+ export declare enum PublishStatus {
27
+ UNDEFINED = "UNDEFINED",
28
+ UNPUBLISHED = "UNPUBLISHED",
29
+ PUBLISHED = "PUBLISHED",
30
+ WIX_ONLY = "WIX_ONLY"
31
+ }
32
+ export declare enum MediaType {
33
+ MIXED = "MIXED",
34
+ IMAGE = "IMAGE",
35
+ VIDEO = "VIDEO",
36
+ AUDIO = "AUDIO",
37
+ DOCUMENT = "DOCUMENT",
38
+ VECTOR = "VECTOR",
39
+ ARCHIVE = "ARCHIVE",
40
+ MODEL3D = "MODEL3D"
41
+ }
42
+ export interface CreateCategoryRequest {
43
+ /** The category object that will be created */
44
+ category: EnterpriseCategory;
45
+ }
46
+ export interface CreateCategoryResponse {
47
+ /** A list of items matching the request */
48
+ category?: EnterpriseCategory;
49
+ }
50
+ export interface DeleteCategoryRequest {
51
+ /** Category id */
52
+ categoryId: string;
53
+ }
54
+ export interface DeleteCategoryResponse {
55
+ }
56
+ export interface UpdateCategoryRequest {
57
+ /** The category object that will be created */
58
+ category: EnterpriseCategory;
59
+ }
60
+ export interface UpdateCategoryResponse {
61
+ /** The updated category */
62
+ category?: EnterpriseCategory;
63
+ }
64
+ export interface GetCategoryRequest {
65
+ /** Category id */
66
+ categoryId: string;
67
+ /** number of sub category levels */
68
+ levels?: number | null;
69
+ /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
70
+ publishStatus?: PublishStatus;
71
+ }
72
+ export interface GetCategoryResponse {
73
+ /** The category details */
74
+ category?: EnterpriseCategoryTree;
75
+ }
76
+ export interface EnterpriseCategoryTree {
77
+ /** Category information */
78
+ category?: EnterpriseCategory;
79
+ /** Information about the sub categories */
80
+ subCategories?: EnterpriseCategoryTree[];
81
+ }
82
+ export interface EnterpriseOnboardingRequest {
83
+ /** The account id of the organization - will be used as the organization category id */
84
+ accountId: string;
85
+ /** The account name of the organization - will be used as the organization category name */
86
+ accountName?: string;
87
+ }
88
+ export interface EnterpriseOnboardingResponse {
89
+ /** The enterprise category */
90
+ category?: EnterpriseCategory;
91
+ }
92
+ export interface LinkItemsToCategoryRequest {
93
+ /** The category to link to */
94
+ categoryId?: string;
95
+ /** The item ids that will be added to the category */
96
+ itemIds?: string[];
97
+ }
98
+ export interface LinkItemsToCategoryResponse {
99
+ }
100
+ export interface UnlinkItemsFromCategoryRequest {
101
+ /** The category to link to */
102
+ categoryId?: string;
103
+ /** The item ids that will be added to the category */
104
+ itemIds?: string[];
105
+ }
106
+ export interface UnlinkItemsFromCategoryResponse {
107
+ }
108
+ export interface GetMediaManagerCategoriesRequest {
109
+ }
110
+ export interface GetMediaManagerCategoriesResponse {
111
+ /** The category details */
112
+ category?: EnterpriseCategoryTree;
113
+ }
114
+ export interface DomainEvent extends DomainEventBodyOneOf {
115
+ createdEvent?: EntityCreatedEvent;
116
+ updatedEvent?: EntityUpdatedEvent;
117
+ deletedEvent?: EntityDeletedEvent;
118
+ actionEvent?: ActionEvent;
119
+ /**
120
+ * Unique event ID.
121
+ * Allows clients to ignore duplicate webhooks.
122
+ */
123
+ id?: string;
124
+ /**
125
+ * Assumes actions are also always typed to an entity_type
126
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
127
+ */
128
+ entityFqdn?: string;
129
+ /**
130
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
131
+ * This is although the created/updated/deleted notion is duplication of the oneof types
132
+ * Example: created/updated/deleted/started/completed/email_opened
133
+ */
134
+ slug?: string;
135
+ /** ID of the entity associated with the event. */
136
+ entityId?: string;
137
+ /** Event timestamp. */
138
+ eventTime?: Date;
139
+ /**
140
+ * Whether the event was triggered as a result of a privacy regulation application
141
+ * (for example, GDPR).
142
+ */
143
+ triggeredByAnonymizeRequest?: boolean | null;
144
+ /** If present, indicates the action that triggered the event. */
145
+ originatedFrom?: string | null;
146
+ /**
147
+ * A sequence number defining the order of updates to the underlying entity.
148
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
149
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
150
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
151
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
152
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
153
+ */
154
+ entityEventSequence?: string | null;
155
+ }
156
+ /** @oneof */
157
+ export interface DomainEventBodyOneOf {
158
+ createdEvent?: EntityCreatedEvent;
159
+ updatedEvent?: EntityUpdatedEvent;
160
+ deletedEvent?: EntityDeletedEvent;
161
+ actionEvent?: ActionEvent;
162
+ }
163
+ export interface EntityCreatedEvent {
164
+ entityAsJson?: string;
165
+ }
166
+ export interface EntityUpdatedEvent {
167
+ /**
168
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
169
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
170
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
171
+ */
172
+ currentEntityAsJson?: string;
173
+ }
174
+ export interface EntityDeletedEvent {
175
+ /** Entity that was deleted */
176
+ deletedEntityAsJson?: string | null;
177
+ }
178
+ export interface ActionEvent {
179
+ bodyAsJson?: string;
180
+ }
181
+ export interface CreateCategoryResponseNonNullableFields {
182
+ category?: {
183
+ id: string;
184
+ publishStatus: PublishStatus;
185
+ mediaType: MediaType;
186
+ };
187
+ }
188
+ export interface UpdateCategoryResponseNonNullableFields {
189
+ category?: {
190
+ id: string;
191
+ publishStatus: PublishStatus;
192
+ mediaType: MediaType;
193
+ };
194
+ }
195
+ export interface GetCategoryResponseNonNullableFields {
196
+ category?: {
197
+ category?: {
198
+ id: string;
199
+ publishStatus: PublishStatus;
200
+ mediaType: MediaType;
201
+ };
202
+ subCategories: NonNullable<GetCategoryResponseNonNullableFields>['category'][];
203
+ };
204
+ }
205
+ export interface EnterpriseOnboardingResponseNonNullableFields {
206
+ category?: {
207
+ id: string;
208
+ publishStatus: PublishStatus;
209
+ mediaType: MediaType;
210
+ };
211
+ }
212
+ export interface GetMediaManagerCategoriesResponseNonNullableFields {
213
+ category?: {
214
+ category?: {
215
+ id: string;
216
+ publishStatus: PublishStatus;
217
+ mediaType: MediaType;
218
+ };
219
+ subCategories: NonNullable<GetMediaManagerCategoriesResponseNonNullableFields>['category'][];
220
+ };
221
+ }
@@ -0,0 +1,19 @@
1
+ export var PublishStatus;
2
+ (function (PublishStatus) {
3
+ PublishStatus["UNDEFINED"] = "UNDEFINED";
4
+ PublishStatus["UNPUBLISHED"] = "UNPUBLISHED";
5
+ PublishStatus["PUBLISHED"] = "PUBLISHED";
6
+ PublishStatus["WIX_ONLY"] = "WIX_ONLY";
7
+ })(PublishStatus || (PublishStatus = {}));
8
+ export var MediaType;
9
+ (function (MediaType) {
10
+ MediaType["MIXED"] = "MIXED";
11
+ MediaType["IMAGE"] = "IMAGE";
12
+ MediaType["VIDEO"] = "VIDEO";
13
+ MediaType["AUDIO"] = "AUDIO";
14
+ MediaType["DOCUMENT"] = "DOCUMENT";
15
+ MediaType["VECTOR"] = "VECTOR";
16
+ MediaType["ARCHIVE"] = "ARCHIVE";
17
+ MediaType["MODEL3D"] = "MODEL3D";
18
+ })(MediaType || (MediaType = {}));
19
+ //# sourceMappingURL=media-enterprise-public-media-v1-enterprise-category.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-enterprise-public-media-v1-enterprise-category.types.js","sourceRoot":"","sources":["../../../src/media-enterprise-public-media-v1-enterprise-category.types.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,4CAA2B,CAAA;IAC3B,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;AACvB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;AACrB,CAAC,EATW,SAAS,KAAT,SAAS,QASpB"}
@@ -0,0 +1,315 @@
1
+ import { EventDefinition } from '@wix/sdk-types';
2
+ export interface EnterpriseCategory {
3
+ /**
4
+ * Id of the category
5
+ * @readonly
6
+ */
7
+ _id?: string;
8
+ /** The display name that will be shown for the item */
9
+ displayName?: string | null;
10
+ /** Id of the parent category, will default to the account master category */
11
+ parentCategoryId?: string | null;
12
+ /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
13
+ sortOrder?: number | null;
14
+ /** Publish status of the category */
15
+ publishStatus?: PublishStatus;
16
+ /**
17
+ * Date and time the category was created.
18
+ * @readonly
19
+ */
20
+ _createdDate?: Date;
21
+ /**
22
+ * Date and time the category was updated.
23
+ * @readonly
24
+ */
25
+ _updatedDate?: Date;
26
+ }
27
+ export declare enum PublishStatus {
28
+ UNDEFINED = "UNDEFINED",
29
+ UNPUBLISHED = "UNPUBLISHED",
30
+ PUBLISHED = "PUBLISHED",
31
+ WIX_ONLY = "WIX_ONLY"
32
+ }
33
+ export declare enum MediaType {
34
+ MIXED = "MIXED",
35
+ IMAGE = "IMAGE",
36
+ VIDEO = "VIDEO",
37
+ AUDIO = "AUDIO",
38
+ DOCUMENT = "DOCUMENT",
39
+ VECTOR = "VECTOR",
40
+ ARCHIVE = "ARCHIVE",
41
+ MODEL3D = "MODEL3D"
42
+ }
43
+ export interface CreateCategoryRequest {
44
+ /** The category object that will be created */
45
+ category: EnterpriseCategory;
46
+ }
47
+ export interface CreateCategoryResponse {
48
+ /** A list of items matching the request */
49
+ category?: EnterpriseCategory;
50
+ }
51
+ export interface DeleteCategoryRequest {
52
+ /** Category id */
53
+ categoryId: string;
54
+ }
55
+ export interface DeleteCategoryResponse {
56
+ }
57
+ export interface UpdateCategoryRequest {
58
+ /** The category object that will be created */
59
+ category: EnterpriseCategory;
60
+ }
61
+ export interface UpdateCategoryResponse {
62
+ /** The updated category */
63
+ category?: EnterpriseCategory;
64
+ }
65
+ export interface GetCategoryRequest {
66
+ /** Category id */
67
+ categoryId: string;
68
+ /** number of sub category levels */
69
+ levels?: number | null;
70
+ /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
71
+ publishStatus?: PublishStatus;
72
+ }
73
+ export interface GetCategoryResponse {
74
+ /** The category details */
75
+ category?: EnterpriseCategoryTree;
76
+ }
77
+ export interface EnterpriseCategoryTree {
78
+ /** Category information */
79
+ category?: EnterpriseCategory;
80
+ /** Information about the sub categories */
81
+ subCategories?: EnterpriseCategoryTree[];
82
+ }
83
+ export interface EnterpriseOnboardingRequest {
84
+ /** The account id of the organization - will be used as the organization category id */
85
+ accountId: string;
86
+ /** The account name of the organization - will be used as the organization category name */
87
+ accountName?: string;
88
+ }
89
+ export interface EnterpriseOnboardingResponse {
90
+ /** The enterprise category */
91
+ category?: EnterpriseCategory;
92
+ }
93
+ export interface LinkItemsToCategoryRequest {
94
+ /** The category to link to */
95
+ categoryId?: string;
96
+ /** The item ids that will be added to the category */
97
+ itemIds?: string[];
98
+ }
99
+ export interface LinkItemsToCategoryResponse {
100
+ }
101
+ export interface UnlinkItemsFromCategoryRequest {
102
+ /** The category to link to */
103
+ categoryId?: string;
104
+ /** The item ids that will be added to the category */
105
+ itemIds?: string[];
106
+ }
107
+ export interface UnlinkItemsFromCategoryResponse {
108
+ }
109
+ export interface GetMediaManagerCategoriesRequest {
110
+ }
111
+ export interface GetMediaManagerCategoriesResponse {
112
+ /** The category details */
113
+ category?: EnterpriseCategoryTree;
114
+ }
115
+ export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
116
+ createdEvent?: EntityCreatedEvent<T>;
117
+ updatedEvent?: EntityUpdatedEvent<T>;
118
+ deletedEvent?: EntityDeletedEvent<T>;
119
+ actionEvent?: ActionEvent<T>;
120
+ /**
121
+ * Unique event ID.
122
+ * Allows clients to ignore duplicate webhooks.
123
+ */
124
+ _id?: string;
125
+ /**
126
+ * Assumes actions are also always typed to an entity_type
127
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
128
+ */
129
+ entityFqdn?: string;
130
+ /**
131
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
132
+ * This is although the created/updated/deleted notion is duplication of the oneof types
133
+ * Example: created/updated/deleted/started/completed/email_opened
134
+ */
135
+ slug?: string;
136
+ /** ID of the entity associated with the event. */
137
+ entityId?: string;
138
+ /** Event timestamp. */
139
+ eventTime?: Date;
140
+ /**
141
+ * Whether the event was triggered as a result of a privacy regulation application
142
+ * (for example, GDPR).
143
+ */
144
+ triggeredByAnonymizeRequest?: boolean | null;
145
+ /** If present, indicates the action that triggered the event. */
146
+ originatedFrom?: string | null;
147
+ /**
148
+ * A sequence number defining the order of updates to the underlying entity.
149
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
150
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
151
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
152
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
153
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
154
+ */
155
+ entityEventSequence?: string | null;
156
+ }
157
+ export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
158
+ }
159
+ export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
160
+ }
161
+ export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
162
+ }
163
+ export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
164
+ }
165
+ /** @oneof */
166
+ export interface DomainEventBodyOneOf<T> {
167
+ createdEvent?: EntityCreatedEvent<T>;
168
+ updatedEvent?: EntityUpdatedEvent<T>;
169
+ deletedEvent?: EntityDeletedEvent<T>;
170
+ actionEvent?: ActionEvent<T>;
171
+ }
172
+ export interface EntityCreatedEvent<T> {
173
+ entity?: T;
174
+ }
175
+ export interface EntityUpdatedEvent<T> {
176
+ /**
177
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
178
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
179
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
180
+ */
181
+ currentEntity?: T;
182
+ }
183
+ export interface EntityDeletedEvent<T> {
184
+ /** Entity that was deleted */
185
+ deletedEntity?: T | null;
186
+ }
187
+ export interface ActionEvent<T> {
188
+ body?: T;
189
+ }
190
+ export interface CreateCategoryResponseNonNullableFields {
191
+ category?: {
192
+ _id: string;
193
+ publishStatus: PublishStatus;
194
+ };
195
+ }
196
+ export interface UpdateCategoryResponseNonNullableFields {
197
+ category?: {
198
+ _id: string;
199
+ publishStatus: PublishStatus;
200
+ };
201
+ }
202
+ export interface GetCategoryResponseNonNullableFields {
203
+ category?: {
204
+ category?: {
205
+ _id: string;
206
+ publishStatus: PublishStatus;
207
+ };
208
+ subCategories: NonNullable<GetCategoryResponseNonNullableFields>['category'][];
209
+ };
210
+ }
211
+ export interface EnterpriseOnboardingResponseNonNullableFields {
212
+ category?: {
213
+ _id: string;
214
+ publishStatus: PublishStatus;
215
+ };
216
+ }
217
+ export interface GetMediaManagerCategoriesResponseNonNullableFields {
218
+ category?: {
219
+ category?: {
220
+ _id: string;
221
+ publishStatus: PublishStatus;
222
+ };
223
+ subCategories: NonNullable<GetMediaManagerCategoriesResponseNonNullableFields>['category'][];
224
+ };
225
+ }
226
+ export declare const onEnterpriseCategoryCreated: EventDefinition<DomainCreatedEvent<EnterpriseCategory>, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
227
+ export declare const onEnterpriseCategoryDeleted: EventDefinition<DomainDeletedEvent<EnterpriseCategory>, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
228
+ export declare const onEnterpriseCategoryUpdated: EventDefinition<DomainUpdatedEvent<EnterpriseCategory>, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
229
+ /**
230
+ * Fetch a list of random media from different providers, using site information to customize results when available
231
+ * @param category - The category object that will be created
232
+ * @public
233
+ * @documentationMaturity preview
234
+ * @requiredField category
235
+ * @requiredField category.displayName
236
+ * @returns A list of items matching the request
237
+ */
238
+ export declare function createCategory(category: EnterpriseCategory): Promise<EnterpriseCategory & NonNullable<CreateCategoryResponseNonNullableFields>['category']>;
239
+ /**
240
+ * Delete a category including all its subcategories - but not the items
241
+ * @param categoryId - Category id
242
+ * @public
243
+ * @documentationMaturity preview
244
+ * @requiredField categoryId
245
+ */
246
+ export declare function deleteCategory(categoryId: string): Promise<void>;
247
+ /**
248
+ * Update category details
249
+ * @param _id - Id of the category
250
+ * @public
251
+ * @documentationMaturity preview
252
+ * @requiredField _id
253
+ * @requiredField category
254
+ * @returns The updated category
255
+ */
256
+ export declare function updateCategory(_id: string, category: UpdateCategory): Promise<EnterpriseCategory & NonNullable<UpdateCategoryResponseNonNullableFields>['category']>;
257
+ export interface UpdateCategory {
258
+ /**
259
+ * Id of the category
260
+ * @readonly
261
+ */
262
+ _id?: string;
263
+ /** The display name that will be shown for the item */
264
+ displayName?: string | null;
265
+ /** Id of the parent category, will default to the account master category */
266
+ parentCategoryId?: string | null;
267
+ /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
268
+ sortOrder?: number | null;
269
+ /** Publish status of the category */
270
+ publishStatus?: PublishStatus;
271
+ /**
272
+ * Date and time the category was created.
273
+ * @readonly
274
+ */
275
+ _createdDate?: Date;
276
+ /**
277
+ * Date and time the category was updated.
278
+ * @readonly
279
+ */
280
+ _updatedDate?: Date;
281
+ }
282
+ /**
283
+ * Get information about a specific category
284
+ * @param categoryId - Category id
285
+ * @public
286
+ * @documentationMaturity preview
287
+ * @requiredField categoryId
288
+ * @returns The category details
289
+ */
290
+ export declare function getCategory(categoryId: string, options?: GetCategoryOptions): Promise<EnterpriseCategoryTree & NonNullable<GetCategoryResponseNonNullableFields>['category']>;
291
+ export interface GetCategoryOptions {
292
+ /** number of sub category levels */
293
+ levels?: number | null;
294
+ /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
295
+ publishStatus?: PublishStatus;
296
+ }
297
+ /**
298
+ * Create the enterprise category under "enterprise-media" main category
299
+ * the caller identity must be have the same accountId of the request
300
+ * @param accountId - The account id of the organization - will be used as the organization category id
301
+ * @public
302
+ * @documentationMaturity preview
303
+ * @requiredField accountId
304
+ */
305
+ export declare function enterpriseOnboarding(accountId: string, options?: EnterpriseOnboardingOptions): Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
306
+ export interface EnterpriseOnboardingOptions {
307
+ /** The account name of the organization - will be used as the organization category name */
308
+ accountName?: string;
309
+ }
310
+ /**
311
+ * Get the account category tree details
312
+ * @public
313
+ * @documentationMaturity preview
314
+ */
315
+ export declare function getMediaManagerCategories(): Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;