@wix/auto_sdk_restaurants_sections 1.0.32 → 1.0.34

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.
@@ -1,12 +1,17 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { DuplicateSectionOptions, DuplicateSectionResponse, Section, BulkCreateSectionsOptions, BulkCreateSectionsResponse, ListSectionsOptions, ListSectionsResponse, SectionsQueryBuilder, UpdateSection, MaskedSection, BulkUpdateSectionOptions, BulkUpdateSectionResponse, BulkDeleteSectionsResponse, SectionCreatedEnvelope, SectionDeletedEnvelope, SectionUpdatedEnvelope } from './index.typings.js';
3
- export { ActionEvent, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateSectionResult, BulkCreateSectionsRequest, BulkDeleteSectionResult, BulkDeleteSectionsRequest, BulkItemResult, BulkSectionResult, BulkUpdateBusinessLocationIdRequest, BulkUpdateBusinessLocationIdResponse, BulkUpdateSectionRequest, CloneSectionsRequest, CloneSectionsResponse, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DeleteLocationIdFromItems, DeleteSectionRequest, DeleteSectionResponse, DomainEvent, DomainEventBodyOneOf, DuplicateSectionRequest, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReferenceInfo, File, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, ListSectionsRequest, MessageEnvelope, Page, QuerySectionsRequest, QuerySectionsResponse, RestoreInfo, SectionsQueryResult, SortOrder, Sorting, URI, UpdateSectionRequest, UpdateSectionResponse, WebhookIdentityType } from './index.typings.js';
3
+ export { ActionEvent, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateSectionResult, BulkCreateSectionsRequest, BulkDeleteSectionResult, BulkDeleteSectionsRequest, BulkItemResult, BulkSectionResult, BulkUpdateBusinessLocationIdRequest, BulkUpdateBusinessLocationIdResponse, BulkUpdateSectionRequest, CloneSectionsRequest, CloneSectionsResponse, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DeleteLocationIdFromItems, DeleteSectionRequest, DeleteSectionResponse, DomainEvent, DomainEventBodyOneOf, DuplicateSectionRequest, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReferenceInfo, File, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, ListSectionsRequest, MessageEnvelope, Page, QuerySectionsRequest, QuerySectionsResponse, RestoreInfo, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, URI, UpdateSectionRequest, UpdateSectionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
- type SectionNonNullablePaths = `name` | `additionalImages` | `itemIds`;
6
5
  declare function duplicateSection$1(httpClient: HttpClient): DuplicateSectionSignature;
7
6
  interface DuplicateSectionSignature {
8
- /** @param - Section id to be duplicated. */
9
- (_id: string, options?: DuplicateSectionOptions): Promise<NonNullablePaths<DuplicateSectionResponse, `sectionId`>>;
7
+ /**
8
+ * Duplicates a section.
9
+ *
10
+ * You can duplicate a section to the same business location, or to 1 or more different business locations.
11
+ * You can specify whether to also duplicate the section's sub-entities, such as its items.
12
+ * @param - ID of the section to be duplicated.
13
+ */
14
+ (_id: string, options?: DuplicateSectionOptions): Promise<NonNullablePaths<DuplicateSectionResponse, `sectionId`, 2>>;
10
15
  }
11
16
  declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
12
17
  interface CreateSectionSignature {
@@ -19,7 +24,7 @@ interface CreateSectionSignature {
19
24
  * @param - Section details.
20
25
  * @returns Section.
21
26
  */
22
- (section: Section): Promise<NonNullablePaths<Section, SectionNonNullablePaths>>;
27
+ (section: Section): Promise<NonNullablePaths<Section, `name` | `additionalImages` | `itemIds`, 2>>;
23
28
  }
24
29
  declare function bulkCreateSections$1(httpClient: HttpClient): BulkCreateSectionsSignature;
25
30
  interface BulkCreateSectionsSignature {
@@ -29,9 +34,7 @@ interface BulkCreateSectionsSignature {
29
34
  * Creates multiple sections at once.
30
35
  * @param - Sections details.
31
36
  */
32
- (sections: Section[], options?: BulkCreateSectionsOptions): Promise<NonNullablePaths<BulkCreateSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
33
- [P in SectionNonNullablePaths]: `results.${number}.item.${P}`;
34
- }[SectionNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
37
+ (sections: Section[], options?: BulkCreateSectionsOptions): Promise<NonNullablePaths<BulkCreateSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.name` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
35
38
  }
36
39
  declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
37
40
  interface GetSectionSignature {
@@ -42,7 +45,7 @@ interface GetSectionSignature {
42
45
  * @param - Section ID.
43
46
  * @returns Section.
44
47
  */
45
- (sectionId: string): Promise<NonNullablePaths<Section, SectionNonNullablePaths>>;
48
+ (sectionId: string): Promise<NonNullablePaths<Section, `name` | `additionalImages` | `itemIds`, 2>>;
46
49
  }
47
50
  declare function listSections$1(httpClient: HttpClient): ListSectionsSignature;
48
51
  interface ListSectionsSignature {
@@ -51,9 +54,7 @@ interface ListSectionsSignature {
51
54
  *
52
55
  * Retrieves a list of up to 500 sections.
53
56
  */
54
- (options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, {
55
- [P in SectionNonNullablePaths]: `sections.${number}.${P}`;
56
- }[SectionNonNullablePaths]>>;
57
+ (options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.name`, 4>>;
57
58
  }
58
59
  declare function querySections$1(httpClient: HttpClient): QuerySectionsSignature;
59
60
  interface QuerySectionsSignature {
@@ -85,7 +86,7 @@ interface UpdateSectionSignature {
85
86
  * @param - Section ID.
86
87
  * @returns Updated section.
87
88
  */
88
- (_id: string, section: NonNullablePaths<UpdateSection, `revision`>): Promise<NonNullablePaths<Section, SectionNonNullablePaths>>;
89
+ (_id: string, section: NonNullablePaths<UpdateSection, `revision`, 2>): Promise<NonNullablePaths<Section, `name` | `additionalImages` | `itemIds`, 2>>;
89
90
  }
90
91
  declare function bulkUpdateSection$1(httpClient: HttpClient): BulkUpdateSectionSignature;
91
92
  interface BulkUpdateSectionSignature {
@@ -97,9 +98,7 @@ interface BulkUpdateSectionSignature {
97
98
  * Each time a section is updated, its revision increments by 1. The existing revision must be included when updating a section. This ensures you're working with the latest section information, and it prevents unintended overwrites.
98
99
  * @param - Sections to update.
99
100
  */
100
- (sections: NonNullablePaths<MaskedSection, `section._id` | `section.revision`>[], options?: BulkUpdateSectionOptions): Promise<NonNullablePaths<BulkUpdateSectionResponse, `results` | `results.${number}.sectionMetadata.originalIndex` | `results.${number}.sectionMetadata.success` | `results.${number}.sectionMetadata.error.code` | `results.${number}.sectionMetadata.error.description` | {
101
- [P in SectionNonNullablePaths]: `results.${number}.section.${P}`;
102
- }[SectionNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
101
+ (sections: NonNullablePaths<MaskedSection, `section._id` | `section.revision`, 3>[], options?: BulkUpdateSectionOptions): Promise<NonNullablePaths<BulkUpdateSectionResponse, `results` | `results.${number}.sectionMetadata.originalIndex` | `results.${number}.sectionMetadata.success` | `results.${number}.sectionMetadata.error.code` | `results.${number}.sectionMetadata.error.description` | `results.${number}.section.name` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
103
102
  }
104
103
  declare function deleteSection$1(httpClient: HttpClient): DeleteSectionSignature;
105
104
  interface DeleteSectionSignature {
@@ -119,7 +118,7 @@ interface BulkDeleteSectionsSignature {
119
118
  * Deletes multiple sections at once.
120
119
  * @param - Section IDs.
121
120
  */
122
- (ids: string[]): Promise<NonNullablePaths<BulkDeleteSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
121
+ (ids: string[]): Promise<NonNullablePaths<BulkDeleteSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
123
122
  }
124
123
  declare const onSectionCreated$1: EventDefinition<SectionCreatedEnvelope, "wix.restaurants.menus.v1.section_created">;
125
124
  declare const onSectionDeleted$1: EventDefinition<SectionDeletedEnvelope, "wix.restaurants.menus.v1.section_deleted">;