@wix/media 1.0.58 → 1.0.60

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 (142) 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 +71 -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 +17 -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 +126 -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 +30 -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 +181 -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.js +6 -4
  53. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  54. package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +2 -1
  55. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +6 -1
  56. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
  57. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +69 -24
  58. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +44 -30
  59. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  60. package/build/cjs/src/media-site-media-v1-folder.context.d.ts +11 -0
  61. package/build/cjs/src/media-site-media-v1-folder.context.js +104 -0
  62. package/build/cjs/src/media-site-media-v1-folder.context.js.map +1 -0
  63. package/build/cjs/src/media-site-media-v1-folder.http.js +6 -4
  64. package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -1
  65. package/build/cjs/src/media-site-media-v1-folder.public.d.ts +2 -1
  66. package/build/cjs/src/media-site-media-v1-folder.public.js +5 -1
  67. package/build/cjs/src/media-site-media-v1-folder.public.js.map +1 -1
  68. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +52 -24
  69. package/build/cjs/src/media-site-media-v1-folder.universal.js +27 -23
  70. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -1
  71. package/build/es/context.d.ts +4 -0
  72. package/build/es/context.js +5 -0
  73. package/build/es/context.js.map +1 -0
  74. package/build/es/index.d.ts +2 -0
  75. package/build/es/index.js +2 -0
  76. package/build/es/index.js.map +1 -1
  77. package/build/es/index.typings.d.ts +2 -0
  78. package/build/es/index.typings.js +2 -0
  79. package/build/es/index.typings.js.map +1 -1
  80. package/build/es/meta.d.ts +2 -0
  81. package/build/es/meta.js +2 -0
  82. package/build/es/meta.js.map +1 -1
  83. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +8 -0
  84. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js +62 -0
  85. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +1 -0
  86. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +17 -0
  87. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js +236 -0
  88. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +1 -0
  89. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +24 -0
  90. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js +110 -0
  91. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +1 -0
  92. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +26 -0
  93. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js +35 -0
  94. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +1 -0
  95. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +221 -0
  96. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js +19 -0
  97. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +1 -0
  98. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +315 -0
  99. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js +375 -0
  100. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +1 -0
  101. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +13 -0
  102. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js +112 -0
  103. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +1 -0
  104. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +30 -0
  105. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js +432 -0
  106. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +1 -0
  107. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +33 -0
  108. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js +200 -0
  109. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +1 -0
  110. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +59 -0
  111. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js +60 -0
  112. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +1 -0
  113. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +949 -0
  114. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js +24 -0
  115. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +1 -0
  116. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +907 -0
  117. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js +711 -0
  118. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +1 -0
  119. package/build/es/src/media-site-media-v1-file-descriptor.context.d.ts +18 -0
  120. package/build/es/src/media-site-media-v1-file-descriptor.context.js +162 -0
  121. package/build/es/src/media-site-media-v1-file-descriptor.context.js.map +1 -0
  122. package/build/es/src/media-site-media-v1-file-descriptor.http.js +6 -4
  123. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  124. package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +2 -1
  125. package/build/es/src/media-site-media-v1-file-descriptor.public.js +1 -0
  126. package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
  127. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +69 -24
  128. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +43 -29
  129. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  130. package/build/es/src/media-site-media-v1-folder.context.d.ts +11 -0
  131. package/build/es/src/media-site-media-v1-folder.context.js +92 -0
  132. package/build/es/src/media-site-media-v1-folder.context.js.map +1 -0
  133. package/build/es/src/media-site-media-v1-folder.http.js +6 -4
  134. package/build/es/src/media-site-media-v1-folder.http.js.map +1 -1
  135. package/build/es/src/media-site-media-v1-folder.public.d.ts +2 -1
  136. package/build/es/src/media-site-media-v1-folder.public.js +1 -0
  137. package/build/es/src/media-site-media-v1-folder.public.js.map +1 -1
  138. package/build/es/src/media-site-media-v1-folder.universal.d.ts +52 -24
  139. package/build/es/src/media-site-media-v1-folder.universal.js +26 -22
  140. package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -1
  141. package/context/package.json +6 -0
  142. package/package.json +7 -5
