@wix/auto_sdk_online-programs_participants 1.0.5 → 1.0.7
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 +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +27 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -11
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +25 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -11
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +27 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -11
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +25 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Participant, BulkCreateParticipantOptions, BulkCreateParticipantResponse, BulkAddAllToProgramOptions, BulkAddAllToProgramResponse, IssueCertificateResponse, GetCompletionStatsResponse, GetPremiumStatsResponse,
|
|
3
|
-
export { ActionEvent, ApplicationError, BaseEventMetadata, Behavior, BehaviorBehaviorOneOf, Benefit, BenefitNotification, BenefitType, BenefitTypeWithLiterals, BulkActionMetadata, BulkAddAllToProgramRequest, BulkAddToProgramRequest, BulkAddToProgramResult, BulkApproveAllParticipantRequest, BulkApproveParticipantRequest, BulkApproveParticipantResult, BulkCreateParticipantRequest, BulkInviteAllToProgramRequest, BulkInviteToProgramRequest, BulkInviteToProgramResult, BulkParticipantResult, Certificate, CommonBulkActionMetadata, CommonItemMetadata, CreateParticipantRequest, CreateParticipantResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { Participant, BulkCreateParticipantOptions, BulkCreateParticipantResponse, BulkAddAllToProgramOptions, BulkAddAllToProgramResponse, IssueCertificateResponse, GetCompletionStatsResponse, GetPremiumStatsResponse, GetAccessStatusResponse, BulkInviteToProgramOptions, BulkInviteToProgramResponse, BulkInviteAllToProgramOptions, BulkInviteAllToProgramResponse, BulkAddToProgramOptions, BulkAddToProgramResponse, BulkApproveParticipantOptions, BulkApproveParticipantResponse, BulkApproveAllParticipantOptions, BulkApproveAllParticipantResponse, ParticipantAddedEnvelope, ParticipantApprovedEnvelope, ParticipantInvitedEnvelope, ParticipantsQueryBuilder, CursorQuery, typedQueryParticipants } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, ApplicationError, BaseEventMetadata, Behavior, BehaviorBehaviorOneOf, Benefit, BenefitNotification, BenefitType, BenefitTypeWithLiterals, BulkActionMetadata, BulkAddAllToProgramRequest, BulkAddToProgramRequest, BulkAddToProgramResult, BulkApproveAllParticipantRequest, BulkApproveParticipantRequest, BulkApproveParticipantResult, BulkCreateParticipantRequest, BulkInviteAllToProgramRequest, BulkInviteToProgramRequest, BulkInviteToProgramResult, BulkParticipantResult, Certificate, CommonBulkActionMetadata, CommonItemMetadata, CreateParticipantRequest, CreateParticipantResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteParticipantRequest, DeleteParticipantResponse, Discount, DiscountDiscountOneOf, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EntryPass, Event, EventMetadata, EventWithLiterals, ExportParticipantsStatsRequest, ExportParticipantsStatsResponse, ExtendedFields, GetAccessStatusRequest, GetCompletionStatsRequest, GetParticipantRequest, GetParticipantResponse, GetPremiumStatsRequest, IdentificationData, IdentificationDataIdOneOf, IssueCertificateRequest, ItemMetadata, JoinPath, JoinPathWithLiterals, JoinedInfo, Member, MessageEnvelope, ParticipantAdded, ParticipantApproved, ParticipantExportsFinished, ParticipantInvited, ParticipantsQueryResult, PaymentInfo, Progress, QueryParticipantsRequest, QueryParticipantsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createParticipant$1(httpClient: HttpClient): CreateParticipantSignature;
|
|
6
6
|
interface CreateParticipantSignature {
|
|
@@ -69,13 +69,6 @@ interface GetParticipantSignature {
|
|
|
69
69
|
*/
|
|
70
70
|
(participantId: string): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 3>>;
|
|
71
71
|
}
|
|
72
|
-
declare function queryParticipants$1(httpClient: HttpClient): QueryParticipantsSignature;
|
|
73
|
-
interface QueryParticipantsSignature {
|
|
74
|
-
/**
|
|
75
|
-
* Query existing participants
|
|
76
|
-
*/
|
|
77
|
-
(): ParticipantsQueryBuilder;
|
|
78
|
-
}
|
|
79
72
|
declare function getAccessStatus$1(httpClient: HttpClient): GetAccessStatusSignature;
|
|
80
73
|
interface GetAccessStatusSignature {
|
|
81
74
|
/**
|
|
@@ -142,6 +135,10 @@ declare const onParticipantAdded$1: EventDefinition<ParticipantAddedEnvelope, "w
|
|
|
142
135
|
declare const onParticipantApproved$1: EventDefinition<ParticipantApprovedEnvelope, "wix.online_programs.v3.participant_participant_approved">;
|
|
143
136
|
declare const onParticipantInvited$1: EventDefinition<ParticipantInvitedEnvelope, "wix.online_programs.v3.participant_participant_invited">;
|
|
144
137
|
|
|
138
|
+
declare function customQueryParticipants(httpClient: HttpClient): {
|
|
139
|
+
(): ParticipantsQueryBuilder;
|
|
140
|
+
(query: CursorQuery): ReturnType<typeof typedQueryParticipants>;
|
|
141
|
+
};
|
|
145
142
|
declare const createParticipant: MaybeContext<BuildRESTFunction<typeof createParticipant$1> & typeof createParticipant$1>;
|
|
146
143
|
declare const bulkCreateParticipant: MaybeContext<BuildRESTFunction<typeof bulkCreateParticipant$1> & typeof bulkCreateParticipant$1>;
|
|
147
144
|
declare const bulkAddAllToProgram: MaybeContext<BuildRESTFunction<typeof bulkAddAllToProgram$1> & typeof bulkAddAllToProgram$1>;
|
|
@@ -150,7 +147,6 @@ declare const issueCertificate: MaybeContext<BuildRESTFunction<typeof issueCerti
|
|
|
150
147
|
declare const getCompletionStats: MaybeContext<BuildRESTFunction<typeof getCompletionStats$1> & typeof getCompletionStats$1>;
|
|
151
148
|
declare const getPremiumStats: MaybeContext<BuildRESTFunction<typeof getPremiumStats$1> & typeof getPremiumStats$1>;
|
|
152
149
|
declare const getParticipant: MaybeContext<BuildRESTFunction<typeof getParticipant$1> & typeof getParticipant$1>;
|
|
153
|
-
declare const queryParticipants: MaybeContext<BuildRESTFunction<typeof queryParticipants$1> & typeof queryParticipants$1>;
|
|
154
150
|
declare const getAccessStatus: MaybeContext<BuildRESTFunction<typeof getAccessStatus$1> & typeof getAccessStatus$1>;
|
|
155
151
|
declare const bulkInviteToProgram: MaybeContext<BuildRESTFunction<typeof bulkInviteToProgram$1> & typeof bulkInviteToProgram$1>;
|
|
156
152
|
declare const bulkInviteAllToProgram: MaybeContext<BuildRESTFunction<typeof bulkInviteAllToProgram$1> & typeof bulkInviteAllToProgram$1>;
|
|
@@ -159,6 +155,7 @@ declare const bulkApproveParticipant: MaybeContext<BuildRESTFunction<typeof bulk
|
|
|
159
155
|
declare const bulkApproveAllParticipant: MaybeContext<BuildRESTFunction<typeof bulkApproveAllParticipant$1> & typeof bulkApproveAllParticipant$1>;
|
|
160
156
|
/** @internal */
|
|
161
157
|
declare const exportParticipantsStats: MaybeContext<BuildRESTFunction<typeof exportParticipantsStats$1> & typeof exportParticipantsStats$1>;
|
|
158
|
+
declare const queryParticipants: MaybeContext<BuildRESTFunction<typeof customQueryParticipants> & typeof customQueryParticipants>;
|
|
162
159
|
/** */
|
|
163
160
|
declare const onParticipantAdded: BuildEventDefinition<typeof onParticipantAdded$1> & typeof onParticipantAdded$1;
|
|
164
161
|
/** */
|
|
@@ -166,4 +163,4 @@ declare const onParticipantApproved: BuildEventDefinition<typeof onParticipantAp
|
|
|
166
163
|
/** */
|
|
167
164
|
declare const onParticipantInvited: BuildEventDefinition<typeof onParticipantInvited$1> & typeof onParticipantInvited$1;
|
|
168
165
|
|
|
169
|
-
export { BulkAddAllToProgramOptions, BulkAddAllToProgramResponse, BulkAddToProgramOptions, BulkAddToProgramResponse, BulkApproveAllParticipantOptions, BulkApproveAllParticipantResponse, BulkApproveParticipantOptions, BulkApproveParticipantResponse, BulkCreateParticipantOptions, BulkCreateParticipantResponse, BulkInviteAllToProgramOptions, BulkInviteAllToProgramResponse, BulkInviteToProgramOptions, BulkInviteToProgramResponse, GetAccessStatusResponse, GetCompletionStatsResponse, GetPremiumStatsResponse, IssueCertificateResponse, Participant, ParticipantAddedEnvelope, ParticipantApprovedEnvelope, ParticipantInvitedEnvelope, ParticipantsQueryBuilder, bulkAddAllToProgram, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkCreateParticipant, bulkInviteAllToProgram, bulkInviteToProgram, createParticipant, deleteParticipant, exportParticipantsStats, getAccessStatus, getCompletionStats, getParticipant, getPremiumStats, issueCertificate, onParticipantAdded, onParticipantApproved, onParticipantInvited, queryParticipants };
|
|
166
|
+
export { BulkAddAllToProgramOptions, BulkAddAllToProgramResponse, BulkAddToProgramOptions, BulkAddToProgramResponse, BulkApproveAllParticipantOptions, BulkApproveAllParticipantResponse, BulkApproveParticipantOptions, BulkApproveParticipantResponse, BulkCreateParticipantOptions, BulkCreateParticipantResponse, BulkInviteAllToProgramOptions, BulkInviteAllToProgramResponse, BulkInviteToProgramOptions, BulkInviteToProgramResponse, CursorQuery, GetAccessStatusResponse, GetCompletionStatsResponse, GetPremiumStatsResponse, IssueCertificateResponse, Participant, ParticipantAddedEnvelope, ParticipantApprovedEnvelope, ParticipantInvitedEnvelope, ParticipantsQueryBuilder, bulkAddAllToProgram, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkCreateParticipant, bulkInviteAllToProgram, bulkInviteToProgram, createParticipant, deleteParticipant, exportParticipantsStats, getAccessStatus, getCompletionStats, getParticipant, getPremiumStats, issueCertificate, onParticipantAdded, onParticipantApproved, onParticipantInvited, queryParticipants };
|
|
@@ -1016,6 +1016,29 @@ function queryParticipants2() {
|
|
|
1016
1016
|
transformationPaths: {}
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
+
async function typedQueryParticipants(query) {
|
|
1020
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1021
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
1022
|
+
const reqOpts = queryParticipants(payload);
|
|
1023
|
+
sideEffects?.onSiteCall?.();
|
|
1024
|
+
try {
|
|
1025
|
+
const result = await httpClient.request(reqOpts);
|
|
1026
|
+
sideEffects?.onSuccess?.(result);
|
|
1027
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1028
|
+
} catch (err) {
|
|
1029
|
+
const transformedError = sdkTransformError(
|
|
1030
|
+
err,
|
|
1031
|
+
{
|
|
1032
|
+
spreadPathsToArguments: {},
|
|
1033
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1034
|
+
singleArgumentUnchanged: false
|
|
1035
|
+
},
|
|
1036
|
+
["query"]
|
|
1037
|
+
);
|
|
1038
|
+
sideEffects?.onError?.(err);
|
|
1039
|
+
throw transformedError;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1019
1042
|
async function getAccessStatus2() {
|
|
1020
1043
|
const { httpClient, sideEffects } = arguments[0];
|
|
1021
1044
|
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
@@ -1279,6 +1302,13 @@ function queryParticipants3(httpClient) {
|
|
|
1279
1302
|
{ httpClient }
|
|
1280
1303
|
);
|
|
1281
1304
|
}
|
|
1305
|
+
function typedQueryParticipants2(httpClient) {
|
|
1306
|
+
return (query) => typedQueryParticipants(
|
|
1307
|
+
query,
|
|
1308
|
+
// @ts-ignore
|
|
1309
|
+
{ httpClient }
|
|
1310
|
+
);
|
|
1311
|
+
}
|
|
1282
1312
|
function getAccessStatus3(httpClient) {
|
|
1283
1313
|
return () => getAccessStatus2(
|
|
1284
1314
|
// @ts-ignore
|
|
@@ -1371,6 +1401,18 @@ var onParticipantInvited = EventDefinition(
|
|
|
1371
1401
|
// src/online-programs-v3-participant-participants.context.ts
|
|
1372
1402
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
1373
1403
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
1404
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
1405
|
+
function customQueryParticipants(httpClient) {
|
|
1406
|
+
const router = createQueryOverloadRouter({
|
|
1407
|
+
builderQueryFunction: () => queryParticipants3(httpClient)(),
|
|
1408
|
+
typedQueryFunction: (query) => typedQueryParticipants2(httpClient)(query),
|
|
1409
|
+
hasOptionsParameter: false
|
|
1410
|
+
});
|
|
1411
|
+
function overloadedQuery(query) {
|
|
1412
|
+
return router(...arguments);
|
|
1413
|
+
}
|
|
1414
|
+
return overloadedQuery;
|
|
1415
|
+
}
|
|
1374
1416
|
var createParticipant4 = /* @__PURE__ */ createRESTModule(createParticipant3);
|
|
1375
1417
|
var bulkCreateParticipant4 = /* @__PURE__ */ createRESTModule(bulkCreateParticipant3);
|
|
1376
1418
|
var bulkAddAllToProgram4 = /* @__PURE__ */ createRESTModule(bulkAddAllToProgram3);
|
|
@@ -1379,7 +1421,6 @@ var issueCertificate4 = /* @__PURE__ */ createRESTModule(issueCertificate3);
|
|
|
1379
1421
|
var getCompletionStats4 = /* @__PURE__ */ createRESTModule(getCompletionStats3);
|
|
1380
1422
|
var getPremiumStats4 = /* @__PURE__ */ createRESTModule(getPremiumStats3);
|
|
1381
1423
|
var getParticipant4 = /* @__PURE__ */ createRESTModule(getParticipant3);
|
|
1382
|
-
var queryParticipants4 = /* @__PURE__ */ createRESTModule(queryParticipants3);
|
|
1383
1424
|
var getAccessStatus4 = /* @__PURE__ */ createRESTModule(getAccessStatus3);
|
|
1384
1425
|
var bulkInviteToProgram4 = /* @__PURE__ */ createRESTModule(bulkInviteToProgram3);
|
|
1385
1426
|
var bulkInviteAllToProgram4 = /* @__PURE__ */ createRESTModule(bulkInviteAllToProgram3);
|
|
@@ -1387,6 +1428,7 @@ var bulkAddToProgram4 = /* @__PURE__ */ createRESTModule(bulkAddToProgram3);
|
|
|
1387
1428
|
var bulkApproveParticipant4 = /* @__PURE__ */ createRESTModule(bulkApproveParticipant3);
|
|
1388
1429
|
var bulkApproveAllParticipant4 = /* @__PURE__ */ createRESTModule(bulkApproveAllParticipant3);
|
|
1389
1430
|
var exportParticipantsStats4 = /* @__PURE__ */ createRESTModule(exportParticipantsStats3);
|
|
1431
|
+
var queryParticipants4 = /* @__PURE__ */ createRESTModule(customQueryParticipants);
|
|
1390
1432
|
var onParticipantAdded2 = createEventModule(onParticipantAdded);
|
|
1391
1433
|
var onParticipantApproved2 = createEventModule(
|
|
1392
1434
|
onParticipantApproved
|