@wix/auto_sdk_online-programs_quizzes 1.0.27 → 1.0.28
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 +5 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +28 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +23 -8
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +5 -3
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +28 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +23 -8
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -3
- package/build/internal/cjs/index.typings.d.ts +28 -11
- package/build/internal/cjs/meta.d.ts +23 -8
- package/build/internal/es/index.d.mts +5 -3
- package/build/internal/es/index.typings.d.mts +28 -11
- package/build/internal/es/meta.d.mts +23 -8
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkClo
|
|
|
5
5
|
declare function createQuiz$1(httpClient: HttpClient): CreateQuizSignature;
|
|
6
6
|
interface CreateQuizSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Creates a detached quiz definition.
|
|
8
|
+
* Creates a detached quiz definition with at least one question.
|
|
9
9
|
*
|
|
10
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
11
|
* @param - Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value.
|
|
@@ -20,6 +20,8 @@ interface CloneQuizSignature {
|
|
|
20
20
|
/**
|
|
21
21
|
* Clones a quiz definition and returns a new quiz ID.
|
|
22
22
|
*
|
|
23
|
+
* Checks the source before cloning. An existing definition found to have no active questions is rejected with INVALID_QUIZ before cloning. Source checks aren't atomic with cloning.
|
|
24
|
+
*
|
|
23
25
|
* 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
26
|
* @param - ID of the quiz definition to clone.
|
|
25
27
|
*/
|
|
@@ -30,7 +32,7 @@ interface CloneQuizSignature {
|
|
|
30
32
|
declare function bulkCreateQuizzes$1(httpClient: HttpClient): BulkCreateQuizzesSignature;
|
|
31
33
|
interface BulkCreateQuizzesSignature {
|
|
32
34
|
/**
|
|
33
|
-
* Creates up to 30 detached quiz definitions in a single API call.
|
|
35
|
+
* Creates up to 30 detached quiz definitions in a single API call. Each definition must contain at least one question.
|
|
34
36
|
*
|
|
35
37
|
* 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
38
|
*
|
|
@@ -48,7 +50,7 @@ interface BulkCreateQuizzesSignature {
|
|
|
48
50
|
declare function getQuiz$1(httpClient: HttpClient): GetQuizSignature;
|
|
49
51
|
interface GetQuizSignature {
|
|
50
52
|
/**
|
|
51
|
-
* Retrieves a quiz definition by ID.
|
|
53
|
+
* Retrieves a quiz definition by ID. A stored definition whose questions have all been deleted can be returned with no active questions.
|
|
52
54
|
*
|
|
53
55
|
* To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
|
|
54
56
|
* @param - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
@@ -34,7 +34,9 @@ interface Quiz {
|
|
|
34
34
|
*/
|
|
35
35
|
_updatedDate?: Date | null;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating a quiz requires at least one question. An existing definition can have no active questions after its questions are deleted through another supported workflow; retrieving that definition doesn't fail solely because this list is empty.
|
|
38
|
+
*
|
|
39
|
+
* New submissions use the current questions; stored submissions retain their recorded answer evaluations. Reading an empty definition doesn't imply that it can be used to create a new quiz or accept submissions.
|
|
38
40
|
* @minSize 1
|
|
39
41
|
* @maxSize 200
|
|
40
42
|
*/
|
|
@@ -135,12 +137,18 @@ declare enum FileUploadFormat {
|
|
|
135
137
|
/** @enumType */
|
|
136
138
|
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
|
|
137
139
|
interface NumericField {
|
|
138
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
142
|
+
*
|
|
143
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct value is stored.
|
|
144
|
+
*/
|
|
139
145
|
rightAnswer?: number | null;
|
|
140
146
|
}
|
|
141
147
|
interface ShortTextField {
|
|
142
148
|
/**
|
|
143
|
-
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If
|
|
149
|
+
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
150
|
+
*
|
|
151
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct text is stored.
|
|
144
152
|
* @minLength 1
|
|
145
153
|
* @maxLength 200
|
|
146
154
|
*/
|
|
@@ -151,13 +159,15 @@ interface LongTextField {
|
|
|
151
159
|
}
|
|
152
160
|
interface SingleChoiceField {
|
|
153
161
|
/**
|
|
154
|
-
* Correct option. Matching is exact. If
|
|
162
|
+
* Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
163
|
+
*
|
|
164
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct option is stored.
|
|
155
165
|
* @minLength 1
|
|
156
166
|
* @maxLength 350
|
|
157
167
|
*/
|
|
158
168
|
rightAnswer?: string | null;
|
|
159
169
|
/**
|
|
160
|
-
* Options available to the participant.
|
|
170
|
+
* Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.
|
|
161
171
|
* @minSize 1
|
|
162
172
|
* @maxSize 90
|
|
163
173
|
* @minLength 1
|
|
@@ -165,11 +175,12 @@ interface SingleChoiceField {
|
|
|
165
175
|
*/
|
|
166
176
|
options?: string[] | null;
|
|
167
177
|
}
|
|
178
|
+
/** Multiple-choice input settings. Existing Wix Forms image-choice questions are also returned in this shape, even when their original settings allow only one selection. Image-choice-specific settings aren't exposed by the Quiz API. */
|
|
168
179
|
interface MultiChoiceField {
|
|
169
180
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
181
|
+
* Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
182
|
+
*
|
|
183
|
+
* Empty in responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove stored keys or change grading; an empty response list doesn't mean no correct options are stored.
|
|
173
184
|
* @maxSize 90
|
|
174
185
|
* @minLength 1
|
|
175
186
|
* @maxLength 350
|
|
@@ -517,6 +528,10 @@ type CreateQuizApplicationErrors = {
|
|
|
517
528
|
};
|
|
518
529
|
/** @docsIgnore */
|
|
519
530
|
type CloneQuizApplicationErrors = {
|
|
531
|
+
code?: 'INVALID_QUIZ';
|
|
532
|
+
description?: string;
|
|
533
|
+
data?: Record<string, any>;
|
|
534
|
+
} | {
|
|
520
535
|
code?: 'QUIZ_NOT_FOUND';
|
|
521
536
|
description?: string;
|
|
522
537
|
data?: Record<string, any>;
|
|
@@ -548,7 +563,7 @@ type DeleteQuizApplicationErrors = {
|
|
|
548
563
|
data?: Record<string, any>;
|
|
549
564
|
};
|
|
550
565
|
/**
|
|
551
|
-
* Creates a detached quiz definition.
|
|
566
|
+
* Creates a detached quiz definition with at least one question.
|
|
552
567
|
*
|
|
553
568
|
* 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.
|
|
554
569
|
* @param quiz - Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value.
|
|
@@ -572,6 +587,8 @@ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${nu
|
|
|
572
587
|
/**
|
|
573
588
|
* Clones a quiz definition and returns a new quiz ID.
|
|
574
589
|
*
|
|
590
|
+
* Checks the source before cloning. An existing definition found to have no active questions is rejected with INVALID_QUIZ before cloning. Source checks aren't atomic with cloning.
|
|
591
|
+
*
|
|
575
592
|
* 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.
|
|
576
593
|
* @param quizId - ID of the quiz definition to clone.
|
|
577
594
|
* @public
|
|
@@ -584,7 +601,7 @@ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizRe
|
|
|
584
601
|
__applicationErrorsType?: CloneQuizApplicationErrors;
|
|
585
602
|
}>;
|
|
586
603
|
/**
|
|
587
|
-
* Creates up to 30 detached quiz definitions in a single API call.
|
|
604
|
+
* Creates up to 30 detached quiz definitions in a single API call. Each definition must contain at least one question.
|
|
588
605
|
*
|
|
589
606
|
* 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.
|
|
590
607
|
*
|
|
@@ -620,7 +637,7 @@ interface BulkCreateQuizzesOptions {
|
|
|
620
637
|
returnEntity?: boolean;
|
|
621
638
|
}
|
|
622
639
|
/**
|
|
623
|
-
* Retrieves a quiz definition by ID.
|
|
640
|
+
* Retrieves a quiz definition by ID. A stored definition whose questions have all been deleted can be returned with no active questions.
|
|
624
641
|
*
|
|
625
642
|
* To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
|
|
626
643
|
* @param quizId - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
@@ -35,7 +35,9 @@ interface Quiz {
|
|
|
35
35
|
*/
|
|
36
36
|
updatedDate?: Date | null;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating a quiz requires at least one question. An existing definition can have no active questions after its questions are deleted through another supported workflow; retrieving that definition doesn't fail solely because this list is empty.
|
|
39
|
+
*
|
|
40
|
+
* New submissions use the current questions; stored submissions retain their recorded answer evaluations. Reading an empty definition doesn't imply that it can be used to create a new quiz or accept submissions.
|
|
39
41
|
* @minSize 1
|
|
40
42
|
* @maxSize 200
|
|
41
43
|
*/
|
|
@@ -136,12 +138,18 @@ declare enum FileUploadFormat {
|
|
|
136
138
|
/** @enumType */
|
|
137
139
|
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
|
|
138
140
|
interface NumericField {
|
|
139
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
143
|
+
*
|
|
144
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct value is stored.
|
|
145
|
+
*/
|
|
140
146
|
rightAnswer?: number | null;
|
|
141
147
|
}
|
|
142
148
|
interface ShortTextField {
|
|
143
149
|
/**
|
|
144
|
-
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If
|
|
150
|
+
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
151
|
+
*
|
|
152
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct text is stored.
|
|
145
153
|
* @minLength 1
|
|
146
154
|
* @maxLength 200
|
|
147
155
|
*/
|
|
@@ -152,13 +160,15 @@ interface LongTextField {
|
|
|
152
160
|
}
|
|
153
161
|
interface SingleChoiceField {
|
|
154
162
|
/**
|
|
155
|
-
* Correct option. Matching is exact. If
|
|
163
|
+
* Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
164
|
+
*
|
|
165
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct option is stored.
|
|
156
166
|
* @minLength 1
|
|
157
167
|
* @maxLength 350
|
|
158
168
|
*/
|
|
159
169
|
rightAnswer?: string | null;
|
|
160
170
|
/**
|
|
161
|
-
* Options available to the participant.
|
|
171
|
+
* Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.
|
|
162
172
|
* @minSize 1
|
|
163
173
|
* @maxSize 90
|
|
164
174
|
* @minLength 1
|
|
@@ -166,11 +176,12 @@ interface SingleChoiceField {
|
|
|
166
176
|
*/
|
|
167
177
|
options?: string[] | null;
|
|
168
178
|
}
|
|
179
|
+
/** Multiple-choice input settings. Existing Wix Forms image-choice questions are also returned in this shape, even when their original settings allow only one selection. Image-choice-specific settings aren't exposed by the Quiz API. */
|
|
169
180
|
interface MultiChoiceField {
|
|
170
181
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
182
|
+
* Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
183
|
+
*
|
|
184
|
+
* Empty in responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove stored keys or change grading; an empty response list doesn't mean no correct options are stored.
|
|
174
185
|
* @maxSize 90
|
|
175
186
|
* @minLength 1
|
|
176
187
|
* @maxLength 350
|
|
@@ -562,6 +573,10 @@ type CreateQuizApplicationErrors = {
|
|
|
562
573
|
};
|
|
563
574
|
/** @docsIgnore */
|
|
564
575
|
type CloneQuizApplicationErrors = {
|
|
576
|
+
code?: 'INVALID_QUIZ';
|
|
577
|
+
description?: string;
|
|
578
|
+
data?: Record<string, any>;
|
|
579
|
+
} | {
|
|
565
580
|
code?: 'QUIZ_NOT_FOUND';
|
|
566
581
|
description?: string;
|
|
567
582
|
data?: Record<string, any>;
|
|
@@ -5,7 +5,7 @@ export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkClo
|
|
|
5
5
|
declare function createQuiz$1(httpClient: HttpClient): CreateQuizSignature;
|
|
6
6
|
interface CreateQuizSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Creates a detached quiz definition.
|
|
8
|
+
* Creates a detached quiz definition with at least one question.
|
|
9
9
|
*
|
|
10
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
11
|
* @param - Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value.
|
|
@@ -20,6 +20,8 @@ interface CloneQuizSignature {
|
|
|
20
20
|
/**
|
|
21
21
|
* Clones a quiz definition and returns a new quiz ID.
|
|
22
22
|
*
|
|
23
|
+
* Checks the source before cloning. An existing definition found to have no active questions is rejected with INVALID_QUIZ before cloning. Source checks aren't atomic with cloning.
|
|
24
|
+
*
|
|
23
25
|
* 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
26
|
* @param - ID of the quiz definition to clone.
|
|
25
27
|
*/
|
|
@@ -30,7 +32,7 @@ interface CloneQuizSignature {
|
|
|
30
32
|
declare function bulkCreateQuizzes$1(httpClient: HttpClient): BulkCreateQuizzesSignature;
|
|
31
33
|
interface BulkCreateQuizzesSignature {
|
|
32
34
|
/**
|
|
33
|
-
* Creates up to 30 detached quiz definitions in a single API call.
|
|
35
|
+
* Creates up to 30 detached quiz definitions in a single API call. Each definition must contain at least one question.
|
|
34
36
|
*
|
|
35
37
|
* 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
38
|
*
|
|
@@ -48,7 +50,7 @@ interface BulkCreateQuizzesSignature {
|
|
|
48
50
|
declare function getQuiz$1(httpClient: HttpClient): GetQuizSignature;
|
|
49
51
|
interface GetQuizSignature {
|
|
50
52
|
/**
|
|
51
|
-
* Retrieves a quiz definition by ID.
|
|
53
|
+
* Retrieves a quiz definition by ID. A stored definition whose questions have all been deleted can be returned with no active questions.
|
|
52
54
|
*
|
|
53
55
|
* To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
|
|
54
56
|
* @param - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
@@ -34,7 +34,9 @@ interface Quiz {
|
|
|
34
34
|
*/
|
|
35
35
|
_updatedDate?: Date | null;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating a quiz requires at least one question. An existing definition can have no active questions after its questions are deleted through another supported workflow; retrieving that definition doesn't fail solely because this list is empty.
|
|
38
|
+
*
|
|
39
|
+
* New submissions use the current questions; stored submissions retain their recorded answer evaluations. Reading an empty definition doesn't imply that it can be used to create a new quiz or accept submissions.
|
|
38
40
|
* @minSize 1
|
|
39
41
|
* @maxSize 200
|
|
40
42
|
*/
|
|
@@ -135,12 +137,18 @@ declare enum FileUploadFormat {
|
|
|
135
137
|
/** @enumType */
|
|
136
138
|
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
|
|
137
139
|
interface NumericField {
|
|
138
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
142
|
+
*
|
|
143
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct value is stored.
|
|
144
|
+
*/
|
|
139
145
|
rightAnswer?: number | null;
|
|
140
146
|
}
|
|
141
147
|
interface ShortTextField {
|
|
142
148
|
/**
|
|
143
|
-
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If
|
|
149
|
+
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
150
|
+
*
|
|
151
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct text is stored.
|
|
144
152
|
* @minLength 1
|
|
145
153
|
* @maxLength 200
|
|
146
154
|
*/
|
|
@@ -151,13 +159,15 @@ interface LongTextField {
|
|
|
151
159
|
}
|
|
152
160
|
interface SingleChoiceField {
|
|
153
161
|
/**
|
|
154
|
-
* Correct option. Matching is exact. If
|
|
162
|
+
* Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
163
|
+
*
|
|
164
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct option is stored.
|
|
155
165
|
* @minLength 1
|
|
156
166
|
* @maxLength 350
|
|
157
167
|
*/
|
|
158
168
|
rightAnswer?: string | null;
|
|
159
169
|
/**
|
|
160
|
-
* Options available to the participant.
|
|
170
|
+
* Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.
|
|
161
171
|
* @minSize 1
|
|
162
172
|
* @maxSize 90
|
|
163
173
|
* @minLength 1
|
|
@@ -165,11 +175,12 @@ interface SingleChoiceField {
|
|
|
165
175
|
*/
|
|
166
176
|
options?: string[] | null;
|
|
167
177
|
}
|
|
178
|
+
/** Multiple-choice input settings. Existing Wix Forms image-choice questions are also returned in this shape, even when their original settings allow only one selection. Image-choice-specific settings aren't exposed by the Quiz API. */
|
|
168
179
|
interface MultiChoiceField {
|
|
169
180
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
181
|
+
* Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
182
|
+
*
|
|
183
|
+
* Empty in responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove stored keys or change grading; an empty response list doesn't mean no correct options are stored.
|
|
173
184
|
* @maxSize 90
|
|
174
185
|
* @minLength 1
|
|
175
186
|
* @maxLength 350
|
|
@@ -517,6 +528,10 @@ type CreateQuizApplicationErrors = {
|
|
|
517
528
|
};
|
|
518
529
|
/** @docsIgnore */
|
|
519
530
|
type CloneQuizApplicationErrors = {
|
|
531
|
+
code?: 'INVALID_QUIZ';
|
|
532
|
+
description?: string;
|
|
533
|
+
data?: Record<string, any>;
|
|
534
|
+
} | {
|
|
520
535
|
code?: 'QUIZ_NOT_FOUND';
|
|
521
536
|
description?: string;
|
|
522
537
|
data?: Record<string, any>;
|
|
@@ -548,7 +563,7 @@ type DeleteQuizApplicationErrors = {
|
|
|
548
563
|
data?: Record<string, any>;
|
|
549
564
|
};
|
|
550
565
|
/**
|
|
551
|
-
* Creates a detached quiz definition.
|
|
566
|
+
* Creates a detached quiz definition with at least one question.
|
|
552
567
|
*
|
|
553
568
|
* 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.
|
|
554
569
|
* @param quiz - Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value.
|
|
@@ -572,6 +587,8 @@ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${nu
|
|
|
572
587
|
/**
|
|
573
588
|
* Clones a quiz definition and returns a new quiz ID.
|
|
574
589
|
*
|
|
590
|
+
* Checks the source before cloning. An existing definition found to have no active questions is rejected with INVALID_QUIZ before cloning. Source checks aren't atomic with cloning.
|
|
591
|
+
*
|
|
575
592
|
* 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.
|
|
576
593
|
* @param quizId - ID of the quiz definition to clone.
|
|
577
594
|
* @public
|
|
@@ -584,7 +601,7 @@ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizRe
|
|
|
584
601
|
__applicationErrorsType?: CloneQuizApplicationErrors;
|
|
585
602
|
}>;
|
|
586
603
|
/**
|
|
587
|
-
* Creates up to 30 detached quiz definitions in a single API call.
|
|
604
|
+
* Creates up to 30 detached quiz definitions in a single API call. Each definition must contain at least one question.
|
|
588
605
|
*
|
|
589
606
|
* 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.
|
|
590
607
|
*
|
|
@@ -620,7 +637,7 @@ interface BulkCreateQuizzesOptions {
|
|
|
620
637
|
returnEntity?: boolean;
|
|
621
638
|
}
|
|
622
639
|
/**
|
|
623
|
-
* Retrieves a quiz definition by ID.
|
|
640
|
+
* Retrieves a quiz definition by ID. A stored definition whose questions have all been deleted can be returned with no active questions.
|
|
624
641
|
*
|
|
625
642
|
* To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
|
|
626
643
|
* @param quizId - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
|
|
@@ -35,7 +35,9 @@ interface Quiz {
|
|
|
35
35
|
*/
|
|
36
36
|
updatedDate?: Date | null;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating a quiz requires at least one question. An existing definition can have no active questions after its questions are deleted through another supported workflow; retrieving that definition doesn't fail solely because this list is empty.
|
|
39
|
+
*
|
|
40
|
+
* New submissions use the current questions; stored submissions retain their recorded answer evaluations. Reading an empty definition doesn't imply that it can be used to create a new quiz or accept submissions.
|
|
39
41
|
* @minSize 1
|
|
40
42
|
* @maxSize 200
|
|
41
43
|
*/
|
|
@@ -136,12 +138,18 @@ declare enum FileUploadFormat {
|
|
|
136
138
|
/** @enumType */
|
|
137
139
|
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
|
|
138
140
|
interface NumericField {
|
|
139
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
143
|
+
*
|
|
144
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct value is stored.
|
|
145
|
+
*/
|
|
140
146
|
rightAnswer?: number | null;
|
|
141
147
|
}
|
|
142
148
|
interface ShortTextField {
|
|
143
149
|
/**
|
|
144
|
-
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If
|
|
150
|
+
* Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
151
|
+
*
|
|
152
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct text is stored.
|
|
145
153
|
* @minLength 1
|
|
146
154
|
* @maxLength 200
|
|
147
155
|
*/
|
|
@@ -152,13 +160,15 @@ interface LongTextField {
|
|
|
152
160
|
}
|
|
153
161
|
interface SingleChoiceField {
|
|
154
162
|
/**
|
|
155
|
-
* Correct option. Matching is exact. If
|
|
163
|
+
* Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
164
|
+
*
|
|
165
|
+
* Omitted from responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove the stored key or change grading; an absent response value doesn't mean no correct option is stored.
|
|
156
166
|
* @minLength 1
|
|
157
167
|
* @maxLength 350
|
|
158
168
|
*/
|
|
159
169
|
rightAnswer?: string | null;
|
|
160
170
|
/**
|
|
161
|
-
* Options available to the participant.
|
|
171
|
+
* Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.
|
|
162
172
|
* @minSize 1
|
|
163
173
|
* @maxSize 90
|
|
164
174
|
* @minLength 1
|
|
@@ -166,11 +176,12 @@ interface SingleChoiceField {
|
|
|
166
176
|
*/
|
|
167
177
|
options?: string[] | null;
|
|
168
178
|
}
|
|
179
|
+
/** Multiple-choice input settings. Existing Wix Forms image-choice questions are also returned in this shape, even when their original settings allow only one selection. Image-choice-specific settings aren't exposed by the Quiz API. */
|
|
169
180
|
interface MultiChoiceField {
|
|
170
181
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
182
|
+
* Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.
|
|
183
|
+
*
|
|
184
|
+
* Empty in responses when the caller lacks achievements:quizzes:v1:quiz:read_sensitive_fields permission. Response filtering doesn't remove stored keys or change grading; an empty response list doesn't mean no correct options are stored.
|
|
174
185
|
* @maxSize 90
|
|
175
186
|
* @minLength 1
|
|
176
187
|
* @maxLength 350
|
|
@@ -562,6 +573,10 @@ type CreateQuizApplicationErrors = {
|
|
|
562
573
|
};
|
|
563
574
|
/** @docsIgnore */
|
|
564
575
|
type CloneQuizApplicationErrors = {
|
|
576
|
+
code?: 'INVALID_QUIZ';
|
|
577
|
+
description?: string;
|
|
578
|
+
data?: Record<string, any>;
|
|
579
|
+
} | {
|
|
565
580
|
code?: 'QUIZ_NOT_FOUND';
|
|
566
581
|
description?: string;
|
|
567
582
|
data?: Record<string, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_online-programs_quizzes",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.achievements.quizzes.v1.quiz"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "c296504c5661d6c1f7de3ba10865540325d0e9582bef7e5900770fb8"
|
|
54
54
|
}
|