@wix/auto_sdk_online-programs_quizzes 1.0.15 → 1.0.16

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.
@@ -214,15 +214,15 @@ interface BulkCreateQuizRequest {
214
214
  }
215
215
  interface BulkCreateQuizResponse {
216
216
  /** Created quizzes with metadata */
217
- results?: BulkQuizResult[];
217
+ results?: V1BulkQuizResult[];
218
218
  }
219
- interface BulkQuizResult {
220
- /** Created quiz metadata */
221
- itemMetadata?: ItemMetadata;
222
- /** Created quiz */
219
+ interface V1BulkQuizResult {
220
+ /** Metadata for the processed quiz. */
221
+ itemMetadata?: CommonItemMetadata;
222
+ /** Processed quiz. Empty when `return_entity` is `false`. */
223
223
  item?: Quiz;
224
224
  }
225
- interface ItemMetadata {
225
+ interface CommonItemMetadata {
226
226
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
227
227
  _id?: string | null;
228
228
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -240,14 +240,14 @@ interface ApplicationError {
240
240
  /** Data related to the error. */
241
241
  data?: Record<string, any> | null;
242
242
  }
243
- interface BulkCloneQuizRequest {
243
+ interface BulkCloneQuizzesRequest {
244
244
  /**
245
245
  * IDs of the quizzes to clone.
246
246
  * @minSize 1
247
247
  * @maxSize 30
248
248
  * @format GUID
249
249
  */
250
- quizIds: string[];
250
+ quizIds?: string[];
251
251
  /**
252
252
  * Whether to return the cloned quizzes in the response.
253
253
  *
@@ -255,12 +255,28 @@ interface BulkCloneQuizRequest {
255
255
  */
256
256
  returnEntity?: boolean;
257
257
  }
258
- interface BulkCloneQuizResponse {
258
+ interface BulkCloneQuizzesResponse {
259
259
  /** Results of the bulk clone operation, including cloned quizzes and metadata. */
260
260
  results?: BulkQuizResult[];
261
261
  /** Metadata about the bulk operation. */
262
262
  bulkActionMetadata?: BulkActionMetadata;
263
263
  }
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
+ interface BulkQuizResult {
275
+ /** Metadata for the cloned quiz. */
276
+ itemMetadata?: ItemMetadata;
277
+ /** Cloned quiz. Empty when `return_entity` is `false`. */
278
+ item?: Quiz;
279
+ }
264
280
  interface BulkActionMetadata {
265
281
  /** Number of items that were successfully processed. */
266
282
  totalSuccesses?: number;
@@ -269,6 +285,35 @@ interface BulkActionMetadata {
269
285
  /** Number of failures without details because detailed failure threshold was exceeded. */
270
286
  undetailedFailures?: number;
271
287
  }
288
+ interface BulkCloneQuizRequest {
289
+ /**
290
+ * IDs of the quizzes to clone.
291
+ * @minSize 1
292
+ * @maxSize 30
293
+ * @format GUID
294
+ */
295
+ quizIds: string[];
296
+ /**
297
+ * Whether to return the cloned quizzes in the response.
298
+ *
299
+ * Default: `false`
300
+ */
301
+ returnEntity?: boolean;
302
+ }
303
+ interface BulkCloneQuizResponse {
304
+ /** Results of the bulk clone operation, including cloned quizzes and metadata. */
305
+ results?: V1BulkQuizResult[];
306
+ /** Metadata about the bulk operation. */
307
+ bulkActionMetadata?: CommonBulkActionMetadata;
308
+ }
309
+ interface CommonBulkActionMetadata {
310
+ /** Number of items that were successfully processed. */
311
+ totalSuccesses?: number;
312
+ /** Number of items that couldn't be processed. */
313
+ totalFailures?: number;
314
+ /** Number of failures without details because detailed failure threshold was exceeded. */
315
+ undetailedFailures?: number;
316
+ }
272
317
  interface GetQuizRequest {
273
318
  /**
274
319
  * ID of the quiz
@@ -319,9 +364,9 @@ interface BulkDeleteQuizResponse {
319
364
  * @minSize 1
320
365
  * @maxSize 100
321
366
  */
322
- results?: BulkQuizResult[];
367
+ results?: V1BulkQuizResult[];
323
368
  /** Metadata about the bulk operation. */
324
- bulkActionMetadata?: BulkActionMetadata;
369
+ bulkActionMetadata?: CommonBulkActionMetadata;
325
370
  }
326
371
  interface DomainEvent extends DomainEventBodyOneOf {
327
372
  createdEvent?: EntityCreatedEvent;
@@ -526,7 +571,7 @@ interface BulkCreateQuizOptions {
526
571
  returnEntity?: boolean;
527
572
  }
528
573
  /**
529
- * Clones quizzes
574
+ * Clones quizzes.
530
575
  * @param quizIds - IDs of the quizzes to clone.
531
576
  * @public
532
577
  * @documentationMaturity preview
@@ -577,4 +622,4 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
577
622
  */
578
623
  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>>;
579
624
 
580
- export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizOptions, type BulkCloneQuizRequest, type BulkCloneQuizResponse, type BulkCreateQuizOptions, type BulkCreateQuizRequest, type BulkCreateQuizResponse, type BulkDeleteQuizRequest, type BulkDeleteQuizResponse, 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, 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, type UpdateQuizRequest, type UpdateQuizResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
625
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizOptions, type BulkCloneQuizRequest, type BulkCloneQuizResponse, type BulkCloneQuizzesRequest, type BulkCloneQuizzesResponse, type BulkCreateQuizOptions, type BulkCreateQuizRequest, type BulkCreateQuizResponse, type BulkDeleteQuizRequest, type BulkDeleteQuizResponse, type BulkQuizResult, type CloneQuizRequest, type CloneQuizResponse, type CommonBulkActionMetadata, type CommonItemMetadata, type CreateQuizRequest, type CreateQuizResponse, type DeleteQuizRequest, type DeleteQuizResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, FileFormat, type FileFormatWithLiterals, type FileUploadField, 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, type UpdateQuizRequest, type UpdateQuizResponse, type V1BulkQuizResult, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
@@ -215,15 +215,15 @@ interface BulkCreateQuizRequest {
215
215
  }
216
216
  interface BulkCreateQuizResponse {
217
217
  /** Created quizzes with metadata */
218
- results?: BulkQuizResult[];
218
+ results?: V1BulkQuizResult[];
219
219
  }
220
- interface BulkQuizResult {
221
- /** Created quiz metadata */
222
- itemMetadata?: ItemMetadata;
223
- /** Created quiz */
220
+ interface V1BulkQuizResult {
221
+ /** Metadata for the processed quiz. */
222
+ itemMetadata?: CommonItemMetadata;
223
+ /** Processed quiz. Empty when `return_entity` is `false`. */
224
224
  item?: Quiz;
225
225
  }
226
- interface ItemMetadata {
226
+ interface CommonItemMetadata {
227
227
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
228
228
  id?: string | null;
229
229
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -241,14 +241,14 @@ interface ApplicationError {
241
241
  /** Data related to the error. */
242
242
  data?: Record<string, any> | null;
243
243
  }
244
- interface BulkCloneQuizRequest {
244
+ interface BulkCloneQuizzesRequest {
245
245
  /**
246
246
  * IDs of the quizzes to clone.
247
247
  * @minSize 1
248
248
  * @maxSize 30
249
249
  * @format GUID
250
250
  */
251
- quizIds: string[];
251
+ quizIds?: string[];
252
252
  /**
253
253
  * Whether to return the cloned quizzes in the response.
254
254
  *
@@ -256,12 +256,28 @@ interface BulkCloneQuizRequest {
256
256
  */
257
257
  returnEntity?: boolean;
258
258
  }
259
- interface BulkCloneQuizResponse {
259
+ interface BulkCloneQuizzesResponse {
260
260
  /** Results of the bulk clone operation, including cloned quizzes and metadata. */
261
261
  results?: BulkQuizResult[];
262
262
  /** Metadata about the bulk operation. */
263
263
  bulkActionMetadata?: BulkActionMetadata;
264
264
  }
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
+ interface BulkQuizResult {
276
+ /** Metadata for the cloned quiz. */
277
+ itemMetadata?: ItemMetadata;
278
+ /** Cloned quiz. Empty when `return_entity` is `false`. */
279
+ item?: Quiz;
280
+ }
265
281
  interface BulkActionMetadata {
266
282
  /** Number of items that were successfully processed. */
267
283
  totalSuccesses?: number;
@@ -270,6 +286,35 @@ interface BulkActionMetadata {
270
286
  /** Number of failures without details because detailed failure threshold was exceeded. */
271
287
  undetailedFailures?: number;
272
288
  }
289
+ interface BulkCloneQuizRequest {
290
+ /**
291
+ * IDs of the quizzes to clone.
292
+ * @minSize 1
293
+ * @maxSize 30
294
+ * @format GUID
295
+ */
296
+ quizIds: string[];
297
+ /**
298
+ * Whether to return the cloned quizzes in the response.
299
+ *
300
+ * Default: `false`
301
+ */
302
+ returnEntity?: boolean;
303
+ }
304
+ interface BulkCloneQuizResponse {
305
+ /** Results of the bulk clone operation, including cloned quizzes and metadata. */
306
+ results?: V1BulkQuizResult[];
307
+ /** Metadata about the bulk operation. */
308
+ bulkActionMetadata?: CommonBulkActionMetadata;
309
+ }
310
+ interface CommonBulkActionMetadata {
311
+ /** Number of items that were successfully processed. */
312
+ totalSuccesses?: number;
313
+ /** Number of items that couldn't be processed. */
314
+ totalFailures?: number;
315
+ /** Number of failures without details because detailed failure threshold was exceeded. */
316
+ undetailedFailures?: number;
317
+ }
273
318
  interface GetQuizRequest {
274
319
  /**
275
320
  * ID of the quiz
@@ -320,9 +365,9 @@ interface BulkDeleteQuizResponse {
320
365
  * @minSize 1
321
366
  * @maxSize 100
322
367
  */
323
- results?: BulkQuizResult[];
368
+ results?: V1BulkQuizResult[];
324
369
  /** Metadata about the bulk operation. */
325
- bulkActionMetadata?: BulkActionMetadata;
370
+ bulkActionMetadata?: CommonBulkActionMetadata;
326
371
  }
327
372
  interface DomainEvent extends DomainEventBodyOneOf {
328
373
  createdEvent?: EntityCreatedEvent;
@@ -546,4 +591,4 @@ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
546
591
  }, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
547
592
  declare function bulkDeleteQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizRequest$1, BulkDeleteQuizRequest, BulkDeleteQuizResponse$1, BulkDeleteQuizResponse>;
548
593
 
549
- export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizRequest as BulkCloneQuizRequestOriginal, type BulkCloneQuizResponse as BulkCloneQuizResponseOriginal, type BulkCreateQuizRequest as BulkCreateQuizRequestOriginal, type BulkCreateQuizResponse as BulkCreateQuizResponseOriginal, type BulkDeleteQuizRequest as BulkDeleteQuizRequestOriginal, type BulkDeleteQuizResponse as BulkDeleteQuizResponseOriginal, 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, 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, type UpdateQuizRequest as UpdateQuizRequestOriginal, type UpdateQuizResponse as UpdateQuizResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
594
+ export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizRequest as BulkCloneQuizRequestOriginal, type BulkCloneQuizResponse as BulkCloneQuizResponseOriginal, type BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal, type BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal, type BulkCreateQuizRequest as BulkCreateQuizRequestOriginal, type BulkCreateQuizResponse as BulkCreateQuizResponseOriginal, type BulkDeleteQuizRequest as BulkDeleteQuizRequestOriginal, type BulkDeleteQuizResponse as BulkDeleteQuizResponseOriginal, type BulkQuizResult as BulkQuizResultOriginal, type CloneQuizRequest as CloneQuizRequestOriginal, type CloneQuizResponse as CloneQuizResponseOriginal, type CommonBulkActionMetadata as CommonBulkActionMetadataOriginal, type CommonItemMetadata as CommonItemMetadataOriginal, 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, 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, type UpdateQuizRequest as UpdateQuizRequestOriginal, type UpdateQuizResponse as UpdateQuizResponseOriginal, type V1BulkQuizResult as V1BulkQuizResultOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { Quiz, CloneQuizResponse, BulkCreateQuizOptions, BulkCreateQuizResponse, BulkCloneQuizOptions, BulkCloneQuizResponse, DeleteQuizResponse, BulkDeleteQuizResponse } from './index.typings.mjs';
3
- export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkCloneQuizRequest, BulkCreateQuizRequest, BulkDeleteQuizRequest, BulkQuizResult, CloneQuizRequest, CreateQuizRequest, CreateQuizResponse, DeleteQuizRequest, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FileFormat, FileFormatWithLiterals, FileUploadField, GetQuizRequest, GetQuizResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, LongTextField, MessageEnvelope, MultiChoiceField, NumericField, QuizField, QuizFieldFieldTypeOneOf, QuizSettings, RestoreInfo, ShortTextField, SingleChoiceField, UpdateQuizRequest, UpdateQuizResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkCloneQuizRequest, BulkCloneQuizzesRequest, BulkCloneQuizzesResponse, BulkCreateQuizRequest, BulkDeleteQuizRequest, BulkQuizResult, CloneQuizRequest, CommonBulkActionMetadata, CommonItemMetadata, CreateQuizRequest, CreateQuizResponse, DeleteQuizRequest, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FileFormat, FileFormatWithLiterals, FileUploadField, GetQuizRequest, GetQuizResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, LongTextField, MessageEnvelope, MultiChoiceField, NumericField, QuizField, QuizFieldFieldTypeOneOf, QuizSettings, RestoreInfo, ShortTextField, SingleChoiceField, UpdateQuizRequest, UpdateQuizResponse, V1BulkQuizResult, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function createQuiz$1(httpClient: HttpClient): CreateQuizSignature;
6
6
  interface CreateQuizSignature {
@@ -30,7 +30,7 @@ interface BulkCreateQuizSignature {
30
30
  declare function bulkCloneQuiz$1(httpClient: HttpClient): BulkCloneQuizSignature;
31
31
  interface BulkCloneQuizSignature {
32
32
  /**
33
- * Clones quizzes
33
+ * Clones quizzes.
34
34
  * @param - IDs of the quizzes to clone.
35
35
  */
36
36
  (quizIds: string[], options?: BulkCloneQuizOptions): Promise<NonNullablePaths<BulkCloneQuizResponse, `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>>;
@@ -214,15 +214,15 @@ interface BulkCreateQuizRequest {
214
214
  }
215
215
  interface BulkCreateQuizResponse {
216
216
  /** Created quizzes with metadata */
217
- results?: BulkQuizResult[];
217
+ results?: V1BulkQuizResult[];
218
218
  }
219
- interface BulkQuizResult {
220
- /** Created quiz metadata */
221
- itemMetadata?: ItemMetadata;
222
- /** Created quiz */
219
+ interface V1BulkQuizResult {
220
+ /** Metadata for the processed quiz. */
221
+ itemMetadata?: CommonItemMetadata;
222
+ /** Processed quiz. Empty when `return_entity` is `false`. */
223
223
  item?: Quiz;
224
224
  }
225
- interface ItemMetadata {
225
+ interface CommonItemMetadata {
226
226
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
227
227
  _id?: string | null;
228
228
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -240,14 +240,14 @@ interface ApplicationError {
240
240
  /** Data related to the error. */
241
241
  data?: Record<string, any> | null;
242
242
  }
243
- interface BulkCloneQuizRequest {
243
+ interface BulkCloneQuizzesRequest {
244
244
  /**
245
245
  * IDs of the quizzes to clone.
246
246
  * @minSize 1
247
247
  * @maxSize 30
248
248
  * @format GUID
249
249
  */
250
- quizIds: string[];
250
+ quizIds?: string[];
251
251
  /**
252
252
  * Whether to return the cloned quizzes in the response.
253
253
  *
@@ -255,12 +255,28 @@ interface BulkCloneQuizRequest {
255
255
  */
256
256
  returnEntity?: boolean;
257
257
  }
258
- interface BulkCloneQuizResponse {
258
+ interface BulkCloneQuizzesResponse {
259
259
  /** Results of the bulk clone operation, including cloned quizzes and metadata. */
260
260
  results?: BulkQuizResult[];
261
261
  /** Metadata about the bulk operation. */
262
262
  bulkActionMetadata?: BulkActionMetadata;
263
263
  }
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
+ interface BulkQuizResult {
275
+ /** Metadata for the cloned quiz. */
276
+ itemMetadata?: ItemMetadata;
277
+ /** Cloned quiz. Empty when `return_entity` is `false`. */
278
+ item?: Quiz;
279
+ }
264
280
  interface BulkActionMetadata {
265
281
  /** Number of items that were successfully processed. */
266
282
  totalSuccesses?: number;
@@ -269,6 +285,35 @@ interface BulkActionMetadata {
269
285
  /** Number of failures without details because detailed failure threshold was exceeded. */
270
286
  undetailedFailures?: number;
271
287
  }
288
+ interface BulkCloneQuizRequest {
289
+ /**
290
+ * IDs of the quizzes to clone.
291
+ * @minSize 1
292
+ * @maxSize 30
293
+ * @format GUID
294
+ */
295
+ quizIds: string[];
296
+ /**
297
+ * Whether to return the cloned quizzes in the response.
298
+ *
299
+ * Default: `false`
300
+ */
301
+ returnEntity?: boolean;
302
+ }
303
+ interface BulkCloneQuizResponse {
304
+ /** Results of the bulk clone operation, including cloned quizzes and metadata. */
305
+ results?: V1BulkQuizResult[];
306
+ /** Metadata about the bulk operation. */
307
+ bulkActionMetadata?: CommonBulkActionMetadata;
308
+ }
309
+ interface CommonBulkActionMetadata {
310
+ /** Number of items that were successfully processed. */
311
+ totalSuccesses?: number;
312
+ /** Number of items that couldn't be processed. */
313
+ totalFailures?: number;
314
+ /** Number of failures without details because detailed failure threshold was exceeded. */
315
+ undetailedFailures?: number;
316
+ }
272
317
  interface GetQuizRequest {
273
318
  /**
274
319
  * ID of the quiz
@@ -319,9 +364,9 @@ interface BulkDeleteQuizResponse {
319
364
  * @minSize 1
320
365
  * @maxSize 100
321
366
  */
322
- results?: BulkQuizResult[];
367
+ results?: V1BulkQuizResult[];
323
368
  /** Metadata about the bulk operation. */
324
- bulkActionMetadata?: BulkActionMetadata;
369
+ bulkActionMetadata?: CommonBulkActionMetadata;
325
370
  }
326
371
  interface DomainEvent extends DomainEventBodyOneOf {
327
372
  createdEvent?: EntityCreatedEvent;
@@ -526,7 +571,7 @@ interface BulkCreateQuizOptions {
526
571
  returnEntity?: boolean;
527
572
  }
528
573
  /**
529
- * Clones quizzes
574
+ * Clones quizzes.
530
575
  * @param quizIds - IDs of the quizzes to clone.
531
576
  * @public
532
577
  * @documentationMaturity preview
@@ -577,4 +622,4 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
577
622
  */
578
623
  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>>;
579
624
 
580
- export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizOptions, type BulkCloneQuizRequest, type BulkCloneQuizResponse, type BulkCreateQuizOptions, type BulkCreateQuizRequest, type BulkCreateQuizResponse, type BulkDeleteQuizRequest, type BulkDeleteQuizResponse, 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, 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, type UpdateQuizRequest, type UpdateQuizResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
625
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizOptions, type BulkCloneQuizRequest, type BulkCloneQuizResponse, type BulkCloneQuizzesRequest, type BulkCloneQuizzesResponse, type BulkCreateQuizOptions, type BulkCreateQuizRequest, type BulkCreateQuizResponse, type BulkDeleteQuizRequest, type BulkDeleteQuizResponse, type BulkQuizResult, type CloneQuizRequest, type CloneQuizResponse, type CommonBulkActionMetadata, type CommonItemMetadata, type CreateQuizRequest, type CreateQuizResponse, type DeleteQuizRequest, type DeleteQuizResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, FileFormat, type FileFormatWithLiterals, type FileUploadField, 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, type UpdateQuizRequest, type UpdateQuizResponse, type V1BulkQuizResult, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
@@ -215,15 +215,15 @@ interface BulkCreateQuizRequest {
215
215
  }
216
216
  interface BulkCreateQuizResponse {
217
217
  /** Created quizzes with metadata */
218
- results?: BulkQuizResult[];
218
+ results?: V1BulkQuizResult[];
219
219
  }
220
- interface BulkQuizResult {
221
- /** Created quiz metadata */
222
- itemMetadata?: ItemMetadata;
223
- /** Created quiz */
220
+ interface V1BulkQuizResult {
221
+ /** Metadata for the processed quiz. */
222
+ itemMetadata?: CommonItemMetadata;
223
+ /** Processed quiz. Empty when `return_entity` is `false`. */
224
224
  item?: Quiz;
225
225
  }
226
- interface ItemMetadata {
226
+ interface CommonItemMetadata {
227
227
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
228
228
  id?: string | null;
229
229
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -241,14 +241,14 @@ interface ApplicationError {
241
241
  /** Data related to the error. */
242
242
  data?: Record<string, any> | null;
243
243
  }
244
- interface BulkCloneQuizRequest {
244
+ interface BulkCloneQuizzesRequest {
245
245
  /**
246
246
  * IDs of the quizzes to clone.
247
247
  * @minSize 1
248
248
  * @maxSize 30
249
249
  * @format GUID
250
250
  */
251
- quizIds: string[];
251
+ quizIds?: string[];
252
252
  /**
253
253
  * Whether to return the cloned quizzes in the response.
254
254
  *
@@ -256,12 +256,28 @@ interface BulkCloneQuizRequest {
256
256
  */
257
257
  returnEntity?: boolean;
258
258
  }
259
- interface BulkCloneQuizResponse {
259
+ interface BulkCloneQuizzesResponse {
260
260
  /** Results of the bulk clone operation, including cloned quizzes and metadata. */
261
261
  results?: BulkQuizResult[];
262
262
  /** Metadata about the bulk operation. */
263
263
  bulkActionMetadata?: BulkActionMetadata;
264
264
  }
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
+ interface BulkQuizResult {
276
+ /** Metadata for the cloned quiz. */
277
+ itemMetadata?: ItemMetadata;
278
+ /** Cloned quiz. Empty when `return_entity` is `false`. */
279
+ item?: Quiz;
280
+ }
265
281
  interface BulkActionMetadata {
266
282
  /** Number of items that were successfully processed. */
267
283
  totalSuccesses?: number;
@@ -270,6 +286,35 @@ interface BulkActionMetadata {
270
286
  /** Number of failures without details because detailed failure threshold was exceeded. */
271
287
  undetailedFailures?: number;
272
288
  }
289
+ interface BulkCloneQuizRequest {
290
+ /**
291
+ * IDs of the quizzes to clone.
292
+ * @minSize 1
293
+ * @maxSize 30
294
+ * @format GUID
295
+ */
296
+ quizIds: string[];
297
+ /**
298
+ * Whether to return the cloned quizzes in the response.
299
+ *
300
+ * Default: `false`
301
+ */
302
+ returnEntity?: boolean;
303
+ }
304
+ interface BulkCloneQuizResponse {
305
+ /** Results of the bulk clone operation, including cloned quizzes and metadata. */
306
+ results?: V1BulkQuizResult[];
307
+ /** Metadata about the bulk operation. */
308
+ bulkActionMetadata?: CommonBulkActionMetadata;
309
+ }
310
+ interface CommonBulkActionMetadata {
311
+ /** Number of items that were successfully processed. */
312
+ totalSuccesses?: number;
313
+ /** Number of items that couldn't be processed. */
314
+ totalFailures?: number;
315
+ /** Number of failures without details because detailed failure threshold was exceeded. */
316
+ undetailedFailures?: number;
317
+ }
273
318
  interface GetQuizRequest {
274
319
  /**
275
320
  * ID of the quiz
@@ -320,9 +365,9 @@ interface BulkDeleteQuizResponse {
320
365
  * @minSize 1
321
366
  * @maxSize 100
322
367
  */
323
- results?: BulkQuizResult[];
368
+ results?: V1BulkQuizResult[];
324
369
  /** Metadata about the bulk operation. */
325
- bulkActionMetadata?: BulkActionMetadata;
370
+ bulkActionMetadata?: CommonBulkActionMetadata;
326
371
  }
327
372
  interface DomainEvent extends DomainEventBodyOneOf {
328
373
  createdEvent?: EntityCreatedEvent;
@@ -546,4 +591,4 @@ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
546
591
  }, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
547
592
  declare function bulkDeleteQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizRequest$1, BulkDeleteQuizRequest, BulkDeleteQuizResponse$1, BulkDeleteQuizResponse>;
548
593
 
549
- export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizRequest as BulkCloneQuizRequestOriginal, type BulkCloneQuizResponse as BulkCloneQuizResponseOriginal, type BulkCreateQuizRequest as BulkCreateQuizRequestOriginal, type BulkCreateQuizResponse as BulkCreateQuizResponseOriginal, type BulkDeleteQuizRequest as BulkDeleteQuizRequestOriginal, type BulkDeleteQuizResponse as BulkDeleteQuizResponseOriginal, 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, 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, type UpdateQuizRequest as UpdateQuizRequestOriginal, type UpdateQuizResponse as UpdateQuizResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
594
+ export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCloneQuizRequest as BulkCloneQuizRequestOriginal, type BulkCloneQuizResponse as BulkCloneQuizResponseOriginal, type BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal, type BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal, type BulkCreateQuizRequest as BulkCreateQuizRequestOriginal, type BulkCreateQuizResponse as BulkCreateQuizResponseOriginal, type BulkDeleteQuizRequest as BulkDeleteQuizRequestOriginal, type BulkDeleteQuizResponse as BulkDeleteQuizResponseOriginal, type BulkQuizResult as BulkQuizResultOriginal, type CloneQuizRequest as CloneQuizRequestOriginal, type CloneQuizResponse as CloneQuizResponseOriginal, type CommonBulkActionMetadata as CommonBulkActionMetadataOriginal, type CommonItemMetadata as CommonItemMetadataOriginal, 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, 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, type UpdateQuizRequest as UpdateQuizRequestOriginal, type UpdateQuizResponse as UpdateQuizResponseOriginal, type V1BulkQuizResult as V1BulkQuizResultOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCloneQuiz, bulkCreateQuiz, bulkDeleteQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_online-programs_quizzes",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
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": "b2011a556900a92427ce2bf4e33e75abfaf30c38dc4ff60065a45cf4"
53
+ "falconPackageHash": "bde2268fb5e0386dcfbbcd37cbd140f395582d88b4007080f809d2c4"
54
54
  }