@wix/auto_sdk_online-programs_sections 1.0.35 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +7 -7
- package/build/cjs/index.js +34 -64
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -186
- package/build/cjs/index.typings.js +29 -54
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -96
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +7 -7
- package/build/es/index.mjs +34 -64
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -186
- package/build/es/index.typings.mjs +29 -54
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -96
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +7 -7
- package/build/internal/cjs/index.typings.d.ts +37 -84
- package/build/internal/cjs/meta.d.ts +27 -5
- package/build/internal/es/index.d.mts +7 -7
- package/build/internal/es/index.typings.d.mts +37 -84
- package/build/internal/es/meta.d.mts +27 -5
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Section,
|
|
2
|
+
import { Section, BulkCreateSectionsResponse, UpdateSectionOptions, ListSectionsResponse, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, SectionClonedEnvelope, SectionCreatedEnvelope, SectionDeletedEnvelope, SectionUpdatedEnvelope, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteAllProgramSectionsRequest, DeleteAllProgramSectionsResponse, DeleteByFilterOperation, DeleteByIdsOperation, DeleteSectionRequest, DeleteSectionResponse, Description, DescriptionFieldSet, DescriptionFieldSetWithLiterals, DocumentImage, DocumentPayload, DocumentUpdateOperation, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, EventMetadata, ExtendedFields, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, IndexDocument, ItemMetadata, ListSectionsRequest, MessageEnvelope, MoveSectionRequest, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
|
|
@@ -15,7 +15,7 @@ interface CreateSectionSignature {
|
|
|
15
15
|
* @param - Section to create. Must include `section.programId`.
|
|
16
16
|
* @returns Created section.
|
|
17
17
|
*/
|
|
18
|
-
(section: NonNullablePaths<Section, `programId`, 0
|
|
18
|
+
(section: NonNullablePaths<Section, `programId`, 0>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `ordering` | `delayInDays`, 1>>;
|
|
19
19
|
}
|
|
20
20
|
declare function bulkCreateSections$1(httpClient: HttpClient): BulkCreateSectionsSignature;
|
|
21
21
|
interface BulkCreateSectionsSignature {
|
|
@@ -29,7 +29,7 @@ interface BulkCreateSectionsSignature {
|
|
|
29
29
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
30
30
|
* @param - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
31
31
|
*/
|
|
32
|
-
(sections: NonNullablePaths<Section, `programId`, 0>[]
|
|
32
|
+
(sections: NonNullablePaths<Section, `programId`, 0>[]): Promise<NonNullablePaths<BulkCreateSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
33
33
|
}
|
|
34
34
|
declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
|
|
35
35
|
interface GetSectionSignature {
|
|
@@ -38,7 +38,7 @@ interface GetSectionSignature {
|
|
|
38
38
|
* @param - ID of the Section to retrieve.
|
|
39
39
|
* @returns Retrieved section.
|
|
40
40
|
*/
|
|
41
|
-
(sectionId: string
|
|
41
|
+
(sectionId: string): Promise<NonNullablePaths<Section, `programId` | `description.title` | `ordering` | `delayInDays`, 1>>;
|
|
42
42
|
}
|
|
43
43
|
declare function updateSection$1(httpClient: HttpClient): UpdateSectionSignature;
|
|
44
44
|
interface UpdateSectionSignature {
|
|
@@ -75,7 +75,7 @@ interface ListSectionsSignature {
|
|
|
75
75
|
* To filter sections, apply custom sorting or paging, or query across programs, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
|
|
76
76
|
* @param - Program ID to list sections for.
|
|
77
77
|
*/
|
|
78
|
-
(programId: string
|
|
78
|
+
(programId: string): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 3>>;
|
|
79
79
|
}
|
|
80
80
|
declare function cloneSection$1(httpClient: HttpClient): CloneSectionSignature;
|
|
81
81
|
interface CloneSectionSignature {
|
|
@@ -91,7 +91,7 @@ interface CloneSectionSignature {
|
|
|
91
91
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
92
92
|
* @param - ID of the section to clone.
|
|
93
93
|
*/
|
|
94
|
-
(sectionId: string
|
|
94
|
+
(sectionId: string): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.ordering` | `section.delayInDays`, 2>>;
|
|
95
95
|
}
|
|
96
96
|
declare function moveSection$1(httpClient: HttpClient): MoveSectionSignature;
|
|
97
97
|
interface MoveSectionSignature {
|
|
@@ -140,4 +140,4 @@ declare const onSectionDeleted: BuildEventDefinition<typeof onSectionDeleted$1>
|
|
|
140
140
|
*/
|
|
141
141
|
declare const onSectionUpdated: BuildEventDefinition<typeof onSectionUpdated$1> & typeof onSectionUpdated$1;
|
|
142
142
|
|
|
143
|
-
export {
|
|
143
|
+
export { BulkCreateSectionsResponse, CloneSectionResponse, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, QuerySectionsOptions, Section, SectionClonedEnvelope, SectionCreatedEnvelope, SectionDeletedEnvelope, SectionQuery, SectionUpdatedEnvelope, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, onSectionCloned, onSectionCreated, onSectionDeleted, onSectionUpdated, querySections, updateSection };
|
package/build/cjs/index.js
CHANGED
|
@@ -564,12 +564,9 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
564
564
|
WebhookIdentityType2["APP"] = "APP";
|
|
565
565
|
return WebhookIdentityType2;
|
|
566
566
|
})(WebhookIdentityType || {});
|
|
567
|
-
async function createSection2(section
|
|
568
|
-
const { httpClient, sideEffects } = arguments[
|
|
569
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
570
|
-
section,
|
|
571
|
-
fields: options?.fields
|
|
572
|
-
});
|
|
567
|
+
async function createSection2(section) {
|
|
568
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
569
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ section });
|
|
573
570
|
const reqOpts = createSection(payload);
|
|
574
571
|
sideEffects?.onSiteCall?.();
|
|
575
572
|
try {
|
|
@@ -581,21 +578,18 @@ async function createSection2(section, options) {
|
|
|
581
578
|
err,
|
|
582
579
|
{
|
|
583
580
|
spreadPathsToArguments: {},
|
|
584
|
-
explicitPathsToArguments: { section: "$[0]"
|
|
581
|
+
explicitPathsToArguments: { section: "$[0]" },
|
|
585
582
|
singleArgumentUnchanged: false
|
|
586
583
|
},
|
|
587
|
-
["section"
|
|
584
|
+
["section"]
|
|
588
585
|
);
|
|
589
586
|
sideEffects?.onError?.(err);
|
|
590
587
|
throw transformedError;
|
|
591
588
|
}
|
|
592
589
|
}
|
|
593
|
-
async function bulkCreateSections2(sections
|
|
594
|
-
const { httpClient, sideEffects } = arguments[
|
|
595
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
596
|
-
sections,
|
|
597
|
-
fields: options?.fields
|
|
598
|
-
});
|
|
590
|
+
async function bulkCreateSections2(sections) {
|
|
591
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
592
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ sections });
|
|
599
593
|
const reqOpts = bulkCreateSections(payload);
|
|
600
594
|
sideEffects?.onSiteCall?.();
|
|
601
595
|
try {
|
|
@@ -607,21 +601,19 @@ async function bulkCreateSections2(sections, options) {
|
|
|
607
601
|
err,
|
|
608
602
|
{
|
|
609
603
|
spreadPathsToArguments: {},
|
|
610
|
-
explicitPathsToArguments: { sections: "$[0]"
|
|
604
|
+
explicitPathsToArguments: { sections: "$[0]" },
|
|
611
605
|
singleArgumentUnchanged: false
|
|
612
606
|
},
|
|
613
|
-
["sections"
|
|
607
|
+
["sections"]
|
|
614
608
|
);
|
|
615
609
|
sideEffects?.onError?.(err);
|
|
616
610
|
throw transformedError;
|
|
617
611
|
}
|
|
618
612
|
}
|
|
619
|
-
async function getSection2(sectionId
|
|
620
|
-
const { httpClient, sideEffects } = arguments[
|
|
613
|
+
async function getSection2(sectionId) {
|
|
614
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
621
615
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
622
|
-
sectionId
|
|
623
|
-
descriptionFieldSet: options?.descriptionFieldSet,
|
|
624
|
-
fields: options?.fields
|
|
616
|
+
sectionId
|
|
625
617
|
});
|
|
626
618
|
const reqOpts = getSection(payload);
|
|
627
619
|
sideEffects?.onSiteCall?.();
|
|
@@ -634,14 +626,10 @@ async function getSection2(sectionId, options) {
|
|
|
634
626
|
err,
|
|
635
627
|
{
|
|
636
628
|
spreadPathsToArguments: {},
|
|
637
|
-
explicitPathsToArguments: {
|
|
638
|
-
sectionId: "$[0]",
|
|
639
|
-
descriptionFieldSet: "$[1].descriptionFieldSet",
|
|
640
|
-
fields: "$[1].fields"
|
|
641
|
-
},
|
|
629
|
+
explicitPathsToArguments: { sectionId: "$[0]" },
|
|
642
630
|
singleArgumentUnchanged: false
|
|
643
631
|
},
|
|
644
|
-
["sectionId"
|
|
632
|
+
["sectionId"]
|
|
645
633
|
);
|
|
646
634
|
sideEffects?.onError?.(err);
|
|
647
635
|
throw transformedError;
|
|
@@ -650,8 +638,7 @@ async function getSection2(sectionId, options) {
|
|
|
650
638
|
async function updateSection2(_id, options) {
|
|
651
639
|
const { httpClient, sideEffects } = arguments[2];
|
|
652
640
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
653
|
-
section: { ...options?.section, id: _id }
|
|
654
|
-
fields: options?.fields
|
|
641
|
+
section: { ...options?.section, id: _id }
|
|
655
642
|
});
|
|
656
643
|
const reqOpts = updateSection(payload);
|
|
657
644
|
sideEffects?.onSiteCall?.();
|
|
@@ -664,10 +651,7 @@ async function updateSection2(_id, options) {
|
|
|
664
651
|
err,
|
|
665
652
|
{
|
|
666
653
|
spreadPathsToArguments: { section: "$[1].section" },
|
|
667
|
-
explicitPathsToArguments: {
|
|
668
|
-
"section.id": "$[0]",
|
|
669
|
-
fields: "$[1].fields"
|
|
670
|
-
},
|
|
654
|
+
explicitPathsToArguments: { "section.id": "$[0]" },
|
|
671
655
|
singleArgumentUnchanged: false
|
|
672
656
|
},
|
|
673
657
|
["_id", "options"]
|
|
@@ -775,12 +759,10 @@ async function typedQuerySections(query, options) {
|
|
|
775
759
|
var utils = {
|
|
776
760
|
query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
|
|
777
761
|
};
|
|
778
|
-
async function listSections2(programId
|
|
779
|
-
const { httpClient, sideEffects } = arguments[
|
|
762
|
+
async function listSections2(programId) {
|
|
763
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
780
764
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
781
|
-
programId
|
|
782
|
-
descriptionFieldSet: options?.descriptionFieldSet,
|
|
783
|
-
fields: options?.fields
|
|
765
|
+
programId
|
|
784
766
|
});
|
|
785
767
|
const reqOpts = listSections(payload);
|
|
786
768
|
sideEffects?.onSiteCall?.();
|
|
@@ -793,24 +775,19 @@ async function listSections2(programId, options) {
|
|
|
793
775
|
err,
|
|
794
776
|
{
|
|
795
777
|
spreadPathsToArguments: {},
|
|
796
|
-
explicitPathsToArguments: {
|
|
797
|
-
programId: "$[0]",
|
|
798
|
-
descriptionFieldSet: "$[1].descriptionFieldSet",
|
|
799
|
-
fields: "$[1].fields"
|
|
800
|
-
},
|
|
778
|
+
explicitPathsToArguments: { programId: "$[0]" },
|
|
801
779
|
singleArgumentUnchanged: false
|
|
802
780
|
},
|
|
803
|
-
["programId"
|
|
781
|
+
["programId"]
|
|
804
782
|
);
|
|
805
783
|
sideEffects?.onError?.(err);
|
|
806
784
|
throw transformedError;
|
|
807
785
|
}
|
|
808
786
|
}
|
|
809
|
-
async function cloneSection2(sectionId
|
|
810
|
-
const { httpClient, sideEffects } = arguments[
|
|
787
|
+
async function cloneSection2(sectionId) {
|
|
788
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
811
789
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
812
|
-
sectionId
|
|
813
|
-
fields: options?.fields
|
|
790
|
+
sectionId
|
|
814
791
|
});
|
|
815
792
|
const reqOpts = cloneSection(payload);
|
|
816
793
|
sideEffects?.onSiteCall?.();
|
|
@@ -823,10 +800,10 @@ async function cloneSection2(sectionId, options) {
|
|
|
823
800
|
err,
|
|
824
801
|
{
|
|
825
802
|
spreadPathsToArguments: {},
|
|
826
|
-
explicitPathsToArguments: { sectionId: "$[0]"
|
|
803
|
+
explicitPathsToArguments: { sectionId: "$[0]" },
|
|
827
804
|
singleArgumentUnchanged: false
|
|
828
805
|
},
|
|
829
|
-
["sectionId"
|
|
806
|
+
["sectionId"]
|
|
830
807
|
);
|
|
831
808
|
sideEffects?.onError?.(err);
|
|
832
809
|
throw transformedError;
|
|
@@ -837,8 +814,7 @@ async function moveSection2(sectionId, options) {
|
|
|
837
814
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
838
815
|
sectionId,
|
|
839
816
|
afterSectionId: options?.afterSectionId,
|
|
840
|
-
revision: options?.revision
|
|
841
|
-
fields: options?.fields
|
|
817
|
+
revision: options?.revision
|
|
842
818
|
});
|
|
843
819
|
const reqOpts = moveSection(payload);
|
|
844
820
|
sideEffects?.onSiteCall?.();
|
|
@@ -854,8 +830,7 @@ async function moveSection2(sectionId, options) {
|
|
|
854
830
|
explicitPathsToArguments: {
|
|
855
831
|
sectionId: "$[0]",
|
|
856
832
|
afterSectionId: "$[1].afterSectionId",
|
|
857
|
-
revision: "$[1].revision"
|
|
858
|
-
fields: "$[1].fields"
|
|
833
|
+
revision: "$[1].revision"
|
|
859
834
|
},
|
|
860
835
|
singleArgumentUnchanged: false
|
|
861
836
|
},
|
|
@@ -868,25 +843,22 @@ async function moveSection2(sectionId, options) {
|
|
|
868
843
|
|
|
869
844
|
// src/online-programs-v3-section-sections.public.ts
|
|
870
845
|
function createSection3(httpClient) {
|
|
871
|
-
return (section
|
|
846
|
+
return (section) => createSection2(
|
|
872
847
|
section,
|
|
873
|
-
options,
|
|
874
848
|
// @ts-ignore
|
|
875
849
|
{ httpClient }
|
|
876
850
|
);
|
|
877
851
|
}
|
|
878
852
|
function bulkCreateSections3(httpClient) {
|
|
879
|
-
return (sections
|
|
853
|
+
return (sections) => bulkCreateSections2(
|
|
880
854
|
sections,
|
|
881
|
-
options,
|
|
882
855
|
// @ts-ignore
|
|
883
856
|
{ httpClient }
|
|
884
857
|
);
|
|
885
858
|
}
|
|
886
859
|
function getSection3(httpClient) {
|
|
887
|
-
return (sectionId
|
|
860
|
+
return (sectionId) => getSection2(
|
|
888
861
|
sectionId,
|
|
889
|
-
options,
|
|
890
862
|
// @ts-ignore
|
|
891
863
|
{ httpClient }
|
|
892
864
|
);
|
|
@@ -922,17 +894,15 @@ function typedQuerySections2(httpClient) {
|
|
|
922
894
|
);
|
|
923
895
|
}
|
|
924
896
|
function listSections3(httpClient) {
|
|
925
|
-
return (programId
|
|
897
|
+
return (programId) => listSections2(
|
|
926
898
|
programId,
|
|
927
|
-
options,
|
|
928
899
|
// @ts-ignore
|
|
929
900
|
{ httpClient }
|
|
930
901
|
);
|
|
931
902
|
}
|
|
932
903
|
function cloneSection3(httpClient) {
|
|
933
|
-
return (sectionId
|
|
904
|
+
return (sectionId) => cloneSection2(
|
|
934
905
|
sectionId,
|
|
935
|
-
options,
|
|
936
906
|
// @ts-ignore
|
|
937
907
|
{ httpClient }
|
|
938
908
|
);
|