@wix/auto_sdk_online-programs_quizzes 1.0.18 → 1.0.20
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 +9 -19
- package/build/cjs/index.js +21 -81
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +70 -83
- package/build/cjs/index.typings.js +18 -70
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +59 -64
- package/build/cjs/meta.js +18 -65
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +9 -19
- package/build/es/index.mjs +19 -79
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +70 -83
- package/build/es/index.typings.mjs +16 -68
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +59 -64
- package/build/es/meta.mjs +16 -63
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -19
- package/build/internal/cjs/index.typings.d.ts +70 -83
- package/build/internal/cjs/meta.d.ts +59 -64
- package/build/internal/es/index.d.mts +9 -19
- package/build/internal/es/index.typings.d.mts +70 -83
- package/build/internal/es/meta.d.mts +59 -64
- package/package.json +2 -2
|
@@ -116,6 +116,20 @@ declare enum FileFormat {
|
|
|
116
116
|
}
|
|
117
117
|
/** @enumType */
|
|
118
118
|
type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
|
|
119
|
+
declare enum FileUploadFormat {
|
|
120
|
+
/** Image files. */
|
|
121
|
+
IMAGE = "IMAGE",
|
|
122
|
+
/** Video files. */
|
|
123
|
+
VIDEO = "VIDEO",
|
|
124
|
+
/** Audio files. */
|
|
125
|
+
AUDIO = "AUDIO",
|
|
126
|
+
/** Document files. */
|
|
127
|
+
DOCUMENT = "DOCUMENT",
|
|
128
|
+
/** Archive files. */
|
|
129
|
+
ARCHIVE = "ARCHIVE"
|
|
130
|
+
}
|
|
131
|
+
/** @enumType */
|
|
132
|
+
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
|
|
119
133
|
interface NumericField {
|
|
120
134
|
/** Right answer */
|
|
121
135
|
rightAnswer?: number | null;
|
|
@@ -177,11 +191,20 @@ interface FileUploadField {
|
|
|
177
191
|
*/
|
|
178
192
|
itemsLimit?: number | null;
|
|
179
193
|
/**
|
|
180
|
-
*
|
|
181
|
-
* @minSize 1
|
|
194
|
+
* Deprecated. Use `file_upload_formats` instead.
|
|
182
195
|
* @maxSize 5
|
|
196
|
+
* @deprecated Deprecated. Use `file_upload_formats` instead.
|
|
197
|
+
* @replacedBy file_upload_formats
|
|
198
|
+
* @targetRemovalDate 2027-09-03
|
|
183
199
|
*/
|
|
184
200
|
fileFormats?: FileFormatWithLiterals[];
|
|
201
|
+
/**
|
|
202
|
+
* Formats of files that can be uploaded.
|
|
203
|
+
*
|
|
204
|
+
* Specify at least one format in either this field or the deprecated `file_formats` field. If both fields are provided, they must contain the same formats. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. Responses contain both fields for backward compatibility.
|
|
205
|
+
* @maxSize 5
|
|
206
|
+
*/
|
|
207
|
+
fileUploadFormats?: FileUploadFormatWithLiterals[];
|
|
185
208
|
}
|
|
186
209
|
interface CreateQuizRequest {
|
|
187
210
|
/** Quiz to created */
|
|
@@ -202,27 +225,31 @@ interface CloneQuizResponse {
|
|
|
202
225
|
/** Cloned quiz */
|
|
203
226
|
quiz?: Quiz;
|
|
204
227
|
}
|
|
205
|
-
interface
|
|
228
|
+
interface BulkCreateQuizzesRequest {
|
|
206
229
|
/**
|
|
207
|
-
*
|
|
230
|
+
* Quiz definitions to create.
|
|
208
231
|
* @minSize 1
|
|
209
232
|
* @maxSize 30
|
|
210
233
|
*/
|
|
211
234
|
quizzes: Quiz[];
|
|
212
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Whether to return the created quizzes in the response.
|
|
237
|
+
*
|
|
238
|
+
* Default: `false`
|
|
239
|
+
*/
|
|
213
240
|
returnEntity?: boolean;
|
|
214
241
|
}
|
|
215
|
-
interface
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
|
|
242
|
+
interface BulkCreateQuizzesResponse {
|
|
243
|
+
/**
|
|
244
|
+
* Results of the bulk create operation.
|
|
245
|
+
* @minSize 1
|
|
246
|
+
* @maxSize 30
|
|
247
|
+
*/
|
|
248
|
+
results?: BulkCreateQuizzesResponseBulkQuizResult[];
|
|
249
|
+
/** Metadata about the bulk create operation. */
|
|
250
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
224
251
|
}
|
|
225
|
-
interface
|
|
252
|
+
interface ItemMetadata {
|
|
226
253
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
227
254
|
_id?: string | null;
|
|
228
255
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
@@ -240,6 +267,20 @@ interface ApplicationError {
|
|
|
240
267
|
/** Data related to the error. */
|
|
241
268
|
data?: Record<string, any> | null;
|
|
242
269
|
}
|
|
270
|
+
interface BulkCreateQuizzesResponseBulkQuizResult {
|
|
271
|
+
/** Metadata for the individual create operation. */
|
|
272
|
+
itemMetadata?: ItemMetadata;
|
|
273
|
+
/** Created quiz. Empty when `return_entity` is `false`. */
|
|
274
|
+
item?: Quiz;
|
|
275
|
+
}
|
|
276
|
+
interface BulkActionMetadata {
|
|
277
|
+
/** Number of items that were successfully processed. */
|
|
278
|
+
totalSuccesses?: number;
|
|
279
|
+
/** Number of items that couldn't be processed. */
|
|
280
|
+
totalFailures?: number;
|
|
281
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
282
|
+
undetailedFailures?: number;
|
|
283
|
+
}
|
|
243
284
|
interface BulkCloneQuizzesRequest {
|
|
244
285
|
/**
|
|
245
286
|
* IDs of the quizzes to clone.
|
|
@@ -261,30 +302,12 @@ interface BulkCloneQuizzesResponse {
|
|
|
261
302
|
/** Metadata about the bulk operation. */
|
|
262
303
|
bulkActionMetadata?: BulkActionMetadata;
|
|
263
304
|
}
|
|
264
|
-
interface ItemMetadata {
|
|
265
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
266
|
-
_id?: string | null;
|
|
267
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
268
|
-
originalIndex?: number;
|
|
269
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
270
|
-
success?: boolean;
|
|
271
|
-
/** Details about the error in case of failure. */
|
|
272
|
-
error?: ApplicationError;
|
|
273
|
-
}
|
|
274
305
|
interface BulkQuizResult {
|
|
275
306
|
/** Metadata for the cloned quiz. */
|
|
276
307
|
itemMetadata?: ItemMetadata;
|
|
277
308
|
/** Cloned quiz. Empty when `return_entity` is `false`. */
|
|
278
309
|
item?: Quiz;
|
|
279
310
|
}
|
|
280
|
-
interface BulkActionMetadata {
|
|
281
|
-
/** Number of items that were successfully processed. */
|
|
282
|
-
totalSuccesses?: number;
|
|
283
|
-
/** Number of items that couldn't be processed. */
|
|
284
|
-
totalFailures?: number;
|
|
285
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
286
|
-
undetailedFailures?: number;
|
|
287
|
-
}
|
|
288
311
|
interface GetQuizRequest {
|
|
289
312
|
/**
|
|
290
313
|
* ID of the quiz
|
|
@@ -330,33 +353,6 @@ interface BulkDeleteQuizzesResponseBulkQuizResult {
|
|
|
330
353
|
/** Metadata for the individual delete operation. */
|
|
331
354
|
itemMetadata?: ItemMetadata;
|
|
332
355
|
}
|
|
333
|
-
interface BulkDeleteQuizRequest {
|
|
334
|
-
/**
|
|
335
|
-
* IDs of quizzes to delete
|
|
336
|
-
* @minSize 1
|
|
337
|
-
* @maxSize 100
|
|
338
|
-
* @format GUID
|
|
339
|
-
*/
|
|
340
|
-
quizIds: string[];
|
|
341
|
-
}
|
|
342
|
-
interface BulkDeleteQuizResponse {
|
|
343
|
-
/**
|
|
344
|
-
* Results of the bulk delete operation, including deleted quizzes and metadata.
|
|
345
|
-
* @minSize 1
|
|
346
|
-
* @maxSize 100
|
|
347
|
-
*/
|
|
348
|
-
results?: V1BulkQuizResult[];
|
|
349
|
-
/** Metadata about the bulk operation. */
|
|
350
|
-
bulkActionMetadata?: CommonBulkActionMetadata;
|
|
351
|
-
}
|
|
352
|
-
interface CommonBulkActionMetadata {
|
|
353
|
-
/** Number of items that were successfully processed. */
|
|
354
|
-
totalSuccesses?: number;
|
|
355
|
-
/** Number of items that couldn't be processed. */
|
|
356
|
-
totalFailures?: number;
|
|
357
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
358
|
-
undetailedFailures?: number;
|
|
359
|
-
}
|
|
360
356
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
361
357
|
createdEvent?: EntityCreatedEvent;
|
|
362
358
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -539,9 +535,10 @@ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${nu
|
|
|
539
535
|
*/
|
|
540
536
|
declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
|
|
541
537
|
/**
|
|
542
|
-
* Creates
|
|
543
|
-
* @param quizzes -
|
|
538
|
+
* Creates up to 30 quiz definitions in a single API call.
|
|
539
|
+
* @param quizzes - Quiz definitions to create.
|
|
544
540
|
* @public
|
|
541
|
+
* @documentationMaturity preview
|
|
545
542
|
* @requiredField quizzes
|
|
546
543
|
* @requiredField quizzes.fields
|
|
547
544
|
* @requiredField quizzes.fields.FieldType
|
|
@@ -550,13 +547,16 @@ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizRe
|
|
|
550
547
|
* @requiredField quizzes.fields._id
|
|
551
548
|
* @requiredField quizzes.fields.question
|
|
552
549
|
* @requiredField quizzes.fields.target
|
|
553
|
-
* @permissionId
|
|
554
|
-
* @
|
|
555
|
-
* @fqn wix.achievements.quizzes.v1.QuizService.BulkCreateQuiz
|
|
550
|
+
* @permissionId achievements:quizzes:v1:quiz:bulk_create_quizzes
|
|
551
|
+
* @fqn wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes
|
|
556
552
|
*/
|
|
557
|
-
declare function
|
|
558
|
-
interface
|
|
559
|
-
/**
|
|
553
|
+
declare function bulkCreateQuizzes(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>[], 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`, 6>>;
|
|
554
|
+
interface BulkCreateQuizzesOptions {
|
|
555
|
+
/**
|
|
556
|
+
* Whether to return the created quizzes in the response.
|
|
557
|
+
*
|
|
558
|
+
* Default: `false`
|
|
559
|
+
*/
|
|
560
560
|
returnEntity?: boolean;
|
|
561
561
|
}
|
|
562
562
|
/**
|
|
@@ -589,22 +589,9 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
|
|
|
589
589
|
* @documentationMaturity preview
|
|
590
590
|
* @requiredField quizIds
|
|
591
591
|
* @permissionId achievements:quizzes:v1:quiz:bulk_delete_quizzes
|
|
592
|
+
* @applicableIdentity APP
|
|
592
593
|
* @fqn wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes
|
|
593
594
|
*/
|
|
594
595
|
declare function bulkDeleteQuizzes(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`, 6>>;
|
|
595
|
-
/**
|
|
596
|
-
* Deprecated. Use `BulkDeleteQuizzes`.
|
|
597
|
-
* @param quizIds - IDs of quizzes to delete
|
|
598
|
-
* @public
|
|
599
|
-
* @documentationMaturity preview
|
|
600
|
-
* @requiredField quizIds
|
|
601
|
-
* @permissionId QUIZZES.DELETE_QUIZ
|
|
602
|
-
* @applicableIdentity APP
|
|
603
|
-
* @fqn wix.achievements.quizzes.v1.QuizService.BulkDeleteQuiz
|
|
604
|
-
* @deprecated
|
|
605
|
-
* @replacedBy wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes
|
|
606
|
-
* @targetRemovalDate 2027-09-02
|
|
607
|
-
*/
|
|
608
|
-
declare function bulkDeleteQuiz(quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizResponse, `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`, 6>>;
|
|
609
596
|
|
|
610
|
-
export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizzesRequest, type BulkCloneQuizzesResponse, type
|
|
597
|
+
export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizzesRequest, type BulkCloneQuizzesResponse, type BulkCreateQuizzesOptions, type BulkCreateQuizzesRequest, type BulkCreateQuizzesResponse, type BulkCreateQuizzesResponseBulkQuizResult, type BulkDeleteQuizzesRequest, type BulkDeleteQuizzesResponse, type BulkDeleteQuizzesResponseBulkQuizResult, type BulkQuizResult, type CloneQuizRequest, type CloneQuizResponse, type CreateQuizRequest, type CreateQuizResponse, type DeleteQuizRequest, type DeleteQuizResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, FileFormat, type FileFormatWithLiterals, type FileUploadField, FileUploadFormat, type FileUploadFormatWithLiterals, type GetQuizRequest, type GetQuizResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type LongTextField, type MessageEnvelope, type MultiChoiceField, type NumericField, type Quiz, type QuizField, type QuizFieldFieldTypeOneOf, type QuizSettings, type RestoreInfo, type ShortTextField, type SingleChoiceField, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateQuizRequest as CreateQuizRequest$1, CreateQuizResponse as CreateQuizResponse$1, CloneQuizRequest as CloneQuizRequest$1, CloneQuizResponse as CloneQuizResponse$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
4
|
interface Quiz {
|
|
@@ -117,6 +117,20 @@ declare enum FileFormat {
|
|
|
117
117
|
}
|
|
118
118
|
/** @enumType */
|
|
119
119
|
type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
|
|
120
|
+
declare enum FileUploadFormat {
|
|
121
|
+
/** Image files. */
|
|
122
|
+
IMAGE = "IMAGE",
|
|
123
|
+
/** Video files. */
|
|
124
|
+
VIDEO = "VIDEO",
|
|
125
|
+
/** Audio files. */
|
|
126
|
+
AUDIO = "AUDIO",
|
|
127
|
+
/** Document files. */
|
|
128
|
+
DOCUMENT = "DOCUMENT",
|
|
129
|
+
/** Archive files. */
|
|
130
|
+
ARCHIVE = "ARCHIVE"
|
|
131
|
+
}
|
|
132
|
+
/** @enumType */
|
|
133
|
+
type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
|
|
120
134
|
interface NumericField {
|
|
121
135
|
/** Right answer */
|
|
122
136
|
rightAnswer?: number | null;
|
|
@@ -178,11 +192,20 @@ interface FileUploadField {
|
|
|
178
192
|
*/
|
|
179
193
|
itemsLimit?: number | null;
|
|
180
194
|
/**
|
|
181
|
-
*
|
|
182
|
-
* @minSize 1
|
|
195
|
+
* Deprecated. Use `file_upload_formats` instead.
|
|
183
196
|
* @maxSize 5
|
|
197
|
+
* @deprecated Deprecated. Use `file_upload_formats` instead.
|
|
198
|
+
* @replacedBy file_upload_formats
|
|
199
|
+
* @targetRemovalDate 2027-09-03
|
|
184
200
|
*/
|
|
185
201
|
fileFormats?: FileFormatWithLiterals[];
|
|
202
|
+
/**
|
|
203
|
+
* Formats of files that can be uploaded.
|
|
204
|
+
*
|
|
205
|
+
* Specify at least one format in either this field or the deprecated `file_formats` field. If both fields are provided, they must contain the same formats. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. Responses contain both fields for backward compatibility.
|
|
206
|
+
* @maxSize 5
|
|
207
|
+
*/
|
|
208
|
+
fileUploadFormats?: FileUploadFormatWithLiterals[];
|
|
186
209
|
}
|
|
187
210
|
interface CreateQuizRequest {
|
|
188
211
|
/** Quiz to created */
|
|
@@ -203,27 +226,31 @@ interface CloneQuizResponse {
|
|
|
203
226
|
/** Cloned quiz */
|
|
204
227
|
quiz?: Quiz;
|
|
205
228
|
}
|
|
206
|
-
interface
|
|
229
|
+
interface BulkCreateQuizzesRequest {
|
|
207
230
|
/**
|
|
208
|
-
*
|
|
231
|
+
* Quiz definitions to create.
|
|
209
232
|
* @minSize 1
|
|
210
233
|
* @maxSize 30
|
|
211
234
|
*/
|
|
212
235
|
quizzes: Quiz[];
|
|
213
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* Whether to return the created quizzes in the response.
|
|
238
|
+
*
|
|
239
|
+
* Default: `false`
|
|
240
|
+
*/
|
|
214
241
|
returnEntity?: boolean;
|
|
215
242
|
}
|
|
216
|
-
interface
|
|
217
|
-
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
|
|
243
|
+
interface BulkCreateQuizzesResponse {
|
|
244
|
+
/**
|
|
245
|
+
* Results of the bulk create operation.
|
|
246
|
+
* @minSize 1
|
|
247
|
+
* @maxSize 30
|
|
248
|
+
*/
|
|
249
|
+
results?: BulkCreateQuizzesResponseBulkQuizResult[];
|
|
250
|
+
/** Metadata about the bulk create operation. */
|
|
251
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
225
252
|
}
|
|
226
|
-
interface
|
|
253
|
+
interface ItemMetadata {
|
|
227
254
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
228
255
|
id?: string | null;
|
|
229
256
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
@@ -241,6 +268,20 @@ interface ApplicationError {
|
|
|
241
268
|
/** Data related to the error. */
|
|
242
269
|
data?: Record<string, any> | null;
|
|
243
270
|
}
|
|
271
|
+
interface BulkCreateQuizzesResponseBulkQuizResult {
|
|
272
|
+
/** Metadata for the individual create operation. */
|
|
273
|
+
itemMetadata?: ItemMetadata;
|
|
274
|
+
/** Created quiz. Empty when `return_entity` is `false`. */
|
|
275
|
+
item?: Quiz;
|
|
276
|
+
}
|
|
277
|
+
interface BulkActionMetadata {
|
|
278
|
+
/** Number of items that were successfully processed. */
|
|
279
|
+
totalSuccesses?: number;
|
|
280
|
+
/** Number of items that couldn't be processed. */
|
|
281
|
+
totalFailures?: number;
|
|
282
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
283
|
+
undetailedFailures?: number;
|
|
284
|
+
}
|
|
244
285
|
interface BulkCloneQuizzesRequest {
|
|
245
286
|
/**
|
|
246
287
|
* IDs of the quizzes to clone.
|
|
@@ -262,30 +303,12 @@ interface BulkCloneQuizzesResponse {
|
|
|
262
303
|
/** Metadata about the bulk operation. */
|
|
263
304
|
bulkActionMetadata?: BulkActionMetadata;
|
|
264
305
|
}
|
|
265
|
-
interface ItemMetadata {
|
|
266
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
267
|
-
id?: string | null;
|
|
268
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
269
|
-
originalIndex?: number;
|
|
270
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
271
|
-
success?: boolean;
|
|
272
|
-
/** Details about the error in case of failure. */
|
|
273
|
-
error?: ApplicationError;
|
|
274
|
-
}
|
|
275
306
|
interface BulkQuizResult {
|
|
276
307
|
/** Metadata for the cloned quiz. */
|
|
277
308
|
itemMetadata?: ItemMetadata;
|
|
278
309
|
/** Cloned quiz. Empty when `return_entity` is `false`. */
|
|
279
310
|
item?: Quiz;
|
|
280
311
|
}
|
|
281
|
-
interface BulkActionMetadata {
|
|
282
|
-
/** Number of items that were successfully processed. */
|
|
283
|
-
totalSuccesses?: number;
|
|
284
|
-
/** Number of items that couldn't be processed. */
|
|
285
|
-
totalFailures?: number;
|
|
286
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
287
|
-
undetailedFailures?: number;
|
|
288
|
-
}
|
|
289
312
|
interface GetQuizRequest {
|
|
290
313
|
/**
|
|
291
314
|
* ID of the quiz
|
|
@@ -331,33 +354,6 @@ interface BulkDeleteQuizzesResponseBulkQuizResult {
|
|
|
331
354
|
/** Metadata for the individual delete operation. */
|
|
332
355
|
itemMetadata?: ItemMetadata;
|
|
333
356
|
}
|
|
334
|
-
interface BulkDeleteQuizRequest {
|
|
335
|
-
/**
|
|
336
|
-
* IDs of quizzes to delete
|
|
337
|
-
* @minSize 1
|
|
338
|
-
* @maxSize 100
|
|
339
|
-
* @format GUID
|
|
340
|
-
*/
|
|
341
|
-
quizIds: string[];
|
|
342
|
-
}
|
|
343
|
-
interface BulkDeleteQuizResponse {
|
|
344
|
-
/**
|
|
345
|
-
* Results of the bulk delete operation, including deleted quizzes and metadata.
|
|
346
|
-
* @minSize 1
|
|
347
|
-
* @maxSize 100
|
|
348
|
-
*/
|
|
349
|
-
results?: V1BulkQuizResult[];
|
|
350
|
-
/** Metadata about the bulk operation. */
|
|
351
|
-
bulkActionMetadata?: CommonBulkActionMetadata;
|
|
352
|
-
}
|
|
353
|
-
interface CommonBulkActionMetadata {
|
|
354
|
-
/** Number of items that were successfully processed. */
|
|
355
|
-
totalSuccesses?: number;
|
|
356
|
-
/** Number of items that couldn't be processed. */
|
|
357
|
-
totalFailures?: number;
|
|
358
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
359
|
-
undetailedFailures?: number;
|
|
360
|
-
}
|
|
361
357
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
362
358
|
createdEvent?: EntityCreatedEvent;
|
|
363
359
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -570,7 +566,7 @@ declare function createQuiz(): __PublicMethodMetaInfo<'POST', {}, CreateQuizRequ
|
|
|
570
566
|
declare function cloneQuiz(): __PublicMethodMetaInfo<'POST', {
|
|
571
567
|
quizId: string;
|
|
572
568
|
}, CloneQuizRequest$1, CloneQuizRequest, CloneQuizResponse$1, CloneQuizResponse>;
|
|
573
|
-
declare function
|
|
569
|
+
declare function bulkCreateQuizzes(): __PublicMethodMetaInfo<'POST', {}, BulkCreateQuizzesRequest$1, BulkCreateQuizzesRequest, BulkCreateQuizzesResponse$1, BulkCreateQuizzesResponse>;
|
|
574
570
|
declare function getQuiz(): __PublicMethodMetaInfo<'GET', {
|
|
575
571
|
quizId: string;
|
|
576
572
|
}, GetQuizRequest$1, GetQuizRequest, GetQuizResponse$1, GetQuizResponse>;
|
|
@@ -578,6 +574,5 @@ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
|
|
|
578
574
|
quizId: string;
|
|
579
575
|
}, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
|
|
580
576
|
declare function bulkDeleteQuizzes(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizzesRequest$1, BulkDeleteQuizzesRequest, BulkDeleteQuizzesResponse$1, BulkDeleteQuizzesResponse>;
|
|
581
|
-
declare function bulkDeleteQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizRequest$1, BulkDeleteQuizRequest, BulkDeleteQuizResponse$1, BulkDeleteQuizResponse>;
|
|
582
577
|
|
|
583
|
-
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
|
|
578
|
+
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, FileFormat as FileFormatOriginal, type FileFormatWithLiterals as FileFormatWithLiteralsOriginal, 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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Quiz, CloneQuizResponse,
|
|
3
|
-
export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkCloneQuizzesRequest, BulkCloneQuizzesResponse,
|
|
2
|
+
import { Quiz, CloneQuizResponse, BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, DeleteQuizResponse, BulkDeleteQuizzesResponse } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkCloneQuizzesRequest, BulkCloneQuizzesResponse, BulkCreateQuizzesRequest, BulkCreateQuizzesResponseBulkQuizResult, BulkDeleteQuizzesRequest, BulkDeleteQuizzesResponseBulkQuizResult, BulkQuizResult, CloneQuizRequest, CreateQuizRequest, CreateQuizResponse, DeleteQuizRequest, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FileFormat, FileFormatWithLiterals, 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 {
|
|
@@ -19,13 +19,13 @@ interface CloneQuizSignature {
|
|
|
19
19
|
*/
|
|
20
20
|
(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
|
|
21
21
|
}
|
|
22
|
-
declare function
|
|
23
|
-
interface
|
|
22
|
+
declare function bulkCreateQuizzes$1(httpClient: HttpClient): BulkCreateQuizzesSignature;
|
|
23
|
+
interface BulkCreateQuizzesSignature {
|
|
24
24
|
/**
|
|
25
|
-
* Creates
|
|
26
|
-
* @param -
|
|
25
|
+
* Creates up to 30 quiz definitions in a single API call.
|
|
26
|
+
* @param - Quiz definitions to create.
|
|
27
27
|
*/
|
|
28
|
-
(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>[], options?:
|
|
28
|
+
(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>[], 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`, 6>>;
|
|
29
29
|
}
|
|
30
30
|
declare function getQuiz$1(httpClient: HttpClient): GetQuizSignature;
|
|
31
31
|
interface GetQuizSignature {
|
|
@@ -54,22 +54,12 @@ interface BulkDeleteQuizzesSignature {
|
|
|
54
54
|
*/
|
|
55
55
|
(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`, 6>>;
|
|
56
56
|
}
|
|
57
|
-
declare function bulkDeleteQuiz$1(httpClient: HttpClient): BulkDeleteQuizSignature;
|
|
58
|
-
interface BulkDeleteQuizSignature {
|
|
59
|
-
/**
|
|
60
|
-
* Deprecated. Use `BulkDeleteQuizzes`.
|
|
61
|
-
* @param - IDs of quizzes to delete
|
|
62
|
-
* @deprecated
|
|
63
|
-
*/
|
|
64
|
-
(quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizResponse, `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`, 6>>;
|
|
65
|
-
}
|
|
66
57
|
|
|
67
58
|
declare const createQuiz: MaybeContext<BuildRESTFunction<typeof createQuiz$1> & typeof createQuiz$1>;
|
|
68
59
|
declare const cloneQuiz: MaybeContext<BuildRESTFunction<typeof cloneQuiz$1> & typeof cloneQuiz$1>;
|
|
69
|
-
declare const
|
|
60
|
+
declare const bulkCreateQuizzes: MaybeContext<BuildRESTFunction<typeof bulkCreateQuizzes$1> & typeof bulkCreateQuizzes$1>;
|
|
70
61
|
declare const getQuiz: MaybeContext<BuildRESTFunction<typeof getQuiz$1> & typeof getQuiz$1>;
|
|
71
62
|
declare const deleteQuiz: MaybeContext<BuildRESTFunction<typeof deleteQuiz$1> & typeof deleteQuiz$1>;
|
|
72
63
|
declare const bulkDeleteQuizzes: MaybeContext<BuildRESTFunction<typeof bulkDeleteQuizzes$1> & typeof bulkDeleteQuizzes$1>;
|
|
73
|
-
declare const bulkDeleteQuiz: MaybeContext<BuildRESTFunction<typeof bulkDeleteQuiz$1> & typeof bulkDeleteQuiz$1>;
|
|
74
64
|
|
|
75
|
-
export {
|
|
65
|
+
export { BulkCreateQuizzesOptions, BulkCreateQuizzesResponse, BulkDeleteQuizzesResponse, CloneQuizResponse, DeleteQuizResponse, Quiz, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
|