@wix/auto_sdk_online-programs_quizzes 1.0.33 → 1.0.34

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.
@@ -32,7 +32,7 @@ interface Quiz {
32
32
  */
33
33
  _updatedDate?: Date | null;
34
34
  /**
35
- * Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. GetQuiz can return a legacy stored definition with an empty list; don't assume a retrieved definition has active questions.
35
+ * Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.
36
36
  *
37
37
  * New submissions use the current questions; stored submissions retain their recorded answer evaluations.
38
38
  * @minSize 1
@@ -138,7 +138,7 @@ interface NumericField {
138
138
  /**
139
139
  * 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.
140
140
  *
141
- * 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.
141
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.
142
142
  */
143
143
  rightAnswer?: number | null;
144
144
  }
@@ -146,7 +146,7 @@ interface ShortTextField {
146
146
  /**
147
147
  * 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.
148
148
  *
149
- * 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.
149
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.
150
150
  * @minLength 1
151
151
  * @maxLength 200
152
152
  */
@@ -159,7 +159,7 @@ interface SingleChoiceField {
159
159
  /**
160
160
  * 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.
161
161
  *
162
- * 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.
162
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.
163
163
  * @minLength 1
164
164
  * @maxLength 350
165
165
  */
@@ -178,7 +178,7 @@ interface MultiChoiceField {
178
178
  /**
179
179
  * 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.
180
180
  *
181
- * 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.
181
+ * Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.
182
182
  * @maxSize 90
183
183
  * @minLength 1
184
184
  * @maxLength 350
@@ -280,9 +280,9 @@ interface ApplicationError {
280
280
  data?: Record<string, any> | null;
281
281
  }
282
282
  interface BulkCreateQuizzesResponseBulkQuizResult {
283
- /** Metadata for the individual create operation. When the operation fails, `error` contains the original Wix Forms application error. */
283
+ /** Result metadata for the individual create operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */
284
284
  itemMetadata?: ItemMetadata;
285
- /** Created quiz. Empty when `return_entity` is `false`. */
285
+ /** Created quiz. Empty when `returnEntity` is `false`. */
286
286
  item?: Quiz;
287
287
  }
288
288
  interface BulkActionMetadata {
@@ -362,7 +362,7 @@ interface BulkDeleteQuizzesResponse {
362
362
  bulkActionMetadata?: BulkActionMetadata;
363
363
  }
364
364
  interface BulkDeleteQuizzesResponseBulkQuizResult {
365
- /** Metadata for the individual delete operation. When the operation fails, `error` contains the original Wix Forms application error. */
365
+ /** Result metadata for the individual delete operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */
366
366
  itemMetadata?: ItemMetadata;
367
367
  }
368
368
  interface DomainEvent extends DomainEventBodyOneOf {
@@ -591,7 +591,7 @@ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${nu
591
591
  /**
592
592
  * Clones a quiz definition and returns a new quiz ID.
593
593
  *
594
- * 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.
594
+ * A quiz with no active questions can't be cloned; the request fails with INVALID_QUIZ. Avoid modifying the source quiz while cloning it.
595
595
  *
596
596
  * 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.
597
597
  * @param quizId - ID of the quiz definition to clone.
@@ -613,7 +613,7 @@ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizRe
613
613
  *
614
614
  * Invalid quiz definitions fail the entire request before any quizzes are created.
615
615
  *
616
- * 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.
616
+ * Individual item failures don't fail the bulk request. Check `results.itemMetadata.success` for each item and inspect `results.itemMetadata.error` when it is `false`. Individual results can contain error codes not listed for the request.
617
617
  *
618
618
  * To use the quizzes in an Online Program, specify the returned quiz IDs as `step.quizOptions.id` values when calling the Steps API's [Create Step](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/create-step) or [Bulk Create Steps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps) method.
619
619
  *
@@ -647,7 +647,7 @@ interface BulkCreateQuizzesOptions {
647
647
  /**
648
648
  * Retrieves a quiz definition by ID.
649
649
  *
650
- * A legacy stored definition whose questions have all been deleted can be returned with an empty fields list. The minimum question requirement for creation and cloning doesn't guarantee a nonempty result from this method.
650
+ * A retrieved quiz can have an empty fields list after all its questions have been deleted. Check for active questions before displaying or reusing it.
651
651
  *
652
652
  * To discover a quiz ID, query or retrieve its quiz-type Online Programs step and read `step.quizOptions.id`.
653
653
  * @param quizId - Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step.
@@ -680,7 +680,7 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
680
680
  /**
681
681
  * Permanently deletes up to 100 quiz definitions.
682
682
  *
683
- * 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.
683
+ * Individual item failures don't fail the bulk request. Check `results.itemMetadata.success` for each item and inspect `results.itemMetadata.error` when it is `false`. Individual results can contain error codes not listed for the request.
684
684
  *
685
685
  * 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.
686
686
  *
@@ -33,7 +33,7 @@ interface Quiz {
33
33
  */
34
34
  updatedDate?: Date | null;
35
35
  /**
36
- * Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. GetQuiz can return a legacy stored definition with an empty list; don't assume a retrieved definition has active questions.
36
+ * Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.
37
37
  *
38
38
  * New submissions use the current questions; stored submissions retain their recorded answer evaluations.
39
39
  * @minSize 1
@@ -139,7 +139,7 @@ interface NumericField {
139
139
  /**
140
140
  * 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.
141
141
  *
142
- * 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.
142
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.
143
143
  */
144
144
  rightAnswer?: number | null;
145
145
  }
@@ -147,7 +147,7 @@ interface ShortTextField {
147
147
  /**
148
148
  * 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.
149
149
  *
150
- * 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.
150
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.
151
151
  * @minLength 1
152
152
  * @maxLength 200
153
153
  */
@@ -160,7 +160,7 @@ interface SingleChoiceField {
160
160
  /**
161
161
  * 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.
162
162
  *
163
- * 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.
163
+ * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.
164
164
  * @minLength 1
165
165
  * @maxLength 350
166
166
  */
@@ -179,7 +179,7 @@ interface MultiChoiceField {
179
179
  /**
180
180
  * 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.
181
181
  *
182
- * 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.
182
+ * Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.
183
183
  * @maxSize 90
184
184
  * @minLength 1
185
185
  * @maxLength 350
@@ -281,9 +281,9 @@ interface ApplicationError {
281
281
  data?: Record<string, any> | null;
282
282
  }
283
283
  interface BulkCreateQuizzesResponseBulkQuizResult {
284
- /** Metadata for the individual create operation. When the operation fails, `error` contains the original Wix Forms application error. */
284
+ /** Result metadata for the individual create operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */
285
285
  itemMetadata?: ItemMetadata;
286
- /** Created quiz. Empty when `return_entity` is `false`. */
286
+ /** Created quiz. Empty when `returnEntity` is `false`. */
287
287
  item?: Quiz;
288
288
  }
289
289
  interface BulkActionMetadata {
@@ -363,7 +363,7 @@ interface BulkDeleteQuizzesResponse {
363
363
  bulkActionMetadata?: BulkActionMetadata;
364
364
  }
365
365
  interface BulkDeleteQuizzesResponseBulkQuizResult {
366
- /** Metadata for the individual delete operation. When the operation fails, `error` contains the original Wix Forms application error. */
366
+ /** Result metadata for the individual delete operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */
367
367
  itemMetadata?: ItemMetadata;
368
368
  }
369
369
  interface DomainEvent extends DomainEventBodyOneOf {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_online-programs_quizzes",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
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": "08105b81737a18749598520eed031ac138ab3a1f4497860cac9a95f1"
53
+ "falconPackageHash": "a0d248de385f1db8df74f64355fad0f78d61cb031c8d7cb1dac45223"
54
54
  }