@wix/auto_sdk_online-programs_programs 1.0.6 → 1.0.8
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 +8 -11
- package/build/cjs/index.js +58 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +40 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/{online-programs-v3-program-programs.universal-lMRAEV0c.d.ts → online-programs-v3-program-programs.universal-YXMOfctc.d.ts} +7 -1
- package/build/es/index.d.mts +8 -11
- package/build/es/index.mjs +58 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +39 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/es/{online-programs-v3-program-programs.universal-lMRAEV0c.d.mts → online-programs-v3-program-programs.universal-YXMOfctc.d.mts} +7 -1
- package/build/internal/cjs/index.d.ts +8 -11
- package/build/internal/cjs/index.js +58 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js +40 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/cjs/{online-programs-v3-program-programs.universal-CxVOaZH3.d.ts → online-programs-v3-program-programs.universal-DlAnCRAK.d.ts} +7 -1
- package/build/internal/es/index.d.mts +8 -11
- package/build/internal/es/index.mjs +58 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs +39 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/build/internal/es/{online-programs-v3-program-programs.universal-CxVOaZH3.d.mts → online-programs-v3-program-programs.universal-DlAnCRAK.d.mts} +7 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { P as Program, D as DuplicateProgramResponse, U as UpdateProgram, a as UpdateProgramApplicationErrors, b as
|
|
3
|
-
export { i as AccessType,
|
|
2
|
+
import { P as Program, D as DuplicateProgramResponse, U as UpdateProgram, a as UpdateProgramApplicationErrors, b as ProgramSearch, S as SearchProgramsResponse, c as PublishProgramResponse, d as PublishProgramApplicationErrors, E as EndProgramResponse, A as ArchiveProgramResponse, M as MaskedProgram, B as BulkUpdateProgramsOptions, e as BulkUpdateProgramsResponse, C as CountProgramsOptions, f as CountProgramsResponse, L as ListSampleProgramsResponse, g as ProgramsQueryBuilder, Q as QueryV2, t as typedQueryPrograms } from './online-programs-v3-program-programs.universal-YXMOfctc.js';
|
|
3
|
+
export { i as AccessType, cM as AccessTypeWithLiterals, bS as ActionEvent, cu as Address, cv as AddressHint, b3 as Aggregation, bj as AggregationData, b4 as AggregationKindOneOf, bC as AggregationResults, bD as AggregationResultsResultOneOf, bq as AggregationResultsScalarResult, q as AggregationType, cW as AggregationTypeWithLiterals, aj as App, aE as ApplicationError, bG as ArchiveProgramRequest, bZ as Asset, aF as BulkActionMetadata, k as BulkActionType, cO as BulkActionTypeWithLiterals, az as BulkCreateProgramsMigrationRequest, aB as BulkCreateProgramsMigrationResponse, aC as BulkProgramResult, bI as BulkUpdateProgramResult, bH as BulkUpdateProgramsRequest, cx as BusinessSchedule, cs as Categories, a3 as Certificate, d5 as CommonSearchWithEntityContext, cC as ConsentPolicy, a6 as ContentSummary, bJ as CountProgramsRequest, ax as CreateProgramRequest, ay as CreateProgramResponse, aY as CursorPaging, bi as CursorPagingMetadata, b1 as CursorSearch, b2 as CursorSearchPagingMethodOneOf, a$ as Cursors, an as CustomTag, bb as DateHistogramAggregation, by as DateHistogramResult, bA as DateHistogramResults, z as DayOfWeek, d2 as DayOfWeekWithLiterals, ar as Delete, aG as DeleteAllProgramsMigrationRequest, aH as DeleteAllProgramsMigrationResponse, ae as DeleteByFilterOperation, ad as DeleteByIdsOperation, c1 as DeleteContext, aS as DeleteProgramRequest, aT as DeleteProgramResponse, w as DeleteStatus, c$ as DeleteStatusWithLiterals, G as Description, H as DescriptionMediaOneOf, ac as DocumentImage, ab as DocumentPayload, a9 as DocumentUpdateOperation, bM as DomainEvent, bN as DomainEventBodyOneOf, aI as DuplicateProgramRequest, aQ as DuplicatedSlugErrorDetails, bT as Empty, bF as EndProgramRequest, bO as EntityCreatedEvent, bR as EntityDeletedEvent, bQ as EntityUpdatedEvent, j as Enum, cN as EnumWithLiterals, a4 as ExtendedFields, am as File, J as FocalPoint, cw as GeoCoordinates, aJ as GetProgramRequest, aK as GetProgramResponse, bf as GroupByAggregation, bg as GroupByAggregationKindOneOf, bz as GroupByValueResults, cE as IdentificationData, cF as IdentificationDataIdOneOf, b6 as IncludeMissingValuesOptions, aa as IndexDocument, I as Interval, cV as IntervalWithLiterals, ah as InvalidateCache, ai as InvalidateCacheGetByOneOf, aD as ItemMetadata, $ as Keyword, bL as LabeledProgram, bK as ListSampleProgramsRequest, ct as Locale, cD as MessageEnvelope, bX as MetaSiteSpecialEvent, bY as MetaSiteSpecialEventPayloadOneOf, bW as MissingMetasiteIdErrorDetails, o as MissingValues, cS as MissingValuesWithLiterals, r as Mode, cX as ModeWithLiterals, Y as Money, cA as Multilingual, v as Namespace, cb as NamespaceChanged, c_ as NamespaceWithLiterals, be as NestedAggregation, bc as NestedAggregationItem, bd as NestedAggregationItemKindOneOf, bm as NestedAggregationResults, bn as NestedAggregationResultsResultOneOf, N as NestedAggregationType, cU as NestedAggregationTypeWithLiterals, bv as NestedResultValue, bw as NestedResultValueResultOneOf, bB as NestedResults, br as NestedValueAggregationResult, cg as OdeditorAssigned, ch as OdeditorUnassigned, ak as Page, aX as Paging, a_ as PagingMetadataV2, ci as PicassoAssigned, cj as PicassoUnassigned, y as PlacementType, d1 as PlacementTypeWithLiterals, av as ProgramArchived, aw as ProgramDuplicated, au as ProgramEnded, aA as ProgramMigration, at as ProgramPublished, cH as ProgramSearchSpec, cG as ProgramsQueryResult, cr as Properties, bE as PublishProgramRequest, aU as QueryProgramsRequest, aZ as QueryProgramsResponse, aV as QueryV2PagingMethodOneOf, b9 as RangeAggregation, bl as RangeAggregationResult, b5 as RangeBucket, bt as RangeResult, bp as RangeResults, ao as ReindexMessage, ap as ReindexMessageActionOneOf, F as ResolutionMethod, d3 as ResolutionMethodWithLiterals, bU as ResolveProgramSlugRequest, bV as ResolveProgramSlugResponse, bP as RestoreInfo, X as Restrictions, R as RestrictionsAccessType, cK as RestrictionsAccessTypeWithLiterals, bx as Results, a2 as Reward, ba as ScalarAggregation, bu as ScalarResult, p as ScalarType, cT as ScalarTypeWithLiterals, as as Schema, bh as SearchDetails, co as SearchIndexingNotification, x as SearchIndexingNotificationState, d0 as SearchIndexingNotificationStateWithLiterals, b0 as SearchProgramsRequest, Z as Seo, _ as SeoSchema, c7 as ServiceProvisioned, c8 as ServiceRemoved, a1 as Settings, b_ as SiteCreated, u as SiteCreatedContext, cZ as SiteCreatedContextWithLiterals, c0 as SiteDeleted, ca as SiteHardDeleted, c5 as SiteMarkedAsTemplate, c6 as SiteMarkedAsWixSite, cq as SitePropertiesEvent, cp as SitePropertiesUpdated, c3 as SitePublished, cf as SitePurgedExternally, c9 as SiteRenamed, b$ as SiteTransferred, c2 as SiteUndeleted, c4 as SiteUnpublished, ce as SiteUrlChanged, n as SortDirection, cR as SortDirectionWithLiterals, l as SortOrder, cP as SortOrderWithLiterals, m as SortType, cQ as SortTypeWithLiterals, aW as Sorting, cz as SpecialHourPeriod, s as State, cY as StateWithLiterals, h as Status, cJ as StatusWithLiterals, cc as StudioAssigned, cm as StudioTwoAssigned, cn as StudioTwoUnassigned, cd as StudioUnassigned, cB as SupportedLanguage, a0 as Tag, cy as TimePeriod, O as Timeline, aR as TimelineSwitchForbiddenErrorDetails, T as Trigger, cL as TriggerWithLiterals, al as URI, af as UpdateByFilterOperation, a7 as UpdateDocumentsEvent, a8 as UpdateDocumentsEventOperationOneOf, ag as UpdateExistingOperation, aL as UpdateProgramRequest, aM as UpdateProgramResponse, aq as Upsert, V as V3State, cI as V3StateWithLiterals, b7 as ValueAggregation, b8 as ValueAggregationOptionsOneOf, bk as ValueAggregationResult, bs as ValueResult, bo as ValueResults, K as VideoResolution, a5 as VideoStepsSettings, W as WebhookIdentityType, d4 as WebhookIdentityTypeWithLiterals, ck as WixelAssigned, cl as WixelUnassigned, aP as WrongParticipantsNumberErrorDetails, aO as WrongStartDateErrorDetails, aN as WrongStateErrorDetails } from './online-programs-v3-program-programs.universal-YXMOfctc.js';
|
|
4
4
|
|
|
5
5
|
declare function createProgram$1(httpClient: HttpClient): CreateProgramSignature;
|
|
6
6
|
interface CreateProgramSignature {
|
|
@@ -48,13 +48,6 @@ interface DeleteProgramSignature {
|
|
|
48
48
|
*/
|
|
49
49
|
(programId: string): Promise<void>;
|
|
50
50
|
}
|
|
51
|
-
declare function queryPrograms$1(httpClient: HttpClient): QueryProgramsSignature;
|
|
52
|
-
interface QueryProgramsSignature {
|
|
53
|
-
/**
|
|
54
|
-
* Retrieves a list of Programs
|
|
55
|
-
*/
|
|
56
|
-
(): ProgramsQueryBuilder;
|
|
57
|
-
}
|
|
58
51
|
declare function searchPrograms$1(httpClient: HttpClient): SearchProgramsSignature;
|
|
59
52
|
interface SearchProgramsSignature {
|
|
60
53
|
/**
|
|
@@ -112,12 +105,15 @@ interface ListSampleProgramsSignature {
|
|
|
112
105
|
(): Promise<NonNullablePaths<ListSampleProgramsResponse, `programs` | `programs.${number}.program.state` | `programs.${number}.program.status` | `programs.${number}.program.description.title` | `programs.${number}.program.timeline.selfPaced` | `programs.${number}.program.restrictions.hideFutureSteps` | `programs.${number}.program.restrictions.resolveStepsInOrder` | `programs.${number}.program.restrictions.shareProgress` | `programs.${number}.program.restrictions.accessType` | `programs.${number}.program.price.value` | `programs.${number}.program.price.currency` | `programs.${number}.program.seo.slug` | `programs.${number}.program.seo.imageAlt` | `programs.${number}.program.seo.courseWorkload` | `programs.${number}.program.accessType` | `programs.${number}.program.shouldSendInvoice` | `programs.${number}.program.videoStepsSettings.autoNavigate` | `programs.${number}.program.videoStepsSettings.requiredCompletionPercentage` | `programs.${number}.program.contentSummary.stepCount` | `programs.${number}.program.contentSummary.sectionCount` | `programs.${number}.label`, 6>>;
|
|
113
106
|
}
|
|
114
107
|
|
|
108
|
+
declare function customQueryPrograms(httpClient: HttpClient): {
|
|
109
|
+
(): ProgramsQueryBuilder;
|
|
110
|
+
(query: QueryV2): ReturnType<typeof typedQueryPrograms>;
|
|
111
|
+
};
|
|
115
112
|
declare const createProgram: MaybeContext<BuildRESTFunction<typeof createProgram$1> & typeof createProgram$1>;
|
|
116
113
|
declare const duplicateProgram: MaybeContext<BuildRESTFunction<typeof duplicateProgram$1> & typeof duplicateProgram$1>;
|
|
117
114
|
declare const getProgram: MaybeContext<BuildRESTFunction<typeof getProgram$1> & typeof getProgram$1>;
|
|
118
115
|
declare const updateProgram: MaybeContext<BuildRESTFunction<typeof updateProgram$1> & typeof updateProgram$1>;
|
|
119
116
|
declare const deleteProgram: MaybeContext<BuildRESTFunction<typeof deleteProgram$1> & typeof deleteProgram$1>;
|
|
120
|
-
declare const queryPrograms: MaybeContext<BuildRESTFunction<typeof queryPrograms$1> & typeof queryPrograms$1>;
|
|
121
117
|
declare const searchPrograms: MaybeContext<BuildRESTFunction<typeof searchPrograms$1> & typeof searchPrograms$1>;
|
|
122
118
|
declare const publishProgram: MaybeContext<BuildRESTFunction<typeof publishProgram$1> & typeof publishProgram$1>;
|
|
123
119
|
declare const endProgram: MaybeContext<BuildRESTFunction<typeof endProgram$1> & typeof endProgram$1>;
|
|
@@ -125,5 +121,6 @@ declare const archiveProgram: MaybeContext<BuildRESTFunction<typeof archiveProgr
|
|
|
125
121
|
declare const bulkUpdatePrograms: MaybeContext<BuildRESTFunction<typeof bulkUpdatePrograms$1> & typeof bulkUpdatePrograms$1>;
|
|
126
122
|
declare const countPrograms: MaybeContext<BuildRESTFunction<typeof countPrograms$1> & typeof countPrograms$1>;
|
|
127
123
|
declare const listSamplePrograms: MaybeContext<BuildRESTFunction<typeof listSamplePrograms$1> & typeof listSamplePrograms$1>;
|
|
124
|
+
declare const queryPrograms: MaybeContext<BuildRESTFunction<typeof customQueryPrograms> & typeof customQueryPrograms>;
|
|
128
125
|
|
|
129
|
-
export { ArchiveProgramResponse, BulkUpdateProgramsOptions, BulkUpdateProgramsResponse, CountProgramsOptions, CountProgramsResponse, DuplicateProgramResponse, EndProgramResponse, ListSampleProgramsResponse, MaskedProgram, Program, ProgramSearch, ProgramsQueryBuilder, PublishProgramApplicationErrors, PublishProgramResponse, SearchProgramsResponse, UpdateProgram, UpdateProgramApplicationErrors, archiveProgram, bulkUpdatePrograms, countPrograms, createProgram, deleteProgram, duplicateProgram, endProgram, getProgram, listSamplePrograms, publishProgram, queryPrograms, searchPrograms, updateProgram };
|
|
126
|
+
export { ArchiveProgramResponse, BulkUpdateProgramsOptions, BulkUpdateProgramsResponse, CountProgramsOptions, CountProgramsResponse, DuplicateProgramResponse, EndProgramResponse, ListSampleProgramsResponse, MaskedProgram, Program, ProgramSearch, ProgramsQueryBuilder, PublishProgramApplicationErrors, PublishProgramResponse, QueryV2, SearchProgramsResponse, UpdateProgram, UpdateProgramApplicationErrors, archiveProgram, bulkUpdatePrograms, countPrograms, createProgram, deleteProgram, duplicateProgram, endProgram, getProgram, listSamplePrograms, publishProgram, queryPrograms, searchPrograms, updateProgram };
|
package/build/cjs/index.js
CHANGED
|
@@ -1445,6 +1445,44 @@ function queryPrograms2() {
|
|
|
1445
1445
|
transformationPaths: {}
|
|
1446
1446
|
});
|
|
1447
1447
|
}
|
|
1448
|
+
async function typedQueryPrograms(query) {
|
|
1449
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1450
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
1451
|
+
const reqOpts = queryPrograms(payload);
|
|
1452
|
+
sideEffects?.onSiteCall?.();
|
|
1453
|
+
try {
|
|
1454
|
+
const result = await httpClient.request(reqOpts);
|
|
1455
|
+
sideEffects?.onSuccess?.(result);
|
|
1456
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1457
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1458
|
+
{
|
|
1459
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1460
|
+
paths: [{ path: "programs.description.image" }]
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1464
|
+
paths: [{ path: "programs.description.video" }]
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
|
|
1468
|
+
paths: [{ path: "programs.seo.url" }]
|
|
1469
|
+
}
|
|
1470
|
+
])
|
|
1471
|
+
);
|
|
1472
|
+
} catch (err) {
|
|
1473
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1474
|
+
err,
|
|
1475
|
+
{
|
|
1476
|
+
spreadPathsToArguments: {},
|
|
1477
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1478
|
+
singleArgumentUnchanged: false
|
|
1479
|
+
},
|
|
1480
|
+
["query"]
|
|
1481
|
+
);
|
|
1482
|
+
sideEffects?.onError?.(err);
|
|
1483
|
+
throw transformedError;
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1448
1486
|
async function searchPrograms2(search) {
|
|
1449
1487
|
const { httpClient, sideEffects } = arguments[1];
|
|
1450
1488
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
|
|
@@ -1770,6 +1808,13 @@ function queryPrograms3(httpClient) {
|
|
|
1770
1808
|
{ httpClient }
|
|
1771
1809
|
);
|
|
1772
1810
|
}
|
|
1811
|
+
function typedQueryPrograms2(httpClient) {
|
|
1812
|
+
return (query) => typedQueryPrograms(
|
|
1813
|
+
query,
|
|
1814
|
+
// @ts-ignore
|
|
1815
|
+
{ httpClient }
|
|
1816
|
+
);
|
|
1817
|
+
}
|
|
1773
1818
|
function searchPrograms3(httpClient) {
|
|
1774
1819
|
return (search) => searchPrograms2(
|
|
1775
1820
|
search,
|
|
@@ -1822,12 +1867,23 @@ function listSamplePrograms3(httpClient) {
|
|
|
1822
1867
|
|
|
1823
1868
|
// src/online-programs-v3-program-programs.context.ts
|
|
1824
1869
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1870
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
1871
|
+
function customQueryPrograms(httpClient) {
|
|
1872
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
1873
|
+
builderQueryFunction: () => queryPrograms3(httpClient)(),
|
|
1874
|
+
typedQueryFunction: (query) => typedQueryPrograms2(httpClient)(query),
|
|
1875
|
+
hasOptionsParameter: false
|
|
1876
|
+
});
|
|
1877
|
+
function overloadedQuery(query) {
|
|
1878
|
+
return router(...arguments);
|
|
1879
|
+
}
|
|
1880
|
+
return overloadedQuery;
|
|
1881
|
+
}
|
|
1825
1882
|
var createProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProgram3);
|
|
1826
1883
|
var duplicateProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateProgram3);
|
|
1827
1884
|
var getProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProgram3);
|
|
1828
1885
|
var updateProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateProgram3);
|
|
1829
1886
|
var deleteProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProgram3);
|
|
1830
|
-
var queryPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryPrograms3);
|
|
1831
1887
|
var searchPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchPrograms3);
|
|
1832
1888
|
var publishProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishProgram3);
|
|
1833
1889
|
var endProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(endProgram3);
|
|
@@ -1835,6 +1891,7 @@ var archiveProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)
|
|
|
1835
1891
|
var bulkUpdatePrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdatePrograms3);
|
|
1836
1892
|
var countPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(countPrograms3);
|
|
1837
1893
|
var listSamplePrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSamplePrograms3);
|
|
1894
|
+
var queryPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryPrograms);
|
|
1838
1895
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1839
1896
|
0 && (module.exports = {
|
|
1840
1897
|
AccessType,
|