@wix/auto_sdk_blog_categories 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,6 +156,39 @@ interface Image {
156
156
  */
157
157
  filename?: string | null;
158
158
  }
159
+ interface FocalPoint {
160
+ /** X-coordinate of the focal point. */
161
+ x?: number;
162
+ /** Y-coordinate of the focal point. */
163
+ y?: number;
164
+ /** crop by height */
165
+ height?: number | null;
166
+ /** crop by width */
167
+ width?: number | null;
168
+ }
169
+ interface CategoryTranslation {
170
+ /**
171
+ * Category ID.
172
+ * @format GUID
173
+ */
174
+ id?: string;
175
+ /**
176
+ * Label displayed in the categories menu on the site.
177
+ * @maxLength 100
178
+ */
179
+ label?: string | null;
180
+ /**
181
+ * Language of the category.
182
+ * @format LANGUAGE_TAG
183
+ */
184
+ language?: string | null;
185
+ /** URL of this category page. */
186
+ url?: PageUrl;
187
+ }
188
+ interface InitialCategoriesCopied {
189
+ /** Number of categories copied. */
190
+ count?: number;
191
+ }
159
192
  interface CreateCategoryRequest {
160
193
  /** Category info. */
161
194
  category: Category;
@@ -182,6 +215,94 @@ interface CreateCategoryResponse {
182
215
  /** Category info. */
183
216
  category?: Category;
184
217
  }
218
+ interface BulkCreateCategoriesRequest {
219
+ /**
220
+ * Categories to create.
221
+ * @minSize 1
222
+ * @maxSize 50
223
+ */
224
+ categories?: Category[];
225
+ /** Whether to return the full created category entities in the response. */
226
+ returnFullEntity?: boolean;
227
+ /**
228
+ * List of additional category fields to include in the response. By default
229
+ * only the category’s base fields are returned. Base fields are all category fields that don't appear in the fieldset enum.
230
+ *
231
+ * To retrieve a field, pass the relevant fieldset in the enum in the `fieldsets` array. For example, add the `URL` fieldset to `fieldsets` to
232
+ * retrieve the url field in the response in addition to the category’s base fields.
233
+ * @maxSize 10
234
+ */
235
+ fieldsets?: FieldWithLiterals[];
236
+ }
237
+ interface BulkCreateCategoriesResponse {
238
+ /** Categories created by bulk action. */
239
+ results?: BulkCategoryResult[];
240
+ /** Bulk action metadata. */
241
+ bulkActionMetadata?: BulkActionMetadata;
242
+ }
243
+ interface BulkCategoryResult {
244
+ /** Bulk actions metadata for category. */
245
+ itemMetadata?: ItemMetadata;
246
+ /** Optional created category. */
247
+ item?: Category;
248
+ }
249
+ interface ItemMetadata {
250
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
251
+ id?: string | null;
252
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
253
+ originalIndex?: number;
254
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
255
+ success?: boolean;
256
+ /** Details about the error in case of failure. */
257
+ error?: ApplicationError;
258
+ }
259
+ interface ApplicationError {
260
+ /** Error code. */
261
+ code?: string;
262
+ /** Description of the error. */
263
+ description?: string;
264
+ /** Data related to the error. */
265
+ data?: Record<string, any> | null;
266
+ }
267
+ interface BulkActionMetadata {
268
+ /** Number of items that were successfully processed. */
269
+ totalSuccesses?: number;
270
+ /** Number of items that couldn't be processed. */
271
+ totalFailures?: number;
272
+ /** Number of failures without details because detailed failure threshold was exceeded. */
273
+ undetailedFailures?: number;
274
+ }
275
+ interface BulkUpdateCategoriesRequest {
276
+ /**
277
+ * Categories to update.
278
+ * @minSize 1
279
+ * @maxSize 100
280
+ */
281
+ categories?: MaskedCategory[];
282
+ /** Whether to return the full created category entities in the response. */
283
+ returnFullEntity?: boolean;
284
+ /**
285
+ * List of additional category fields to include in the response. By default
286
+ * only the category’s base fields are returned. Base fields are all category fields that don't appear in the fieldset enum.
287
+ *
288
+ * To retrieve a field, pass the relevant fieldset in the enum in the `fieldsets` array. For example, add the `URL` fieldset to `fieldsets` to
289
+ * retrieve the url field in the response in addition to the category’s base fields.
290
+ * @maxSize 10
291
+ */
292
+ fieldsets?: FieldWithLiterals[];
293
+ }
294
+ interface MaskedCategory {
295
+ /** Category */
296
+ category?: Category;
297
+ /** Field mask of fields to update. */
298
+ fieldMask?: string[];
299
+ }
300
+ interface BulkUpdateCategoriesResponse {
301
+ /** Categories updated by bulk action. */
302
+ results?: BulkCategoryResult[];
303
+ /** Bulk action metadata. */
304
+ bulkActionMetadata?: BulkActionMetadata;
305
+ }
185
306
  interface UpdateCategoryRequest {
186
307
  /** Category info. */
187
308
  category: Category;
@@ -199,6 +320,21 @@ interface UpdateCategoryResponse {
199
320
  /** Category info. */
200
321
  category?: Category;
201
322
  }
323
+ interface GetCategoriesCountByLanguageRequest {
324
+ }
325
+ interface GetCategoriesCountByLanguageResponse {
326
+ /** The language and it's count. */
327
+ categoriesLanguageCount?: CategoryLanguageCount[];
328
+ }
329
+ interface CategoryLanguageCount {
330
+ /**
331
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
332
+ * @format LANGUAGE_TAG
333
+ */
334
+ languageCode?: string | null;
335
+ /** The count of Categories for the language. */
336
+ categoryCount?: number | null;
337
+ }
202
338
  interface GetCategoryRequest {
203
339
  /**
204
340
  * Category ID.
@@ -422,6 +558,19 @@ interface Cursors {
422
558
  */
423
559
  prev?: string | null;
424
560
  }
561
+ interface BulkDeleteCategoryRequest {
562
+ /**
563
+ * Category IDs.
564
+ * @minSize 1
565
+ * @maxSize 100
566
+ * @maxLength 38
567
+ */
568
+ categoryIds?: string[];
569
+ /** Should delete bypassing the trash-bin. */
570
+ permanent?: boolean;
571
+ }
572
+ interface BulkDeleteCategoryResponse {
573
+ }
425
574
  interface DeleteCategoryRequest {
426
575
  /**
427
576
  * Category ID.
@@ -432,6 +581,142 @@ interface DeleteCategoryRequest {
432
581
  }
433
582
  interface DeleteCategoryResponse {
434
583
  }
584
+ interface DomainEvent extends DomainEventBodyOneOf {
585
+ createdEvent?: EntityCreatedEvent;
586
+ updatedEvent?: EntityUpdatedEvent;
587
+ deletedEvent?: EntityDeletedEvent;
588
+ actionEvent?: ActionEvent;
589
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
590
+ id?: string;
591
+ /**
592
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
593
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
594
+ */
595
+ entityFqdn?: string;
596
+ /**
597
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
598
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
599
+ */
600
+ slug?: string;
601
+ /** ID of the entity associated with the event. */
602
+ entityId?: string;
603
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
604
+ eventTime?: Date | null;
605
+ /**
606
+ * Whether the event was triggered as a result of a privacy regulation application
607
+ * (for example, GDPR).
608
+ */
609
+ triggeredByAnonymizeRequest?: boolean | null;
610
+ /** If present, indicates the action that triggered the event. */
611
+ originatedFrom?: string | null;
612
+ /**
613
+ * 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.
614
+ * 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.
615
+ */
616
+ entityEventSequence?: string | null;
617
+ }
618
+ /** @oneof */
619
+ interface DomainEventBodyOneOf {
620
+ createdEvent?: EntityCreatedEvent;
621
+ updatedEvent?: EntityUpdatedEvent;
622
+ deletedEvent?: EntityDeletedEvent;
623
+ actionEvent?: ActionEvent;
624
+ }
625
+ interface EntityCreatedEvent {
626
+ entityAsJson?: string;
627
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
628
+ restoreInfo?: RestoreInfo;
629
+ }
630
+ interface RestoreInfo {
631
+ deletedDate?: Date | null;
632
+ }
633
+ interface EntityUpdatedEvent {
634
+ /**
635
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
636
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
637
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
638
+ */
639
+ currentEntityAsJson?: string;
640
+ }
641
+ interface EntityDeletedEvent {
642
+ /** Entity that was deleted. */
643
+ deletedEntityAsJson?: string | null;
644
+ }
645
+ interface ActionEvent {
646
+ bodyAsJson?: string;
647
+ }
648
+ interface MessageEnvelope {
649
+ /**
650
+ * App instance ID.
651
+ * @format GUID
652
+ */
653
+ instanceId?: string | null;
654
+ /**
655
+ * Event type.
656
+ * @maxLength 150
657
+ */
658
+ eventType?: string;
659
+ /** The identification type and identity data. */
660
+ identity?: IdentificationData;
661
+ /** Stringify payload. */
662
+ data?: string;
663
+ }
664
+ interface IdentificationData extends IdentificationDataIdOneOf {
665
+ /**
666
+ * ID of a site visitor that has not logged in to the site.
667
+ * @format GUID
668
+ */
669
+ anonymousVisitorId?: string;
670
+ /**
671
+ * ID of a site visitor that has logged in to the site.
672
+ * @format GUID
673
+ */
674
+ memberId?: string;
675
+ /**
676
+ * ID of a Wix user (site owner, contributor, etc.).
677
+ * @format GUID
678
+ */
679
+ wixUserId?: string;
680
+ /**
681
+ * ID of an app.
682
+ * @format GUID
683
+ */
684
+ appId?: string;
685
+ /** @readonly */
686
+ identityType?: WebhookIdentityTypeWithLiterals;
687
+ }
688
+ /** @oneof */
689
+ interface IdentificationDataIdOneOf {
690
+ /**
691
+ * ID of a site visitor that has not logged in to the site.
692
+ * @format GUID
693
+ */
694
+ anonymousVisitorId?: string;
695
+ /**
696
+ * ID of a site visitor that has logged in to the site.
697
+ * @format GUID
698
+ */
699
+ memberId?: string;
700
+ /**
701
+ * ID of a Wix user (site owner, contributor, etc.).
702
+ * @format GUID
703
+ */
704
+ wixUserId?: string;
705
+ /**
706
+ * ID of an app.
707
+ * @format GUID
708
+ */
709
+ appId?: string;
710
+ }
711
+ declare enum WebhookIdentityType {
712
+ UNKNOWN = "UNKNOWN",
713
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
714
+ MEMBER = "MEMBER",
715
+ WIX_USER = "WIX_USER",
716
+ APP = "APP"
717
+ }
718
+ /** @enumType */
719
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
435
720
 
436
721
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
437
722
  getUrl: (context: any) => string;
@@ -459,4 +744,4 @@ declare function deleteCategory(): __PublicMethodMetaInfo<'DELETE', {
459
744
  categoryId: string;
460
745
  }, DeleteCategoryRequest$1, DeleteCategoryRequest, DeleteCategoryResponse$1, DeleteCategoryResponse>;
461
746
 
462
- export { type __PublicMethodMetaInfo, createCategory, deleteCategory, getCategory, getCategoryBySlug, listCategories, queryCategories, updateCategory };
747
+ export { type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BlogPaging as BlogPagingOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCategoryResult as BulkCategoryResultOriginal, type BulkCreateCategoriesRequest as BulkCreateCategoriesRequestOriginal, type BulkCreateCategoriesResponse as BulkCreateCategoriesResponseOriginal, type BulkDeleteCategoryRequest as BulkDeleteCategoryRequestOriginal, type BulkDeleteCategoryResponse as BulkDeleteCategoryResponseOriginal, type BulkUpdateCategoriesRequest as BulkUpdateCategoriesRequestOriginal, type BulkUpdateCategoriesResponse as BulkUpdateCategoriesResponseOriginal, type CategoryLanguageCount as CategoryLanguageCountOriginal, type Category as CategoryOriginal, type CategoryTranslation as CategoryTranslationOriginal, type CreateCategoryRequest as CreateCategoryRequestOriginal, type CreateCategoryResponse as CreateCategoryResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeleteCategoryRequest as DeleteCategoryRequestOriginal, type DeleteCategoryResponse as DeleteCategoryResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, Field as FieldOriginal, type FieldWithLiterals as FieldWithLiteralsOriginal, type FocalPoint as FocalPointOriginal, type GetCategoriesCountByLanguageRequest as GetCategoriesCountByLanguageRequestOriginal, type GetCategoriesCountByLanguageResponse as GetCategoriesCountByLanguageResponseOriginal, type GetCategoryBySlugRequest as GetCategoryBySlugRequestOriginal, type GetCategoryBySlugResponse as GetCategoryBySlugResponseOriginal, type GetCategoryRequest as GetCategoryRequestOriginal, type GetCategoryResponse as GetCategoryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type Image as ImageOriginal, type InitialCategoriesCopied as InitialCategoriesCopiedOriginal, type ItemMetadata as ItemMetadataOriginal, type Keyword as KeywordOriginal, type ListCategoriesRequest as ListCategoriesRequestOriginal, type ListCategoriesResponse as ListCategoriesResponseOriginal, type MaskedCategory as MaskedCategoryOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MetaData as MetaDataOriginal, type PageUrl as PageUrlOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PlatformQuery as PlatformQueryOriginal, type PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOfOriginal, type QueryCategoriesRequest as QueryCategoriesRequestOriginal, type QueryCategoriesResponse as QueryCategoriesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type SeoSchema as SeoSchemaOriginal, type Settings as SettingsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type Tag as TagOriginal, type UpdateCategoryRequest as UpdateCategoryRequestOriginal, type UpdateCategoryResponse as UpdateCategoryResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createCategory, deleteCategory, getCategory, getCategoryBySlug, listCategories, queryCategories, updateCategory };
package/build/cjs/meta.js CHANGED
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
+ FieldOriginal: () => Field,
24
+ SortOrderOriginal: () => SortOrder,
25
+ WebhookIdentityTypeOriginal: () => WebhookIdentityType,
23
26
  createCategory: () => createCategory2,
24
27
  deleteCategory: () => deleteCategory2,
25
28
  getCategory: () => getCategory2,
@@ -176,6 +179,9 @@ function createCategory(payload) {
176
179
  method: "POST",
177
180
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.CreateCategory",
178
181
  packageName: PACKAGE_NAME,
182
+ migrationOptions: {
183
+ optInTransformResponse: true
184
+ },
179
185
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
180
186
  { protoPath: "/v3/categories", data: serializedData, host }
181
187
  ),
@@ -228,6 +234,9 @@ function updateCategory(payload) {
228
234
  method: "PATCH",
229
235
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.UpdateCategory",
230
236
  packageName: PACKAGE_NAME,
237
+ migrationOptions: {
238
+ optInTransformResponse: true
239
+ },
231
240
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
232
241
  {
233
242
  protoPath: "/v3/categories/{category.id}",
@@ -264,6 +273,9 @@ function getCategory(payload) {
264
273
  method: "GET",
265
274
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategory",
266
275
  packageName: PACKAGE_NAME,
276
+ migrationOptions: {
277
+ optInTransformResponse: true
278
+ },
267
279
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
268
280
  { protoPath: "/v3/categories/{categoryId}", data: payload, host }
269
281
  ),
@@ -296,6 +308,9 @@ function getCategoryBySlug(payload) {
296
308
  method: "GET",
297
309
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategoryBySlug",
298
310
  packageName: PACKAGE_NAME,
311
+ migrationOptions: {
312
+ optInTransformResponse: true
313
+ },
299
314
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
300
315
  { protoPath: "/v3/categories/slugs/{slug}", data: payload, host }
301
316
  ),
@@ -328,6 +343,9 @@ function listCategories(payload) {
328
343
  method: "GET",
329
344
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories",
330
345
  packageName: PACKAGE_NAME,
346
+ migrationOptions: {
347
+ optInTransformResponse: true
348
+ },
331
349
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
332
350
  { protoPath: "/v3/categories", data: payload, host }
333
351
  ),
@@ -360,6 +378,9 @@ function queryCategories(payload) {
360
378
  method: "POST",
361
379
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.QueryCategories",
362
380
  packageName: PACKAGE_NAME,
381
+ migrationOptions: {
382
+ optInTransformResponse: true
383
+ },
363
384
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
364
385
  { protoPath: "/v3/categories/query", data: payload, host }
365
386
  ),
@@ -392,6 +413,9 @@ function deleteCategory(payload) {
392
413
  method: "DELETE",
393
414
  methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.CategoryService.DeleteCategory",
394
415
  packageName: PACKAGE_NAME,
416
+ migrationOptions: {
417
+ optInTransformResponse: true
418
+ },
395
419
  url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(
396
420
  { protoPath: "/v3/categories/{categoryId}", data: payload, host }
397
421
  ),
@@ -402,6 +426,27 @@ function deleteCategory(payload) {
402
426
  return __deleteCategory;
403
427
  }
404
428
 
429
+ // src/blog-v3-category-categories.types.ts
430
+ var Field = /* @__PURE__ */ ((Field2) => {
431
+ Field2["UNKNOWN"] = "UNKNOWN";
432
+ Field2["URL"] = "URL";
433
+ Field2["SEO"] = "SEO";
434
+ return Field2;
435
+ })(Field || {});
436
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
437
+ SortOrder2["ASC"] = "ASC";
438
+ SortOrder2["DESC"] = "DESC";
439
+ return SortOrder2;
440
+ })(SortOrder || {});
441
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
442
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
443
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
444
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
445
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
446
+ WebhookIdentityType2["APP"] = "APP";
447
+ return WebhookIdentityType2;
448
+ })(WebhookIdentityType || {});
449
+
405
450
  // src/blog-v3-category-categories.meta.ts
406
451
  function createCategory2() {
407
452
  const payload = {};
@@ -531,6 +576,9 @@ function deleteCategory2() {
531
576
  }
532
577
  // Annotate the CommonJS export names for ESM import in node:
533
578
  0 && (module.exports = {
579
+ FieldOriginal,
580
+ SortOrderOriginal,
581
+ WebhookIdentityTypeOriginal,
534
582
  createCategory,
535
583
  deleteCategory,
536
584
  getCategory,