@@ -0,0 +1,375 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer } from '@wix/metro-runtime/velo';
11
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
12
+ import { EventDefinition } from '@wix/sdk-types';
13
+ import * as ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory from './media-enterprise-public-media-v1-enterprise-category.http';
14
+ const _toVeloEntity = '$';
15
+ const _fromVeloEntity = '$';
16
+ export var PublishStatus;
17
+ (function (PublishStatus) {
18
+ PublishStatus["UNDEFINED"] = "UNDEFINED";
19
+ PublishStatus["UNPUBLISHED"] = "UNPUBLISHED";
20
+ PublishStatus["PUBLISHED"] = "PUBLISHED";
21
+ PublishStatus["WIX_ONLY"] = "WIX_ONLY";
22
+ })(PublishStatus || (PublishStatus = {}));
23
+ export var MediaType;
24
+ (function (MediaType) {
25
+ MediaType["MIXED"] = "MIXED";
26
+ MediaType["IMAGE"] = "IMAGE";
27
+ MediaType["VIDEO"] = "VIDEO";
28
+ MediaType["AUDIO"] = "AUDIO";
29
+ MediaType["DOCUMENT"] = "DOCUMENT";
30
+ MediaType["VECTOR"] = "VECTOR";
31
+ MediaType["ARCHIVE"] = "ARCHIVE";
32
+ MediaType["MODEL3D"] = "MODEL3D";
33
+ })(MediaType || (MediaType = {}));
34
+ const _createCategoryRequest = {};
35
+ const _createCategoryResponse = {};
36
+ const _deleteCategoryRequest = {};
37
+ const _deleteCategoryResponse = {};
38
+ const _enterpriseCategoryTree = { subCategories: '_enterpriseCategoryTree' };
39
+ const _enterpriseOnboardingRequest = {};
40
+ const _enterpriseOnboardingResponse = {};
41
+ const _getCategoryRequest = {};
42
+ const _getCategoryResponse = { category: '_enterpriseCategoryTree' };
43
+ const _getMediaManagerCategoriesRequest = {};
44
+ const _getMediaManagerCategoriesResponse = {
45
+ category: '_enterpriseCategoryTree',
46
+ };
47
+ const _updateCategoryRequest = {};
48
+ const _updateCategoryResponse = {};
49
+ export const onEnterpriseCategoryCreated = EventDefinition('wix.media.enterprise_public_media.v1.enterprise_category_created')();
50
+ export const onEnterpriseCategoryDeleted = EventDefinition('wix.media.enterprise_public_media.v1.enterprise_category_deleted')();
51
+ export const onEnterpriseCategoryUpdated = EventDefinition('wix.media.enterprise_public_media.v1.enterprise_category_updated')();
52
+ /**
53
+ * Fetch a list of random media from different providers, using site information to customize results when available
54
+ * @param category - The category object that will be created
55
+ * @public
56
+ * @documentationMaturity preview
57
+ * @requiredField category
58
+ * @requiredField category.displayName
59
+ * @returns A list of items matching the request
60
+ */
61
+ export function createCategory(category) {
62
+ var _a, _b, _c;
63
+ return __awaiter(this, arguments, void 0, function* () {
64
+ const requestTransformation = { category: '$[0]' };
65
+ const responseTransformation = '$.category';
66
+ // @ts-ignore
67
+ const { httpClient, sideEffects } = arguments[1];
68
+ const { toAmbassadorRequest } = serializer({
69
+ rootSchema: _createCategoryRequest,
70
+ depSchemas: {},
71
+ fqdnTransformation: {
72
+ paths: [...['category']],
73
+ transformation: _fromVeloEntity,
74
+ },
75
+ customTransformation: requestTransformation,
76
+ });
77
+ const { fromJSON } = serializer({
78
+ rootSchema: _createCategoryResponse,
79
+ depSchemas: {},
80
+ fqdnTransformation: {
81
+ paths: [...['category']],
82
+ transformation: _toVeloEntity,
83
+ },
84
+ customTransformation: responseTransformation,
85
+ });
86
+ const payload = toAmbassadorRequest([category]);
87
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.createCategory(payload);
88
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
89
+ try {
90
+ const result = yield httpClient.request(reqOpts);
91
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
92
+ return fromJSON(result.data);
93
+ }
94
+ catch (err) {
95
+ const transformedError = sdkTransformError(err, {
96
+ spreadPathsToArguments: {},
97
+ explicitPathsToArguments: { category: '$[0]' },
98
+ singleArgumentUnchanged: false,
99
+ }, ['category']);
100
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
101
+ throw transformedError;
102
+ }
103
+ });
104
+ }
105
+ /**
106
+ * Delete a category including all its subcategories - but not the items
107
+ * @param categoryId - Category id
108
+ * @public
109
+ * @documentationMaturity preview
110
+ * @requiredField categoryId
111
+ */
112
+ export function deleteCategory(categoryId) {
113
+ var _a, _b, _c;
114
+ return __awaiter(this, arguments, void 0, function* () {
115
+ const requestTransformation = { categoryId: '$[0]' };
116
+ const responseTransformation = '$';
117
+ // @ts-ignore
118
+ const { httpClient, sideEffects } = arguments[1];
119
+ const { toAmbassadorRequest } = serializer({
120
+ rootSchema: _deleteCategoryRequest,
121
+ depSchemas: {},
122
+ fqdnTransformation: {
123
+ paths: [],
124
+ transformation: _fromVeloEntity,
125
+ },
126
+ customTransformation: requestTransformation,
127
+ });
128
+ const { fromJSON } = serializer({
129
+ rootSchema: _deleteCategoryResponse,
130
+ depSchemas: {},
131
+ fqdnTransformation: {
132
+ paths: [],
133
+ transformation: _toVeloEntity,
134
+ },
135
+ customTransformation: responseTransformation,
136
+ });
137
+ const payload = toAmbassadorRequest([categoryId]);
138
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.deleteCategory(payload);
139
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
140
+ try {
141
+ const result = yield httpClient.request(reqOpts);
142
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
143
+ }
144
+ catch (err) {
145
+ const transformedError = sdkTransformError(err, {
146
+ spreadPathsToArguments: {},
147
+ explicitPathsToArguments: { categoryId: '$[0]' },
148
+ singleArgumentUnchanged: false,
149
+ }, ['categoryId']);
150
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
151
+ throw transformedError;
152
+ }
153
+ });
154
+ }
155
+ /**
156
+ * Update category details
157
+ * @param _id - Id of the category
158
+ * @public
159
+ * @documentationMaturity preview
160
+ * @requiredField _id
161
+ * @requiredField category
162
+ * @returns The updated category
163
+ */
164
+ export function updateCategory(_id, category) {
165
+ var _a, _b, _c;
166
+ return __awaiter(this, arguments, void 0, function* () {
167
+ const requestTransformation = { category: { '*': '$[1]', id: '$[0]' } };
168
+ const responseTransformation = '$.category';
169
+ // @ts-ignore
170
+ const { httpClient, sideEffects } = arguments[2];
171
+ const { toAmbassadorRequest } = serializer({
172
+ rootSchema: _updateCategoryRequest,
173
+ depSchemas: {},
174
+ fqdnTransformation: {
175
+ paths: [...['category']],
176
+ transformation: _fromVeloEntity,
177
+ },
178
+ customTransformation: requestTransformation,
179
+ });
180
+ const { fromJSON } = serializer({
181
+ rootSchema: _updateCategoryResponse,
182
+ depSchemas: {},
183
+ fqdnTransformation: {
184
+ paths: [...['category']],
185
+ transformation: _toVeloEntity,
186
+ },
187
+ customTransformation: responseTransformation,
188
+ });
189
+ const payload = toAmbassadorRequest([_id, category]);
190
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.updateCategory(payload);
191
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
192
+ try {
193
+ const result = yield httpClient.request(reqOpts);
194
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
195
+ return fromJSON(result.data);
196
+ }
197
+ catch (err) {
198
+ const transformedError = sdkTransformError(err, {
199
+ spreadPathsToArguments: { category: '$[1]' },
200
+ explicitPathsToArguments: { 'category.id': '$[0]' },
201
+ singleArgumentUnchanged: false,
202
+ }, ['_id', 'category']);
203
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
204
+ throw transformedError;
205
+ }
206
+ });
207
+ }
208
+ /**
209
+ * Get information about a specific category
210
+ * @param categoryId - Category id
211
+ * @public
212
+ * @documentationMaturity preview
213
+ * @requiredField categoryId
214
+ * @returns The category details
215
+ */
216
+ export function getCategory(categoryId, options) {
217
+ var _a, _b, _c;
218
+ return __awaiter(this, arguments, void 0, function* () {
219
+ const requestTransformation = {
220
+ categoryId: '$[0]',
221
+ levels: '$[1].levels',
222
+ publishStatus: '$[1].publishStatus',
223
+ };
224
+ const responseTransformation = '$.category';
225
+ // @ts-ignore
226
+ const { httpClient, sideEffects } = arguments[2];
227
+ const { toAmbassadorRequest } = serializer({
228
+ rootSchema: _getCategoryRequest,
229
+ depSchemas: {},
230
+ fqdnTransformation: {
231
+ paths: [],
232
+ transformation: _fromVeloEntity,
233
+ },
234
+ customTransformation: requestTransformation,
235
+ });
236
+ const { fromJSON } = serializer({
237
+ rootSchema: _getCategoryResponse,
238
+ depSchemas: { _enterpriseCategoryTree },
239
+ fqdnTransformation: {
240
+ paths: [...['category.category']],
241
+ transformation: _toVeloEntity,
242
+ },
243
+ customTransformation: responseTransformation,
244
+ });
245
+ const payload = toAmbassadorRequest([categoryId, options]);
246
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.getCategory(payload);
247
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
248
+ try {
249
+ const result = yield httpClient.request(reqOpts);
250
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
251
+ return fromJSON(result.data);
252
+ }
253
+ catch (err) {
254
+ const transformedError = sdkTransformError(err, {
255
+ spreadPathsToArguments: {},
256
+ explicitPathsToArguments: {
257
+ categoryId: '$[0]',
258
+ levels: '$[1].levels',
259
+ publishStatus: '$[1].publishStatus',
260
+ },
261
+ singleArgumentUnchanged: false,
262
+ }, ['categoryId', 'options']);
263
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
264
+ throw transformedError;
265
+ }
266
+ });
267
+ }
268
+ /**
269
+ * Create the enterprise category under "enterprise-media" main category
270
+ * the caller identity must be have the same accountId of the request
271
+ * @param accountId - The account id of the organization - will be used as the organization category id
272
+ * @public
273
+ * @documentationMaturity preview
274
+ * @requiredField accountId
275
+ */
276
+ export function enterpriseOnboarding(accountId, options) {
277
+ var _a, _b, _c;
278
+ return __awaiter(this, arguments, void 0, function* () {
279
+ const requestTransformation = {
280
+ accountId: '$[0]',
281
+ accountName: '$[1].accountName',
282
+ };
283
+ const responseTransformation = '$';
284
+ // @ts-ignore
285
+ const { httpClient, sideEffects } = arguments[2];
286
+ const { toAmbassadorRequest } = serializer({
287
+ rootSchema: _enterpriseOnboardingRequest,
288
+ depSchemas: {},
289
+ fqdnTransformation: {
290
+ paths: [],
291
+ transformation: _fromVeloEntity,
292
+ },
293
+ customTransformation: requestTransformation,
294
+ });
295
+ const { fromJSON } = serializer({
296
+ rootSchema: _enterpriseOnboardingResponse,
297
+ depSchemas: {},
298
+ fqdnTransformation: {
299
+ paths: [...['category']],
300
+ transformation: _toVeloEntity,
301
+ },
302
+ customTransformation: responseTransformation,
303
+ });
304
+ const payload = toAmbassadorRequest([accountId, options]);
305
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.enterpriseOnboarding(payload);
306
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
307
+ try {
308
+ const result = yield httpClient.request(reqOpts);
309
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
310
+ return fromJSON(result.data);
311
+ }
312
+ catch (err) {
313
+ const transformedError = sdkTransformError(err, {
314
+ spreadPathsToArguments: {},
315
+ explicitPathsToArguments: {
316
+ accountId: '$[0]',
317
+ accountName: '$[1].accountName',
318
+ },
319
+ singleArgumentUnchanged: false,
320
+ }, ['accountId', 'options']);
321
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
322
+ throw transformedError;
323
+ }
324
+ });
325
+ }
326
+ /**
327
+ * Get the account category tree details
328
+ * @public
329
+ * @documentationMaturity preview
330
+ */
331
+ export function getMediaManagerCategories() {
332
+ var _a, _b, _c;
333
+ return __awaiter(this, arguments, void 0, function* () {
334
+ const requestTransformation = {};
335
+ const responseTransformation = '$';
336
+ // @ts-ignore
337
+ const { httpClient, sideEffects } = arguments[0];
338
+ const { toAmbassadorRequest } = serializer({
339
+ rootSchema: _getMediaManagerCategoriesRequest,
340
+ depSchemas: {},
341
+ fqdnTransformation: {
342
+ paths: [],
343
+ transformation: _fromVeloEntity,
344
+ },
345
+ customTransformation: requestTransformation,
346
+ });
347
+ const { fromJSON } = serializer({
348
+ rootSchema: _getMediaManagerCategoriesResponse,
349
+ depSchemas: { _enterpriseCategoryTree },
350
+ fqdnTransformation: {
351
+ paths: [...['category.category']],
352
+ transformation: _toVeloEntity,
353
+ },
354
+ customTransformation: responseTransformation,
355
+ });
356
+ const payload = toAmbassadorRequest([]);
357
+ const reqOpts = ambassadorWixMediaEnterprisePublicMediaV1EnterpriseCategory.getMediaManagerCategories(payload);
358
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
359
+ try {
360
+ const result = yield httpClient.request(reqOpts);
361
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
362
+ return fromJSON(result.data);
363
+ }
364
+ catch (err) {
365
+ const transformedError = sdkTransformError(err, {
366
+ spreadPathsToArguments: {},
367
+ explicitPathsToArguments: {},
368
+ singleArgumentUnchanged: false,
369
+ }, []);
370
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
371
+ throw transformedError;
372
+ }
373
+ });
374
+ }
375
+ //# sourceMappingURL=media-enterprise-public-media-v1-enterprise-category.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-enterprise-public-media-v1-enterprise-category.universal.js","sourceRoot":"","sources":["../../../src/media-enterprise-public-media-v1-enterprise-category.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,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;SAC5C,CAAC,CAAC;QAEH,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;YAC9B,UAAU,EAAE,kCAAkC;YAC9C,UAAU,EAAE,EAAE,uBAAuB,EAAE;YACvC,kBAAkB,EAAE;gBAClB,KAAK,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;gBACjC,cAAc,EAAE,aAAa;aAC9B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAC;QAExC,MAAM,OAAO,GACX,2DAA2D,CAAC,yBAAyB,CACnF,OAAO,CACR,CAAC;QAEJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,2DAAI,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE,EAAE;gBAC5B,uBAAuB,EAAE,KAAK;aAC/B,EACD,EAAE,CACH,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF"}
@@ -0,0 +1,13 @@
1
+ import { itemUploadCallback as publicItemUploadCallback, generateFileUploadUrl as publicGenerateFileUploadUrl, importFile as publicImportFile, searchItems as publicSearchItems, queryItems as publicQueryItems, updateItem as publicUpdateItem, bulkUpdateItem as publicBulkUpdateItem, getItem as publicGetItem, linkItemToCategories as publicLinkItemToCategories, unlinkItemFromCategories as publicUnlinkItemFromCategories, overwriteItemCategories as publicOverwriteItemCategories } from './media-enterprise-public-media-v1-enterprise-item.public';
2
+ import { BuildRESTFunction } from '@wix/sdk-types';
3
+ export declare const itemUploadCallback: BuildRESTFunction<typeof publicItemUploadCallback>;
4
+ export declare const generateFileUploadUrl: BuildRESTFunction<typeof publicGenerateFileUploadUrl>;
5
+ export declare const importFile: BuildRESTFunction<typeof publicImportFile>;
6
+ export declare const searchItems: BuildRESTFunction<typeof publicSearchItems>;
7
+ export declare const queryItems: BuildRESTFunction<typeof publicQueryItems>;
8
+ export declare const updateItem: BuildRESTFunction<typeof publicUpdateItem>;
9
+ export declare const bulkUpdateItem: BuildRESTFunction<typeof publicBulkUpdateItem>;
10
+ export declare const getItem: BuildRESTFunction<typeof publicGetItem>;
11
+ export declare const linkItemToCategories: BuildRESTFunction<typeof publicLinkItemToCategories>;
12
+ export declare const unlinkItemFromCategories: BuildRESTFunction<typeof publicUnlinkItemFromCategories>;
13
+ export declare const overwriteItemCategories: BuildRESTFunction<typeof publicOverwriteItemCategories>;
@@ -0,0 +1,112 @@
1
+ import { itemUploadCallback as publicItemUploadCallback, generateFileUploadUrl as publicGenerateFileUploadUrl, importFile as publicImportFile, searchItems as publicSearchItems, queryItems as publicQueryItems, updateItem as publicUpdateItem, bulkUpdateItem as publicBulkUpdateItem, getItem as publicGetItem, linkItemToCategories as publicLinkItemToCategories, unlinkItemFromCategories as publicUnlinkItemFromCategories, overwriteItemCategories as publicOverwriteItemCategories, } from './media-enterprise-public-media-v1-enterprise-item.public';
2
+ export const itemUploadCallback = (...args) => {
3
+ // @ts-expect-error
4
+ if (!globalThis.__wix_context__) {
5
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
6
+ }
7
+ // @ts-expect-error
8
+ return globalThis.__wix_context__
9
+ .initWixModules(publicItemUploadCallback)
10
+ .apply(undefined, args);
11
+ };
12
+ export const generateFileUploadUrl = (...args) => {
13
+ // @ts-expect-error
14
+ if (!globalThis.__wix_context__) {
15
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
16
+ }
17
+ // @ts-expect-error
18
+ return globalThis.__wix_context__
19
+ .initWixModules(publicGenerateFileUploadUrl)
20
+ .apply(undefined, args);
21
+ };
22
+ export const importFile = (...args) => {
23
+ // @ts-expect-error
24
+ if (!globalThis.__wix_context__) {
25
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
26
+ }
27
+ // @ts-expect-error
28
+ return globalThis.__wix_context__
29
+ .initWixModules(publicImportFile)
30
+ .apply(undefined, args);
31
+ };
32
+ export const searchItems = (...args) => {
33
+ // @ts-expect-error
34
+ if (!globalThis.__wix_context__) {
35
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
36
+ }
37
+ // @ts-expect-error
38
+ return globalThis.__wix_context__
39
+ .initWixModules(publicSearchItems)
40
+ .apply(undefined, args);
41
+ };
42
+ export const queryItems = (...args) => {
43
+ // @ts-expect-error
44
+ if (!globalThis.__wix_context__) {
45
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
46
+ }
47
+ // @ts-expect-error
48
+ return globalThis.__wix_context__
49
+ .initWixModules(publicQueryItems)
50
+ .apply(undefined, args);
51
+ };
52
+ export const updateItem = (...args) => {
53
+ // @ts-expect-error
54
+ if (!globalThis.__wix_context__) {
55
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
56
+ }
57
+ // @ts-expect-error
58
+ return globalThis.__wix_context__
59
+ .initWixModules(publicUpdateItem)
60
+ .apply(undefined, args);
61
+ };
62
+ export const bulkUpdateItem = (...args) => {
63
+ // @ts-expect-error
64
+ if (!globalThis.__wix_context__) {
65
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
66
+ }
67
+ // @ts-expect-error
68
+ return globalThis.__wix_context__
69
+ .initWixModules(publicBulkUpdateItem)
70
+ .apply(undefined, args);
71
+ };
72
+ export const getItem = (...args) => {
73
+ // @ts-expect-error
74
+ if (!globalThis.__wix_context__) {
75
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
76
+ }
77
+ // @ts-expect-error
78
+ return globalThis.__wix_context__
79
+ .initWixModules(publicGetItem)
80
+ .apply(undefined, args);
81
+ };
82
+ export const linkItemToCategories = (...args) => {
83
+ // @ts-expect-error
84
+ if (!globalThis.__wix_context__) {
85
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
86
+ }
87
+ // @ts-expect-error
88
+ return globalThis.__wix_context__
89
+ .initWixModules(publicLinkItemToCategories)
90
+ .apply(undefined, args);
91
+ };
92
+ export const unlinkItemFromCategories = (...args) => {
93
+ // @ts-expect-error
94
+ if (!globalThis.__wix_context__) {
95
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
96
+ }
97
+ // @ts-expect-error
98
+ return globalThis.__wix_context__
99
+ .initWixModules(publicUnlinkItemFromCategories)
100
+ .apply(undefined, args);
101
+ };
102
+ export const overwriteItemCategories = (...args) => {
103
+ // @ts-expect-error
104
+ if (!globalThis.__wix_context__) {
105
+ throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
106
+ }
107
+ // @ts-expect-error
108
+ return globalThis.__wix_context__
109
+ .initWixModules(publicOverwriteItemCategories)
110
+ .apply(undefined, args);
111
+ };
112
+ //# sourceMappingURL=media-enterprise-public-media-v1-enterprise-item.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-enterprise-public-media-v1-enterprise-item.context.js","sourceRoot":"","sources":["../../../src/media-enterprise-public-media-v1-enterprise-item.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,IAAI,wBAAwB,EAC9C,qBAAqB,IAAI,2BAA2B,EACpD,UAAU,IAAI,gBAAgB,EAC9B,WAAW,IAAI,iBAAiB,EAChC,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,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AAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,6BAA6B,CAAC;SAC7C,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { BulkUpdateItemRequest, BulkUpdateItemResponse, GenerateFileUploadUrlRequest, GenerateFileUploadUrlResponse, GetItemRequest, GetItemResponse, ImportFileRequest, ImportFileResponse, ItemUploadCallbackRequest, ItemUploadCallbackResponse, LinkItemToCategoriesRequest, LinkItemToCategoriesResponse, OverwriteItemCategoriesRequest, OverwriteItemCategoriesResponse, QueryItemsRequest, QueryItemsResponse, SearchItemsRequest, SearchItemsResponse, UnlinkItemFromCategoriesRequest, UnlinkItemFromCategoriesResponse, UpdateItemRequest, UpdateItemResponse, GenerateFileUploadUrlResponseNonNullableFields, ImportFileResponseNonNullableFields, SearchItemsResponseNonNullableFields, QueryItemsResponseNonNullableFields, UpdateItemResponseNonNullableFields, BulkUpdateItemResponseNonNullableFields, GetItemResponseNonNullableFields } from './media-enterprise-public-media-v1-enterprise-item.types';
3
+ /** Internal API called by the public media backend, notify about a file that was created enterprise public media server */
4
+ export declare function itemUploadCallback(payload: ItemUploadCallbackRequest): RequestOptionsFactory<ItemUploadCallbackResponse>;
5
+ /** Generate an upload url that will make public media to call the enterprise callback endpoint */
6
+ export declare function generateFileUploadUrl(payload: GenerateFileUploadUrlRequest): RequestOptionsFactory<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
7
+ /** Import a file using a url */
8
+ export declare function importFile(payload: ImportFileRequest): RequestOptionsFactory<ImportFileResponse & ImportFileResponseNonNullableFields>;
9
+ /**
10
+ * Search items, all filters only support equality
11
+ * Each query must contain a categoryId filter
12
+ */
13
+ export declare function searchItems(payload: SearchItemsRequest): RequestOptionsFactory<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
14
+ /**
15
+ * Query items allowing to sort by specified fields, all filters only support equality
16
+ * Each query must contain a categoryId filter
17
+ */
18
+ export declare function queryItems(payload: QueryItemsRequest): RequestOptionsFactory<QueryItemsResponse & QueryItemsResponseNonNullableFields>;
19
+ /** Update an item */
20
+ export declare function updateItem(payload: UpdateItemRequest): RequestOptionsFactory<UpdateItemResponse & UpdateItemResponseNonNullableFields>;
21
+ /** Bulk update an item */
22
+ export declare function bulkUpdateItem(payload: BulkUpdateItemRequest): RequestOptionsFactory<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
23
+ /** Get item details */
24
+ export declare function getItem(payload: GetItemRequest): RequestOptionsFactory<GetItemResponse & GetItemResponseNonNullableFields>;
25
+ /** Link the item to multiple categories */
26
+ export declare function linkItemToCategories(payload: LinkItemToCategoriesRequest): RequestOptionsFactory<LinkItemToCategoriesResponse>;
27
+ /** Unlink the item from multiple categories */
28
+ export declare function unlinkItemFromCategories(payload: UnlinkItemFromCategoriesRequest): RequestOptionsFactory<UnlinkItemFromCategoriesResponse>;
29
+ /** Overwrite item categories */
30
+ export declare function overwriteItemCategories(payload: OverwriteItemCategoriesRequest): RequestOptionsFactory<OverwriteItemCategoriesResponse>;