@wix/auto_sdk_online-programs_quizzes 1.0.15 → 1.0.17

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;
@@ -280,19 +296,6 @@ interface GetQuizResponse {
280
296
  /** Requested quiz */
281
297
  quiz?: Quiz;
282
298
  }
283
- interface UpdateQuizRequest {
284
- /** Quiz to be updated. Maybe partial */
285
- quiz?: Quiz;
286
- /**
287
- * Explicit list of fields to update
288
- * @internal
289
- */
290
- mask?: string[];
291
- }
292
- interface UpdateQuizResponse {
293
- /** Updated quiz */
294
- quiz?: Quiz;
295
- }
296
299
  interface DeleteQuizRequest {
297
300
  /**
298
301
  * ID of quiz
@@ -319,9 +322,17 @@ interface BulkDeleteQuizResponse {
319
322
  * @minSize 1
320
323
  * @maxSize 100
321
324
  */
322
- results?: BulkQuizResult[];
325
+ results?: V1BulkQuizResult[];
323
326
  /** Metadata about the bulk operation. */
324
- bulkActionMetadata?: BulkActionMetadata;
327
+ bulkActionMetadata?: CommonBulkActionMetadata;
328
+ }
329
+ interface CommonBulkActionMetadata {
330
+ /** Number of items that were successfully processed. */
331
+ totalSuccesses?: number;
332
+ /** Number of items that couldn't be processed. */
333
+ totalFailures?: number;
334
+ /** Number of failures without details because detailed failure threshold was exceeded. */
335
+ undetailedFailures?: number;
325
336
  }
326
337
  interface DomainEvent extends DomainEventBodyOneOf {
327
338
  createdEvent?: EntityCreatedEvent;
@@ -525,25 +536,6 @@ interface BulkCreateQuizOptions {
525
536
  /** When set, items will be returned on successful create */
526
537
  returnEntity?: boolean;
527
538
  }
528
- /**
529
- * Clones quizzes
530
- * @param quizIds - IDs of the quizzes to clone.
531
- * @public
532
- * @documentationMaturity preview
533
- * @requiredField quizIds
534
- * @permissionId QUIZZES.CREATE_QUIZ
535
- * @applicableIdentity APP
536
- * @fqn wix.achievements.quizzes.v1.QuizService.BulkCloneQuiz
537
- */
538
- declare function bulkCloneQuiz(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>>;
539
- interface BulkCloneQuizOptions {
540
- /**
541
- * Whether to return the cloned quizzes in the response.
542
- *
543
- * Default: `false`
544
- */
545
- returnEntity?: boolean;
546
- }
547
539
  /**
548
540
  * Reads quiz by ID
549
541
  * @param quizId - ID of the quiz
@@ -577,4 +569,4 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
577
569
  */
578
570
  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
571
 
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 };
572
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, 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 V1BulkQuizResult, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateQuiz, bulkDeleteQuiz, 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, BulkCreateQuizRequest as BulkCreateQuizRequest$1, BulkCreateQuizResponse as BulkCreateQuizResponse$1, BulkCloneQuizRequest as BulkCloneQuizRequest$1, BulkCloneQuizResponse as BulkCloneQuizResponse$1, GetQuizRequest as GetQuizRequest$1, GetQuizResponse as GetQuizResponse$1, DeleteQuizRequest as DeleteQuizRequest$1, DeleteQuizResponse as DeleteQuizResponse$1, BulkDeleteQuizRequest as BulkDeleteQuizRequest$1, BulkDeleteQuizResponse as BulkDeleteQuizResponse$1 } from './index.typings.mjs';
1
+ import { CreateQuizRequest as CreateQuizRequest$1, CreateQuizResponse as CreateQuizResponse$1, CloneQuizRequest as CloneQuizRequest$1, CloneQuizResponse as CloneQuizResponse$1, BulkCreateQuizRequest as BulkCreateQuizRequest$1, BulkCreateQuizResponse as BulkCreateQuizResponse$1, GetQuizRequest as GetQuizRequest$1, GetQuizResponse as GetQuizResponse$1, DeleteQuizRequest as DeleteQuizRequest$1, DeleteQuizResponse as DeleteQuizResponse$1, BulkDeleteQuizRequest as BulkDeleteQuizRequest$1, BulkDeleteQuizResponse as BulkDeleteQuizResponse$1 } from './index.typings.mjs';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  interface Quiz {
@@ -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;
@@ -281,19 +297,6 @@ interface GetQuizResponse {
281
297
  /** Requested quiz */
282
298
  quiz?: Quiz;
283
299
  }
284
- interface UpdateQuizRequest {
285
- /** Quiz to be updated. Maybe partial */
286
- quiz?: Quiz;
287
- /**
288
- * Explicit list of fields to update
289
- * @internal
290
- */
291
- mask?: string[];
292
- }
293
- interface UpdateQuizResponse {
294
- /** Updated quiz */
295
- quiz?: Quiz;
296
- }
297
300
  interface DeleteQuizRequest {
298
301
  /**
299
302
  * ID of quiz
@@ -320,9 +323,17 @@ interface BulkDeleteQuizResponse {
320
323
  * @minSize 1
321
324
  * @maxSize 100
322
325
  */
323
- results?: BulkQuizResult[];
326
+ results?: V1BulkQuizResult[];
324
327
  /** Metadata about the bulk operation. */
325
- bulkActionMetadata?: BulkActionMetadata;
328
+ bulkActionMetadata?: CommonBulkActionMetadata;
329
+ }
330
+ interface CommonBulkActionMetadata {
331
+ /** Number of items that were successfully processed. */
332
+ totalSuccesses?: number;
333
+ /** Number of items that couldn't be processed. */
334
+ totalFailures?: number;
335
+ /** Number of failures without details because detailed failure threshold was exceeded. */
336
+ undetailedFailures?: number;
326
337
  }
327
338
  interface DomainEvent extends DomainEventBodyOneOf {
328
339
  createdEvent?: EntityCreatedEvent;
@@ -537,7 +548,6 @@ declare function cloneQuiz(): __PublicMethodMetaInfo<'POST', {
537
548
  quizId: string;
538
549
  }, CloneQuizRequest$1, CloneQuizRequest, CloneQuizResponse$1, CloneQuizResponse>;
539
550
  declare function bulkCreateQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkCreateQuizRequest$1, BulkCreateQuizRequest, BulkCreateQuizResponse$1, BulkCreateQuizResponse>;
540
- declare function bulkCloneQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkCloneQuizRequest$1, BulkCloneQuizRequest, BulkCloneQuizResponse$1, BulkCloneQuizResponse>;
541
551
  declare function getQuiz(): __PublicMethodMetaInfo<'GET', {
542
552
  quizId: string;
543
553
  }, GetQuizRequest$1, GetQuizRequest, GetQuizResponse$1, GetQuizResponse>;
@@ -546,4 +556,4 @@ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
546
556
  }, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
547
557
  declare function bulkDeleteQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizRequest$1, BulkDeleteQuizRequest, BulkDeleteQuizResponse$1, BulkDeleteQuizResponse>;
548
558
 
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 };
559
+ 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 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 V1BulkQuizResult as V1BulkQuizResultOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, 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.17",
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": "201938b3e521a15223cc7beb78cc59eb8db28ee0748616af5321e4c2"
54
54
  }