@wix/auto_sdk_online-programs_quizzes 1.0.26 → 1.0.27
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 +52 -20
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +159 -72
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +109 -54
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +52 -20
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +159 -72
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +109 -54
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +52 -20
- package/build/internal/cjs/index.typings.d.ts +159 -72
- package/build/internal/cjs/meta.d.ts +109 -54
- package/build/internal/es/index.d.mts +52 -20
- package/build/internal/es/index.typings.d.mts +159 -72
- package/build/internal/es/meta.d.mts +109 -54
- package/package.json +2 -2
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
import { CreateQuizRequest as CreateQuizRequest$1, CreateQuizResponse as CreateQuizResponse$1, CloneQuizRequest as CloneQuizRequest$1, CloneQuizResponse as CloneQuizResponse$1, BulkCreateQuizzesRequest as BulkCreateQuizzesRequest$1, BulkCreateQuizzesResponse as BulkCreateQuizzesResponse$1, GetQuizRequest as GetQuizRequest$1, GetQuizResponse as GetQuizResponse$1, DeleteQuizRequest as DeleteQuizRequest$1, DeleteQuizResponse as DeleteQuizResponse$1, BulkDeleteQuizzesRequest as BulkDeleteQuizzesRequest$1, BulkDeleteQuizzesResponse as BulkDeleteQuizzesResponse$1 } from './index.typings.js';
|
|
2
2
|
import '@wix/sdk-types';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A quiz definition used by an Online Programs quiz step.
|
|
6
|
+
*
|
|
7
|
+
* Create or clone a quiz, then assign the returned quiz ID to `step.quizOptions.id` when creating an Online Programs step. Quiz IDs are intentionally discovered through quiz-type steps rather than through a Quiz list or query method.
|
|
8
|
+
*
|
|
9
|
+
* New submissions are evaluated against the quiz definition that exists when the submission is created. Previously stored submissions retain their recorded grades and answer evaluations if the definition changes later.
|
|
10
|
+
*
|
|
11
|
+
* NOT-PRECEDENT: The production v1 entity retains its legacy `wix.achievements.quizzes.v1.quiz` identity for compatibility. The Online Programs placement and workflow described here provide its public product context.
|
|
12
|
+
*/
|
|
4
13
|
interface Quiz {
|
|
5
14
|
/**
|
|
6
|
-
* ID
|
|
15
|
+
* Quiz ID.
|
|
7
16
|
* @format GUID
|
|
8
17
|
* @readonly
|
|
9
18
|
*/
|
|
10
19
|
id?: string | null;
|
|
11
|
-
/** Quiz settings */
|
|
20
|
+
/** Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data. */
|
|
12
21
|
settings?: QuizSettings;
|
|
13
22
|
/**
|
|
14
|
-
*
|
|
23
|
+
* Current revision of the stored quiz definition. The revision changes when the definition changes. The public Quiz API doesn't currently provide an update method.
|
|
15
24
|
* @readonly
|
|
16
25
|
*/
|
|
17
26
|
revision?: string | null;
|
|
18
27
|
/**
|
|
19
|
-
*
|
|
28
|
+
* Date and time the quiz was created.
|
|
20
29
|
* @readonly
|
|
21
30
|
*/
|
|
22
31
|
createdDate?: Date | null;
|
|
23
32
|
/**
|
|
24
|
-
*
|
|
33
|
+
* Date and time the quiz was last updated.
|
|
25
34
|
* @readonly
|
|
26
35
|
*/
|
|
27
36
|
updatedDate?: Date | null;
|
|
28
37
|
/**
|
|
29
|
-
*
|
|
38
|
+
* Questions in the quiz. Each `QuizField` defines one question and its answer input. New submissions use the current questions; stored submissions retain their recorded answer evaluations.
|
|
30
39
|
* @minSize 1
|
|
31
40
|
* @maxSize 200
|
|
32
41
|
*/
|
|
@@ -34,119 +43,122 @@ interface Quiz {
|
|
|
34
43
|
}
|
|
35
44
|
interface QuizSettings {
|
|
36
45
|
/**
|
|
37
|
-
*
|
|
46
|
+
* Minimum unweighted integer percentage required to pass, from `0` through `100`. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect.
|
|
38
47
|
* @max 100
|
|
39
48
|
*/
|
|
40
49
|
passingGrade?: number | null;
|
|
41
50
|
/**
|
|
42
|
-
* Quiz title
|
|
51
|
+
* Quiz title.
|
|
43
52
|
* @maxLength 200
|
|
44
53
|
*/
|
|
45
54
|
title?: string | null;
|
|
46
55
|
/**
|
|
47
|
-
*
|
|
56
|
+
* Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. With `groupId`, the count uses group ID and submitter ID without filtering by quiz ID; otherwise, it uses quiz ID and submitter ID. Reusing a group ID across quizzes shares their attempt count.
|
|
48
57
|
* @min 1
|
|
49
58
|
*/
|
|
50
59
|
attempts?: number | null;
|
|
51
60
|
}
|
|
61
|
+
/** Defines one quiz question and its answer input. */
|
|
52
62
|
interface QuizField extends QuizFieldFieldTypeOneOf {
|
|
53
|
-
/**
|
|
63
|
+
/** Numeric input. */
|
|
54
64
|
numeric?: NumericField;
|
|
55
|
-
/**
|
|
65
|
+
/** Short-text input. */
|
|
56
66
|
shortText?: ShortTextField;
|
|
57
|
-
/**
|
|
67
|
+
/** Long-text input. Set this to an empty object (`{}`) to select it. */
|
|
58
68
|
longText?: LongTextField;
|
|
59
|
-
/**
|
|
69
|
+
/** Input with predefined options where only one option can be selected. */
|
|
60
70
|
singleChoice?: SingleChoiceField;
|
|
61
|
-
/**
|
|
71
|
+
/** Input with predefined options where multiple options can be selected. */
|
|
62
72
|
multiChoice?: MultiChoiceField;
|
|
63
|
-
/**
|
|
73
|
+
/** File-upload input. */
|
|
64
74
|
fileUpload?: FileUploadField;
|
|
65
75
|
/**
|
|
66
|
-
*
|
|
76
|
+
* Caller-generated GUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this ID to identify the question.
|
|
67
77
|
* @format GUID
|
|
68
78
|
* @immutable
|
|
69
79
|
*/
|
|
70
80
|
id?: string;
|
|
71
81
|
/**
|
|
72
|
-
*
|
|
82
|
+
* Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question.
|
|
73
83
|
* @maxLength 200
|
|
74
84
|
* @immutable
|
|
75
85
|
*/
|
|
76
86
|
target?: string | null;
|
|
77
87
|
/**
|
|
78
|
-
* Question
|
|
88
|
+
* Question text.
|
|
79
89
|
* @minLength 1
|
|
80
90
|
* @maxLength 350
|
|
81
91
|
*/
|
|
82
92
|
question?: string | null;
|
|
83
|
-
/** Score
|
|
93
|
+
/** Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage. */
|
|
84
94
|
score?: number | null;
|
|
85
95
|
/**
|
|
86
|
-
*
|
|
96
|
+
* Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers.
|
|
87
97
|
* @maxLength 350
|
|
88
98
|
*/
|
|
89
99
|
rightMessage?: string | null;
|
|
90
100
|
/**
|
|
91
|
-
*
|
|
101
|
+
* Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers.
|
|
92
102
|
* @maxLength 350
|
|
93
103
|
*/
|
|
94
104
|
wrongMessage?: string | null;
|
|
95
105
|
}
|
|
96
106
|
/** @oneof */
|
|
97
107
|
interface QuizFieldFieldTypeOneOf {
|
|
98
|
-
/**
|
|
108
|
+
/** Numeric input. */
|
|
99
109
|
numeric?: NumericField;
|
|
100
|
-
/**
|
|
110
|
+
/** Short-text input. */
|
|
101
111
|
shortText?: ShortTextField;
|
|
102
|
-
/**
|
|
112
|
+
/** Long-text input. Set this to an empty object (`{}`) to select it. */
|
|
103
113
|
longText?: LongTextField;
|
|
104
|
-
/**
|
|
114
|
+
/** Input with predefined options where only one option can be selected. */
|
|
105
115
|
singleChoice?: SingleChoiceField;
|
|
106
|
-
/**
|
|
116
|
+
/** Input with predefined options where multiple options can be selected. */
|
|
107
117
|
multiChoice?: MultiChoiceField;
|
|
108
|
-
/**
|
|
118
|
+
/** File-upload input. */
|
|
109
119
|
fileUpload?: FileUploadField;
|
|
110
120
|
}
|
|
121
|
+
/** File categories used by Wix Forms. Categories don't define a custom extension or MIME-type allowlist; accepted file types are controlled by Wix Forms. See [About form fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields). */
|
|
111
122
|
declare enum FileUploadFormat {
|
|
112
|
-
/** Image
|
|
123
|
+
/** Image-file category. */
|
|
113
124
|
IMAGE = "IMAGE",
|
|
114
|
-
/** Video
|
|
125
|
+
/** Video-file category. */
|
|
115
126
|
VIDEO = "VIDEO",
|
|
116
|
-
/** Audio
|
|
127
|
+
/** Audio-file category. */
|
|
117
128
|
AUDIO = "AUDIO",
|
|
118
|
-
/** Document
|
|
129
|
+
/** Document-file category. */
|
|
119
130
|
DOCUMENT = "DOCUMENT",
|
|
120
|
-
/** Archive
|
|
131
|
+
/** Archive-file category. */
|
|
121
132
|
ARCHIVE = "ARCHIVE",
|
|
122
|
-
/** 3D
|
|
133
|
+
/** 3D-model-file category. */
|
|
123
134
|
MODEL_3D = "MODEL_3D"
|
|
124
135
|
}
|
|
125
136
|
/** @enumType */
|
|
126
137
|
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
|
|
127
138
|
interface NumericField {
|
|
128
|
-
/**
|
|
139
|
+
/** Correct numeric value. Matching is exact. If omitted, the answer is non-evaluable and counts as correct when calculating the earned grade. */
|
|
129
140
|
rightAnswer?: number | null;
|
|
130
141
|
}
|
|
131
142
|
interface ShortTextField {
|
|
132
143
|
/**
|
|
133
|
-
*
|
|
144
|
+
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If omitted, the answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
134
145
|
* @minLength 1
|
|
135
146
|
* @maxLength 200
|
|
136
147
|
*/
|
|
137
148
|
rightAnswer?: string | null;
|
|
138
149
|
}
|
|
150
|
+
/** Long-text input settings. Set `longText` to an empty object (`{}`) to select this input. Long-text answers aren't evaluated and count as correct when calculating the earned grade. */
|
|
139
151
|
interface LongTextField {
|
|
140
152
|
}
|
|
141
153
|
interface SingleChoiceField {
|
|
142
154
|
/**
|
|
143
|
-
*
|
|
155
|
+
* Correct option. Matching is exact. If omitted, the answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
144
156
|
* @minLength 1
|
|
145
157
|
* @maxLength 350
|
|
146
158
|
*/
|
|
147
159
|
rightAnswer?: string | null;
|
|
148
160
|
/**
|
|
149
|
-
*
|
|
161
|
+
* Options available to the participant.
|
|
150
162
|
* @minSize 1
|
|
151
163
|
* @maxSize 90
|
|
152
164
|
* @minLength 1
|
|
@@ -158,13 +170,14 @@ interface MultiChoiceField {
|
|
|
158
170
|
/**
|
|
159
171
|
* Returned only with achievements:quizzes:v1:quiz:read_sensitive_fields permission.
|
|
160
172
|
* Repeated fields cannot use conditional annotations; the service redacts this field.
|
|
173
|
+
* Correct options. Matching ignores option order but doesn't ignore duplicate values. If omitted, the answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
161
174
|
* @maxSize 90
|
|
162
175
|
* @minLength 1
|
|
163
176
|
* @maxLength 350
|
|
164
177
|
*/
|
|
165
178
|
rightAnswer?: string[] | null;
|
|
166
179
|
/**
|
|
167
|
-
*
|
|
180
|
+
* Options available to the participant.
|
|
168
181
|
* @minSize 1
|
|
169
182
|
* @maxSize 90
|
|
170
183
|
* @minLength 1
|
|
@@ -174,42 +187,42 @@ interface MultiChoiceField {
|
|
|
174
187
|
}
|
|
175
188
|
interface FileUploadField {
|
|
176
189
|
/**
|
|
177
|
-
* Text
|
|
190
|
+
* Text displayed on the upload button. Default: `Upload`.
|
|
178
191
|
* @minLength 1
|
|
179
192
|
* @maxLength 100
|
|
180
193
|
*/
|
|
181
194
|
buttonText?: string | null;
|
|
182
195
|
/**
|
|
183
|
-
*
|
|
196
|
+
* Maximum number of files a participant can upload for this question, from `1` through `10`. Default: `10`.
|
|
184
197
|
* @min 1
|
|
185
198
|
* @max 10
|
|
186
199
|
*/
|
|
187
200
|
itemsLimit?: number | null;
|
|
188
201
|
/**
|
|
189
|
-
*
|
|
202
|
+
* Wix Forms file categories that participants can upload.
|
|
190
203
|
*
|
|
191
|
-
* Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection.
|
|
204
|
+
* Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade.
|
|
192
205
|
* @maxSize 6
|
|
193
206
|
*/
|
|
194
207
|
fileUploadFormats?: FileUploadFormatWithLiterals[];
|
|
195
208
|
}
|
|
196
209
|
interface CreateQuizRequest {
|
|
197
|
-
/** Quiz to
|
|
210
|
+
/** Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value. */
|
|
198
211
|
quiz: Quiz;
|
|
199
212
|
}
|
|
200
213
|
interface CreateQuizResponse {
|
|
201
|
-
/** Created quiz */
|
|
214
|
+
/** Created quiz definition. Assign its `id` to `step.quizOptions.id` to create an Online Programs quiz step. */
|
|
202
215
|
quiz?: Quiz;
|
|
203
216
|
}
|
|
204
217
|
interface CloneQuizRequest {
|
|
205
218
|
/**
|
|
206
|
-
* ID of the quiz to
|
|
219
|
+
* ID of the quiz definition to clone.
|
|
207
220
|
* @format GUID
|
|
208
221
|
*/
|
|
209
222
|
quizId: string;
|
|
210
223
|
}
|
|
211
224
|
interface CloneQuizResponse {
|
|
212
|
-
/** Cloned quiz */
|
|
225
|
+
/** Cloned quiz definition with a new ID. Step associations and submissions aren't cloned. */
|
|
213
226
|
quiz?: Quiz;
|
|
214
227
|
}
|
|
215
228
|
interface BulkCreateQuizzesRequest {
|
|
@@ -255,7 +268,7 @@ interface ApplicationError {
|
|
|
255
268
|
data?: Record<string, any> | null;
|
|
256
269
|
}
|
|
257
270
|
interface BulkCreateQuizzesResponseBulkQuizResult {
|
|
258
|
-
/** Metadata for the individual create operation. */
|
|
271
|
+
/** Metadata for the individual create operation. When the operation fails, `error` contains the original Wix Forms application error. */
|
|
259
272
|
itemMetadata?: ItemMetadata;
|
|
260
273
|
/** Created quiz. Empty when `return_entity` is `false`. */
|
|
261
274
|
item?: Quiz;
|
|
@@ -297,29 +310,29 @@ interface BulkQuizResult {
|
|
|
297
310
|
}
|
|
298
311
|
interface GetQuizRequest {
|
|
299
312
|
/**
|
|
300
|
-
* ID
|
|
313
|
+
* Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
301
314
|
* @format GUID
|
|
302
315
|
*/
|
|
303
316
|
quizId: string;
|
|
304
317
|
}
|
|
305
318
|
interface GetQuizResponse {
|
|
306
|
-
/** Requested quiz */
|
|
319
|
+
/** Requested quiz definition. */
|
|
307
320
|
quiz?: Quiz;
|
|
308
321
|
}
|
|
309
322
|
interface DeleteQuizRequest {
|
|
310
323
|
/**
|
|
311
|
-
* ID of quiz
|
|
324
|
+
* ID of the quiz definition to permanently delete.
|
|
312
325
|
* @format GUID
|
|
313
326
|
*/
|
|
314
327
|
quizId: string;
|
|
315
328
|
}
|
|
316
329
|
interface DeleteQuizResponse {
|
|
317
|
-
/**
|
|
330
|
+
/** Permanently deleted quiz definition. */
|
|
318
331
|
quiz?: Quiz;
|
|
319
332
|
}
|
|
320
333
|
interface BulkDeleteQuizzesRequest {
|
|
321
334
|
/**
|
|
322
|
-
* IDs of the
|
|
335
|
+
* IDs of the quiz definitions to permanently delete. Coordinate deletion with the Steps API and remove known step references first.
|
|
323
336
|
* @minSize 1
|
|
324
337
|
* @maxSize 100
|
|
325
338
|
* @format GUID
|
|
@@ -337,7 +350,7 @@ interface BulkDeleteQuizzesResponse {
|
|
|
337
350
|
bulkActionMetadata?: BulkActionMetadata;
|
|
338
351
|
}
|
|
339
352
|
interface BulkDeleteQuizzesResponseBulkQuizResult {
|
|
340
|
-
/** Metadata for the individual delete operation. */
|
|
353
|
+
/** Metadata for the individual delete operation. When the operation fails, `error` contains the original Wix Forms application error. */
|
|
341
354
|
itemMetadata?: ItemMetadata;
|
|
342
355
|
}
|
|
343
356
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -537,6 +550,48 @@ interface AccountInfo {
|
|
|
537
550
|
*/
|
|
538
551
|
siteId?: string | null;
|
|
539
552
|
}
|
|
553
|
+
/** @docsIgnore */
|
|
554
|
+
type CreateQuizApplicationErrors = {
|
|
555
|
+
code?: 'INVALID_QUIZ';
|
|
556
|
+
description?: string;
|
|
557
|
+
data?: Record<string, any>;
|
|
558
|
+
} | {
|
|
559
|
+
code?: 'QUIZ_CONFLICT';
|
|
560
|
+
description?: string;
|
|
561
|
+
data?: Record<string, any>;
|
|
562
|
+
};
|
|
563
|
+
/** @docsIgnore */
|
|
564
|
+
type CloneQuizApplicationErrors = {
|
|
565
|
+
code?: 'QUIZ_NOT_FOUND';
|
|
566
|
+
description?: string;
|
|
567
|
+
data?: Record<string, any>;
|
|
568
|
+
} | {
|
|
569
|
+
code?: 'QUIZ_CONFLICT';
|
|
570
|
+
description?: string;
|
|
571
|
+
data?: Record<string, any>;
|
|
572
|
+
};
|
|
573
|
+
/** @docsIgnore */
|
|
574
|
+
type BulkCreateQuizzesApplicationErrors = {
|
|
575
|
+
code?: 'INVALID_QUIZ';
|
|
576
|
+
description?: string;
|
|
577
|
+
data?: Record<string, any>;
|
|
578
|
+
};
|
|
579
|
+
/** @docsIgnore */
|
|
580
|
+
type GetQuizApplicationErrors = {
|
|
581
|
+
code?: 'QUIZ_NOT_FOUND';
|
|
582
|
+
description?: string;
|
|
583
|
+
data?: Record<string, any>;
|
|
584
|
+
};
|
|
585
|
+
/** @docsIgnore */
|
|
586
|
+
type DeleteQuizApplicationErrors = {
|
|
587
|
+
code?: 'QUIZ_NOT_FOUND';
|
|
588
|
+
description?: string;
|
|
589
|
+
data?: Record<string, any>;
|
|
590
|
+
} | {
|
|
591
|
+
code?: 'QUIZ_CONFLICT';
|
|
592
|
+
description?: string;
|
|
593
|
+
data?: Record<string, any>;
|
|
594
|
+
};
|
|
540
595
|
|
|
541
596
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
542
597
|
getUrl: (context: any) => string;
|
|
@@ -561,4 +616,4 @@ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
|
|
|
561
616
|
}, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
|
|
562
617
|
declare function bulkDeleteQuizzes(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizzesRequest$1, BulkDeleteQuizzesRequest, BulkDeleteQuizzesResponse$1, BulkDeleteQuizzesResponse>;
|
|
563
618
|
|
|
564
|
-
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal, type BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal, type BulkCreateQuizzesRequest as BulkCreateQuizzesRequestOriginal, type BulkCreateQuizzesResponseBulkQuizResult as BulkCreateQuizzesResponseBulkQuizResultOriginal, type BulkCreateQuizzesResponse as BulkCreateQuizzesResponseOriginal, type BulkDeleteQuizzesRequest as BulkDeleteQuizzesRequestOriginal, type BulkDeleteQuizzesResponseBulkQuizResult as BulkDeleteQuizzesResponseBulkQuizResultOriginal, type BulkDeleteQuizzesResponse as BulkDeleteQuizzesResponseOriginal, type BulkQuizResult as BulkQuizResultOriginal, type CloneQuizRequest as CloneQuizRequestOriginal, type CloneQuizResponse as CloneQuizResponseOriginal, type CreateQuizRequest as CreateQuizRequestOriginal, type CreateQuizResponse as CreateQuizResponseOriginal, type DeleteQuizRequest as DeleteQuizRequestOriginal, type DeleteQuizResponse as DeleteQuizResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FileUploadField as FileUploadFieldOriginal, FileUploadFormat as FileUploadFormatOriginal, type FileUploadFormatWithLiterals as FileUploadFormatWithLiteralsOriginal, type GetQuizRequest as GetQuizRequestOriginal, type GetQuizResponse as GetQuizResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type LongTextField as LongTextFieldOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MultiChoiceField as MultiChoiceFieldOriginal, type NumericField as NumericFieldOriginal, type QuizFieldFieldTypeOneOf as QuizFieldFieldTypeOneOfOriginal, type QuizField as QuizFieldOriginal, type Quiz as QuizOriginal, type QuizSettings as QuizSettingsOriginal, type RestoreInfo as RestoreInfoOriginal, type ShortTextField as ShortTextFieldOriginal, type SingleChoiceField as SingleChoiceFieldOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|
|
619
|
+
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal, type BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal, type BulkCreateQuizzesApplicationErrors as BulkCreateQuizzesApplicationErrorsOriginal, type BulkCreateQuizzesRequest as BulkCreateQuizzesRequestOriginal, type BulkCreateQuizzesResponseBulkQuizResult as BulkCreateQuizzesResponseBulkQuizResultOriginal, type BulkCreateQuizzesResponse as BulkCreateQuizzesResponseOriginal, type BulkDeleteQuizzesRequest as BulkDeleteQuizzesRequestOriginal, type BulkDeleteQuizzesResponseBulkQuizResult as BulkDeleteQuizzesResponseBulkQuizResultOriginal, type BulkDeleteQuizzesResponse as BulkDeleteQuizzesResponseOriginal, type BulkQuizResult as BulkQuizResultOriginal, type CloneQuizApplicationErrors as CloneQuizApplicationErrorsOriginal, type CloneQuizRequest as CloneQuizRequestOriginal, type CloneQuizResponse as CloneQuizResponseOriginal, type CreateQuizApplicationErrors as CreateQuizApplicationErrorsOriginal, type CreateQuizRequest as CreateQuizRequestOriginal, type CreateQuizResponse as CreateQuizResponseOriginal, type DeleteQuizApplicationErrors as DeleteQuizApplicationErrorsOriginal, type DeleteQuizRequest as DeleteQuizRequestOriginal, type DeleteQuizResponse as DeleteQuizResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FileUploadField as FileUploadFieldOriginal, FileUploadFormat as FileUploadFormatOriginal, type FileUploadFormatWithLiterals as FileUploadFormatWithLiteralsOriginal, type GetQuizApplicationErrors as GetQuizApplicationErrorsOriginal, type GetQuizRequest as GetQuizRequestOriginal, type GetQuizResponse as GetQuizResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type LongTextField as LongTextFieldOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MultiChoiceField as MultiChoiceFieldOriginal, type NumericField as NumericFieldOriginal, type QuizFieldFieldTypeOneOf as QuizFieldFieldTypeOneOfOriginal, type QuizField as QuizFieldOriginal, type Quiz as QuizOriginal, type QuizSettings as QuizSettingsOriginal, type RestoreInfo as RestoreInfoOriginal, type ShortTextField as ShortTextFieldOriginal, type SingleChoiceField as SingleChoiceFieldOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|
|
@@ -1,56 +1,88 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Quiz, CloneQuizResponse, BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, DeleteQuizResponse, BulkDeleteQuizzesResponse } from './index.typings.mjs';
|
|
2
|
+
import { Quiz, CreateQuizApplicationErrors, CloneQuizResponse, CloneQuizApplicationErrors, BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, BulkCreateQuizzesApplicationErrors, GetQuizApplicationErrors, DeleteQuizResponse, DeleteQuizApplicationErrors, BulkDeleteQuizzesResponse } from './index.typings.mjs';
|
|
3
3
|
export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkCloneQuizzesRequest, BulkCloneQuizzesResponse, BulkCreateQuizzesRequest, BulkCreateQuizzesResponseBulkQuizResult, BulkDeleteQuizzesRequest, BulkDeleteQuizzesResponseBulkQuizResult, BulkQuizResult, CloneQuizRequest, CreateQuizRequest, CreateQuizResponse, DeleteQuizRequest, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FileUploadField, FileUploadFormat, FileUploadFormatWithLiterals, GetQuizRequest, GetQuizResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, LongTextField, MessageEnvelope, MultiChoiceField, NumericField, QuizField, QuizFieldFieldTypeOneOf, QuizSettings, RestoreInfo, ShortTextField, SingleChoiceField, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createQuiz$1(httpClient: HttpClient): CreateQuizSignature;
|
|
6
6
|
interface CreateQuizSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Creates quiz
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Creates a detached quiz definition.
|
|
9
|
+
*
|
|
10
|
+
* To use the quiz in an Online Program, pass the returned quiz ID as `step.quizOptions.id` when calling the Steps API's `CreateStep` or `BulkCreateSteps` method.
|
|
11
|
+
* @param - Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value.
|
|
12
|
+
* @returns Created quiz definition. Assign its `id` to `step.quizOptions.id` to create an Online Programs quiz step.
|
|
11
13
|
*/
|
|
12
|
-
(quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2
|
|
14
|
+
(quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2> & {
|
|
15
|
+
__applicationErrorsType?: CreateQuizApplicationErrors;
|
|
16
|
+
}>;
|
|
13
17
|
}
|
|
14
18
|
declare function cloneQuiz$1(httpClient: HttpClient): CloneQuizSignature;
|
|
15
19
|
interface CloneQuizSignature {
|
|
16
20
|
/**
|
|
17
|
-
* Clones quiz
|
|
18
|
-
*
|
|
21
|
+
* Clones a quiz definition and returns a new quiz ID.
|
|
22
|
+
*
|
|
23
|
+
* This operation copies the question and settings definition only. It doesn't copy Online Programs step associations or quiz submissions. Attach the returned ID to a step separately when needed.
|
|
24
|
+
* @param - ID of the quiz definition to clone.
|
|
19
25
|
*/
|
|
20
|
-
(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3
|
|
26
|
+
(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3> & {
|
|
27
|
+
__applicationErrorsType?: CloneQuizApplicationErrors;
|
|
28
|
+
}>;
|
|
21
29
|
}
|
|
22
30
|
declare function bulkCreateQuizzes$1(httpClient: HttpClient): BulkCreateQuizzesSignature;
|
|
23
31
|
interface BulkCreateQuizzesSignature {
|
|
24
32
|
/**
|
|
25
|
-
* Creates up to 30 quiz definitions in a single API call.
|
|
33
|
+
* Creates up to 30 detached quiz definitions in a single API call.
|
|
34
|
+
*
|
|
35
|
+
* Quiz IDs, revisions, and creation and update timestamps are assigned by the server. Client-supplied values for these read-only fields are ignored. Question IDs (`quizzes.fields.id`) must be supplied by the caller.
|
|
36
|
+
*
|
|
37
|
+
* Invalid quiz definitions fail the entire request before any quizzes are created.
|
|
38
|
+
*
|
|
39
|
+
* Individual item failures don't fail the bulk request. For each failed item, `results.itemMetadata.error` contains the original application error from the Wix Forms operation.
|
|
40
|
+
*
|
|
41
|
+
* To use the quizzes in an Online Program, pass the returned quiz IDs as `step.quizOptions.id` values when calling the Steps API's `CreateStep` or `BulkCreateSteps` method.
|
|
26
42
|
* @param - Quiz definitions to create.
|
|
27
43
|
*/
|
|
28
|
-
(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `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`, 4
|
|
44
|
+
(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `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`, 4> & {
|
|
45
|
+
__applicationErrorsType?: BulkCreateQuizzesApplicationErrors;
|
|
46
|
+
}>;
|
|
29
47
|
}
|
|
30
48
|
declare function getQuiz$1(httpClient: HttpClient): GetQuizSignature;
|
|
31
49
|
interface GetQuizSignature {
|
|
32
50
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
51
|
+
* Retrieves a quiz definition by ID.
|
|
52
|
+
*
|
|
53
|
+
* To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
|
|
54
|
+
* @param - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
55
|
+
* @returns Requested quiz definition.
|
|
36
56
|
*/
|
|
37
|
-
(quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2
|
|
57
|
+
(quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2> & {
|
|
58
|
+
__applicationErrorsType?: GetQuizApplicationErrors;
|
|
59
|
+
}>;
|
|
38
60
|
}
|
|
39
61
|
declare function deleteQuiz$1(httpClient: HttpClient): DeleteQuizSignature;
|
|
40
62
|
interface DeleteQuizSignature {
|
|
41
63
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
64
|
+
* Permanently deletes a quiz definition.
|
|
65
|
+
*
|
|
66
|
+
* This operation doesn't check whether Online Programs steps reference the quiz. Coordinate deletion with the Steps API and remove known step references first. Otherwise, steps can retain dangling quiz references.
|
|
67
|
+
*
|
|
68
|
+
* NOT-PRECEDENT: This caller-responsibility behavior is retained as a production v1 compatibility exception. New delete APIs should provide an authoritative server-side reference safeguard.
|
|
69
|
+
* @param - ID of the quiz definition to permanently delete.
|
|
44
70
|
*/
|
|
45
|
-
(quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3
|
|
71
|
+
(quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3> & {
|
|
72
|
+
__applicationErrorsType?: DeleteQuizApplicationErrors;
|
|
73
|
+
}>;
|
|
46
74
|
}
|
|
47
75
|
declare function bulkDeleteQuizzes$1(httpClient: HttpClient): BulkDeleteQuizzesSignature;
|
|
48
76
|
interface BulkDeleteQuizzesSignature {
|
|
49
77
|
/**
|
|
50
78
|
* Permanently deletes up to 100 quiz definitions.
|
|
51
79
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
80
|
+
* Individual item failures don't fail the bulk request. For each failed item, `results.itemMetadata.error` contains the original application error from the Wix Forms operation.
|
|
81
|
+
*
|
|
82
|
+
* This operation doesn't check whether Online Programs steps reference the quizzes. Coordinate deletion with the Steps API and remove known step references first. Otherwise, steps can retain dangling quiz references.
|
|
83
|
+
*
|
|
84
|
+
* NOT-PRECEDENT: This caller-responsibility behavior is retained as a production v1 compatibility exception. New bulk-delete APIs should provide an authoritative server-side reference safeguard.
|
|
85
|
+
* @param - IDs of the quiz definitions to permanently delete. Coordinate deletion with the Steps API and remove known step references first.
|
|
54
86
|
*/
|
|
55
87
|
(quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizzesResponse, `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`, 4>>;
|
|
56
88
|
}
|
|
@@ -62,4 +94,4 @@ declare const getQuiz: MaybeContext<BuildRESTFunction<typeof getQuiz$1> & typeof
|
|
|
62
94
|
declare const deleteQuiz: MaybeContext<BuildRESTFunction<typeof deleteQuiz$1> & typeof deleteQuiz$1>;
|
|
63
95
|
declare const bulkDeleteQuizzes: MaybeContext<BuildRESTFunction<typeof bulkDeleteQuizzes$1> & typeof bulkDeleteQuizzes$1>;
|
|
64
96
|
|
|
65
|
-
export { BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, BulkDeleteQuizzesResponse, CloneQuizResponse, DeleteQuizResponse, Quiz, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|
|
97
|
+
export { BulkCreateQuizzesApplicationErrors, BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, BulkDeleteQuizzesResponse, CloneQuizApplicationErrors, CloneQuizResponse, CreateQuizApplicationErrors, DeleteQuizApplicationErrors, DeleteQuizResponse, GetQuizApplicationErrors, Quiz, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|