@wix/auto_sdk_online-programs_sections 1.0.34 → 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 +38 -68
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -186
- package/build/cjs/index.typings.js +33 -58
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -96
- package/build/cjs/meta.js +4 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +7 -7
- package/build/es/index.mjs +38 -68
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -186
- package/build/es/index.typings.mjs +33 -58
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -96
- package/build/es/meta.mjs +4 -4
- 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/es/index.d.mts
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.mjs';
|
|
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.mjs';
|
|
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/es/index.mjs
CHANGED
|
@@ -105,10 +105,6 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
|
|
|
105
105
|
}
|
|
106
106
|
],
|
|
107
107
|
"www.wixapis.com": [
|
|
108
|
-
{
|
|
109
|
-
srcPath: "/program-sections-service",
|
|
110
|
-
destPath: ""
|
|
111
|
-
},
|
|
112
108
|
{
|
|
113
109
|
srcPath: "/online-programs/v3/sections",
|
|
114
110
|
destPath: "/v3/sections"
|
|
@@ -116,6 +112,10 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
|
|
|
116
112
|
{
|
|
117
113
|
srcPath: "/online-programs/v3/bulk/sections",
|
|
118
114
|
destPath: "/v3/bulk/sections"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
srcPath: "/program-sections-service",
|
|
118
|
+
destPath: ""
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
};
|
|
@@ -520,12 +520,9 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
520
520
|
WebhookIdentityType2["APP"] = "APP";
|
|
521
521
|
return WebhookIdentityType2;
|
|
522
522
|
})(WebhookIdentityType || {});
|
|
523
|
-
async function createSection2(section
|
|
524
|
-
const { httpClient, sideEffects } = arguments[
|
|
525
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
526
|
-
section,
|
|
527
|
-
fields: options?.fields
|
|
528
|
-
});
|
|
523
|
+
async function createSection2(section) {
|
|
524
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
525
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ section });
|
|
529
526
|
const reqOpts = createSection(payload);
|
|
530
527
|
sideEffects?.onSiteCall?.();
|
|
531
528
|
try {
|
|
@@ -537,21 +534,18 @@ async function createSection2(section, options) {
|
|
|
537
534
|
err,
|
|
538
535
|
{
|
|
539
536
|
spreadPathsToArguments: {},
|
|
540
|
-
explicitPathsToArguments: { section: "$[0]"
|
|
537
|
+
explicitPathsToArguments: { section: "$[0]" },
|
|
541
538
|
singleArgumentUnchanged: false
|
|
542
539
|
},
|
|
543
|
-
["section"
|
|
540
|
+
["section"]
|
|
544
541
|
);
|
|
545
542
|
sideEffects?.onError?.(err);
|
|
546
543
|
throw transformedError;
|
|
547
544
|
}
|
|
548
545
|
}
|
|
549
|
-
async function bulkCreateSections2(sections
|
|
550
|
-
const { httpClient, sideEffects } = arguments[
|
|
551
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
552
|
-
sections,
|
|
553
|
-
fields: options?.fields
|
|
554
|
-
});
|
|
546
|
+
async function bulkCreateSections2(sections) {
|
|
547
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
548
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ sections });
|
|
555
549
|
const reqOpts = bulkCreateSections(payload);
|
|
556
550
|
sideEffects?.onSiteCall?.();
|
|
557
551
|
try {
|
|
@@ -563,21 +557,19 @@ async function bulkCreateSections2(sections, options) {
|
|
|
563
557
|
err,
|
|
564
558
|
{
|
|
565
559
|
spreadPathsToArguments: {},
|
|
566
|
-
explicitPathsToArguments: { sections: "$[0]"
|
|
560
|
+
explicitPathsToArguments: { sections: "$[0]" },
|
|
567
561
|
singleArgumentUnchanged: false
|
|
568
562
|
},
|
|
569
|
-
["sections"
|
|
563
|
+
["sections"]
|
|
570
564
|
);
|
|
571
565
|
sideEffects?.onError?.(err);
|
|
572
566
|
throw transformedError;
|
|
573
567
|
}
|
|
574
568
|
}
|
|
575
|
-
async function getSection2(sectionId
|
|
576
|
-
const { httpClient, sideEffects } = arguments[
|
|
569
|
+
async function getSection2(sectionId) {
|
|
570
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
577
571
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
578
|
-
sectionId
|
|
579
|
-
descriptionFieldSet: options?.descriptionFieldSet,
|
|
580
|
-
fields: options?.fields
|
|
572
|
+
sectionId
|
|
581
573
|
});
|
|
582
574
|
const reqOpts = getSection(payload);
|
|
583
575
|
sideEffects?.onSiteCall?.();
|
|
@@ -590,14 +582,10 @@ async function getSection2(sectionId, options) {
|
|
|
590
582
|
err,
|
|
591
583
|
{
|
|
592
584
|
spreadPathsToArguments: {},
|
|
593
|
-
explicitPathsToArguments: {
|
|
594
|
-
sectionId: "$[0]",
|
|
595
|
-
descriptionFieldSet: "$[1].descriptionFieldSet",
|
|
596
|
-
fields: "$[1].fields"
|
|
597
|
-
},
|
|
585
|
+
explicitPathsToArguments: { sectionId: "$[0]" },
|
|
598
586
|
singleArgumentUnchanged: false
|
|
599
587
|
},
|
|
600
|
-
["sectionId"
|
|
588
|
+
["sectionId"]
|
|
601
589
|
);
|
|
602
590
|
sideEffects?.onError?.(err);
|
|
603
591
|
throw transformedError;
|
|
@@ -606,8 +594,7 @@ async function getSection2(sectionId, options) {
|
|
|
606
594
|
async function updateSection2(_id, options) {
|
|
607
595
|
const { httpClient, sideEffects } = arguments[2];
|
|
608
596
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
609
|
-
section: { ...options?.section, id: _id }
|
|
610
|
-
fields: options?.fields
|
|
597
|
+
section: { ...options?.section, id: _id }
|
|
611
598
|
});
|
|
612
599
|
const reqOpts = updateSection(payload);
|
|
613
600
|
sideEffects?.onSiteCall?.();
|
|
@@ -620,10 +607,7 @@ async function updateSection2(_id, options) {
|
|
|
620
607
|
err,
|
|
621
608
|
{
|
|
622
609
|
spreadPathsToArguments: { section: "$[1].section" },
|
|
623
|
-
explicitPathsToArguments: {
|
|
624
|
-
"section.id": "$[0]",
|
|
625
|
-
fields: "$[1].fields"
|
|
626
|
-
},
|
|
610
|
+
explicitPathsToArguments: { "section.id": "$[0]" },
|
|
627
611
|
singleArgumentUnchanged: false
|
|
628
612
|
},
|
|
629
613
|
["_id", "options"]
|
|
@@ -731,12 +715,10 @@ async function typedQuerySections(query, options) {
|
|
|
731
715
|
var utils = {
|
|
732
716
|
query: /* @__PURE__ */ createQueryUtils()
|
|
733
717
|
};
|
|
734
|
-
async function listSections2(programId
|
|
735
|
-
const { httpClient, sideEffects } = arguments[
|
|
718
|
+
async function listSections2(programId) {
|
|
719
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
736
720
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
737
|
-
programId
|
|
738
|
-
descriptionFieldSet: options?.descriptionFieldSet,
|
|
739
|
-
fields: options?.fields
|
|
721
|
+
programId
|
|
740
722
|
});
|
|
741
723
|
const reqOpts = listSections(payload);
|
|
742
724
|
sideEffects?.onSiteCall?.();
|
|
@@ -749,24 +731,19 @@ async function listSections2(programId, options) {
|
|
|
749
731
|
err,
|
|
750
732
|
{
|
|
751
733
|
spreadPathsToArguments: {},
|
|
752
|
-
explicitPathsToArguments: {
|
|
753
|
-
programId: "$[0]",
|
|
754
|
-
descriptionFieldSet: "$[1].descriptionFieldSet",
|
|
755
|
-
fields: "$[1].fields"
|
|
756
|
-
},
|
|
734
|
+
explicitPathsToArguments: { programId: "$[0]" },
|
|
757
735
|
singleArgumentUnchanged: false
|
|
758
736
|
},
|
|
759
|
-
["programId"
|
|
737
|
+
["programId"]
|
|
760
738
|
);
|
|
761
739
|
sideEffects?.onError?.(err);
|
|
762
740
|
throw transformedError;
|
|
763
741
|
}
|
|
764
742
|
}
|
|
765
|
-
async function cloneSection2(sectionId
|
|
766
|
-
const { httpClient, sideEffects } = arguments[
|
|
743
|
+
async function cloneSection2(sectionId) {
|
|
744
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
767
745
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
768
|
-
sectionId
|
|
769
|
-
fields: options?.fields
|
|
746
|
+
sectionId
|
|
770
747
|
});
|
|
771
748
|
const reqOpts = cloneSection(payload);
|
|
772
749
|
sideEffects?.onSiteCall?.();
|
|
@@ -779,10 +756,10 @@ async function cloneSection2(sectionId, options) {
|
|
|
779
756
|
err,
|
|
780
757
|
{
|
|
781
758
|
spreadPathsToArguments: {},
|
|
782
|
-
explicitPathsToArguments: { sectionId: "$[0]"
|
|
759
|
+
explicitPathsToArguments: { sectionId: "$[0]" },
|
|
783
760
|
singleArgumentUnchanged: false
|
|
784
761
|
},
|
|
785
|
-
["sectionId"
|
|
762
|
+
["sectionId"]
|
|
786
763
|
);
|
|
787
764
|
sideEffects?.onError?.(err);
|
|
788
765
|
throw transformedError;
|
|
@@ -793,8 +770,7 @@ async function moveSection2(sectionId, options) {
|
|
|
793
770
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
794
771
|
sectionId,
|
|
795
772
|
afterSectionId: options?.afterSectionId,
|
|
796
|
-
revision: options?.revision
|
|
797
|
-
fields: options?.fields
|
|
773
|
+
revision: options?.revision
|
|
798
774
|
});
|
|
799
775
|
const reqOpts = moveSection(payload);
|
|
800
776
|
sideEffects?.onSiteCall?.();
|
|
@@ -810,8 +786,7 @@ async function moveSection2(sectionId, options) {
|
|
|
810
786
|
explicitPathsToArguments: {
|
|
811
787
|
sectionId: "$[0]",
|
|
812
788
|
afterSectionId: "$[1].afterSectionId",
|
|
813
|
-
revision: "$[1].revision"
|
|
814
|
-
fields: "$[1].fields"
|
|
789
|
+
revision: "$[1].revision"
|
|
815
790
|
},
|
|
816
791
|
singleArgumentUnchanged: false
|
|
817
792
|
},
|
|
@@ -824,25 +799,22 @@ async function moveSection2(sectionId, options) {
|
|
|
824
799
|
|
|
825
800
|
// src/online-programs-v3-section-sections.public.ts
|
|
826
801
|
function createSection3(httpClient) {
|
|
827
|
-
return (section
|
|
802
|
+
return (section) => createSection2(
|
|
828
803
|
section,
|
|
829
|
-
options,
|
|
830
804
|
// @ts-ignore
|
|
831
805
|
{ httpClient }
|
|
832
806
|
);
|
|
833
807
|
}
|
|
834
808
|
function bulkCreateSections3(httpClient) {
|
|
835
|
-
return (sections
|
|
809
|
+
return (sections) => bulkCreateSections2(
|
|
836
810
|
sections,
|
|
837
|
-
options,
|
|
838
811
|
// @ts-ignore
|
|
839
812
|
{ httpClient }
|
|
840
813
|
);
|
|
841
814
|
}
|
|
842
815
|
function getSection3(httpClient) {
|
|
843
|
-
return (sectionId
|
|
816
|
+
return (sectionId) => getSection2(
|
|
844
817
|
sectionId,
|
|
845
|
-
options,
|
|
846
818
|
// @ts-ignore
|
|
847
819
|
{ httpClient }
|
|
848
820
|
);
|
|
@@ -878,17 +850,15 @@ function typedQuerySections2(httpClient) {
|
|
|
878
850
|
);
|
|
879
851
|
}
|
|
880
852
|
function listSections3(httpClient) {
|
|
881
|
-
return (programId
|
|
853
|
+
return (programId) => listSections2(
|
|
882
854
|
programId,
|
|
883
|
-
options,
|
|
884
855
|
// @ts-ignore
|
|
885
856
|
{ httpClient }
|
|
886
857
|
);
|
|
887
858
|
}
|
|
888
859
|
function cloneSection3(httpClient) {
|
|
889
|
-
return (sectionId
|
|
860
|
+
return (sectionId) => cloneSection2(
|
|
890
861
|
sectionId,
|
|
891
|
-
options,
|
|
892
862
|
// @ts-ignore
|
|
893
863
|
{ httpClient }
|
|
894
864
|
);
|