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'; import '@wix/sdk-types'; /** * A quiz definition used by an Online Programs quiz step. * * Create or clone a quiz, then assign the returned quiz ID to `step.quizOptions.id` when creating an Online Programs step. Quiz IDs are intentionally discovered through quiz-type steps rather than through a Quiz list or query method. * * New submissions are evaluated against the quiz definition that exists when the submission is created. Previously stored submissions retain their recorded grades and answer evaluations if the definition changes later. */ interface Quiz { /** * Quiz ID. * @format GUID * @readonly */ id?: string | null; /** Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data. */ settings?: QuizSettings; /** * Current revision of the stored quiz definition. The revision changes when the definition changes. The public Quiz API doesn't currently provide an update method. * @readonly */ revision?: string | null; /** * Date and time the quiz was created. * @readonly */ createdDate?: Date | null; /** * Date and time the quiz was last updated. * @readonly */ updatedDate?: Date | null; /** * Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it. * * New submissions use the current questions; stored submissions retain their recorded answer evaluations. * @minSize 1 * @maxSize 200 */ fields?: QuizField[]; } interface QuizSettings { /** * Minimum unweighted integer percentage required to pass. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect. * @max 100 */ passingGrade?: number | null; /** * Quiz title. * @maxLength 200 */ title?: string | null; /** * Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. Submissions grouped together share an attempt count, even across quizzes. See [Attempt limits](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/quiz-grading#attempt-limits) for how submissions are counted. * @min 1 */ attempts?: number | null; } /** Defines one quiz question and its answer input. */ interface QuizField extends QuizFieldFieldTypeOneOf { /** Numeric input. */ numeric?: NumericField; /** Short-text input. */ shortText?: ShortTextField; /** Long-text input. Set this to an empty object (`{}`) to select it. */ longText?: LongTextField; /** Input with predefined options where only one option can be selected. */ singleChoice?: SingleChoiceField; /** Input with predefined options where multiple options can be selected. */ multiChoice?: MultiChoiceField; /** File-upload input. */ fileUpload?: FileUploadField; /** * Caller-generated GUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this ID to identify the question. * @format GUID * @immutable */ id?: string; /** * Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question. * @maxLength 200 * @immutable */ target?: string | null; /** * Question text. * @minLength 1 * @maxLength 350 */ question?: string | null; /** Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage. */ score?: number | null; /** * Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers. * @maxLength 350 */ rightMessage?: string | null; /** * Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers. * @maxLength 350 */ wrongMessage?: string | null; } /** @oneof */ interface QuizFieldFieldTypeOneOf { /** Numeric input. */ numeric?: NumericField; /** Short-text input. */ shortText?: ShortTextField; /** Long-text input. Set this to an empty object (`{}`) to select it. */ longText?: LongTextField; /** Input with predefined options where only one option can be selected. */ singleChoice?: SingleChoiceField; /** Input with predefined options where multiple options can be selected. */ multiChoice?: MultiChoiceField; /** File-upload input. */ fileUpload?: FileUploadField; } /** File categories used by Wix Forms. Categories don't define a custom extension or MIME-type allowlist; accepted file types are controlled by Wix Forms. See [About form fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields). */ declare enum FileUploadFormat { /** Image-file category. */ IMAGE = "IMAGE", /** Video-file category. */ VIDEO = "VIDEO", /** Audio-file category. */ AUDIO = "AUDIO", /** Document-file category. */ DOCUMENT = "DOCUMENT", /** Archive-file category. */ ARCHIVE = "ARCHIVE", /** 3D-model-file category. */ MODEL_3D = "MODEL_3D" } /** @enumType */ type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D'; interface NumericField { /** * Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade. * * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored. */ rightAnswer?: number | null; } interface ShortTextField { /** * Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade. * * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored. * @minLength 1 * @maxLength 200 */ rightAnswer?: string | null; } /** Long-text input settings. Set `longText` to an empty object (`{}`) to select this input. Long-text answers aren't evaluated and count as correct when calculating the earned grade. */ interface LongTextField { } interface SingleChoiceField { /** * Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade. * * Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored. * @minLength 1 * @maxLength 350 */ rightAnswer?: string | null; /** * Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation. * @minSize 1 * @maxSize 90 * @minLength 1 * @maxLength 350 */ options?: string[] | null; } /** Multiple-choice input settings. Existing Wix Forms image-choice questions are also returned in this shape, even when their original settings allow only one selection. Image-choice-specific settings aren't exposed by the Quiz API. */ interface MultiChoiceField { /** * Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade. * * Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored. * @maxSize 90 * @minLength 1 * @maxLength 350 */ rightAnswer?: string[] | null; /** * Options available to the participant. * @minSize 1 * @maxSize 90 * @minLength 1 * @maxLength 350 */ options?: string[] | null; } interface FileUploadField { /** * Text displayed on the upload button. * * Default: `Upload`. * @minLength 1 * @maxLength 100 */ buttonText?: string | null; /** * Maximum number of files a participant can upload for this question. * * Default: `10`. * @min 1 * @max 10 */ itemsLimit?: number | null; /** * Wix Forms file categories that participants can upload. * * Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade. * @maxSize 6 */ fileUploadFormats?: FileUploadFormatWithLiterals[]; } interface CreateQuizRequest { /** Quiz definition to create. Generate a stable unique GUID for every `quiz.fields.id` value. */ quiz: Quiz; } interface CreateQuizResponse { /** Created quiz definition. Assign its `id` to `step.quizOptions.id` to create an Online Programs quiz step. */ quiz?: Quiz; } interface CloneQuizRequest { /** * ID of the quiz definition to clone. * @format GUID */ quizId: string; } interface CloneQuizResponse { /** Cloned quiz definition with a new ID. Step associations and submissions aren't cloned. */ quiz?: Quiz; } interface BulkCreateQuizzesRequest { /** * Quiz definitions to create. * @minSize 1 * @maxSize 30 */ quizzes: Quiz[]; /** * Whether to return the created quizzes in the response. * * Default: `false` */ returnEntity?: boolean; } interface BulkCreateQuizzesResponse { /** * Results of the bulk create operation. * @minSize 1 * @maxSize 30 */ results?: BulkCreateQuizzesResponseBulkQuizResult[]; /** Metadata about the bulk create operation. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkCreateQuizzesResponseBulkQuizResult { /** Result metadata for the individual create operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */ itemMetadata?: ItemMetadata; /** Created quiz. Empty when `returnEntity` is `false`. */ item?: Quiz; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkCloneQuizzesRequest { /** * IDs of the quizzes to clone. * @minSize 1 * @maxSize 30 * @format GUID */ quizIds?: string[]; /** * Whether to return the cloned quizzes in the response. * * Default: `false` */ returnEntity?: boolean; } interface BulkCloneQuizzesResponse { /** Results of the bulk clone operation, including cloned quizzes and metadata. */ results?: BulkQuizResult[]; /** Metadata about the bulk operation. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkQuizResult { /** Metadata for the cloned quiz. */ itemMetadata?: ItemMetadata; /** Cloned quiz. Empty when `return_entity` is `false`. */ item?: Quiz; } interface GetQuizRequest { /** * Quiz ID, available from `step.quizOptions.id` on a quiz-type Online Programs step. * @format GUID */ quizId: string; } interface GetQuizResponse { /** Requested quiz definition. */ quiz?: Quiz; } interface DeleteQuizRequest { /** * ID of the quiz definition to permanently delete. * @format GUID */ quizId: string; } interface DeleteQuizResponse { /** Permanently deleted quiz definition. */ quiz?: Quiz; } interface BulkDeleteQuizzesRequest { /** * IDs of the quiz definitions to permanently delete. Coordinate deletion with the Steps API and remove known step references first. * @minSize 1 * @maxSize 100 * @format GUID */ quizIds: string[]; } interface BulkDeleteQuizzesResponse { /** * Results of the bulk delete operation. * @minSize 1 * @maxSize 100 */ results?: BulkDeleteQuizzesResponseBulkQuizResult[]; /** Metadata about the bulk delete operation. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkDeleteQuizzesResponseBulkQuizResult { /** Result metadata for the individual delete operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request. */ itemMetadata?: ItemMetadata; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type CreateQuizApplicationErrors = { code?: 'INVALID_QUIZ'; description?: string; data?: Record; } | { code?: 'QUIZ_CONFLICT'; description?: string; data?: Record; }; /** @docsIgnore */ type CloneQuizApplicationErrors = { code?: 'INVALID_QUIZ'; description?: string; data?: Record; } | { code?: 'QUIZ_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'QUIZ_CONFLICT'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkCreateQuizzesApplicationErrors = { code?: 'INVALID_QUIZ'; description?: string; data?: Record; }; /** @docsIgnore */ type GetQuizApplicationErrors = { code?: 'QUIZ_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type DeleteQuizApplicationErrors = { code?: 'QUIZ_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'QUIZ_CONFLICT'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createQuiz(): __PublicMethodMetaInfo<'POST', {}, CreateQuizRequest$1, CreateQuizRequest, CreateQuizResponse$1, CreateQuizResponse>; declare function cloneQuiz(): __PublicMethodMetaInfo<'POST', { quizId: string; }, CloneQuizRequest$1, CloneQuizRequest, CloneQuizResponse$1, CloneQuizResponse>; declare function bulkCreateQuizzes(): __PublicMethodMetaInfo<'POST', {}, BulkCreateQuizzesRequest$1, BulkCreateQuizzesRequest, BulkCreateQuizzesResponse$1, BulkCreateQuizzesResponse>; declare function getQuiz(): __PublicMethodMetaInfo<'GET', { quizId: string; }, GetQuizRequest$1, GetQuizRequest, GetQuizResponse$1, GetQuizResponse>; declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', { quizId: string; }, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>; declare function bulkDeleteQuizzes(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteQuizzesRequest$1, BulkDeleteQuizzesRequest, BulkDeleteQuizzesResponse$1, BulkDeleteQuizzesResponse>; 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 BulkCreateQuizzesApplicationErrors as BulkCreateQuizzesApplicationErrorsOriginal, 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 CloneQuizApplicationErrors as CloneQuizApplicationErrorsOriginal, type CloneQuizRequest as CloneQuizRequestOriginal, type CloneQuizResponse as CloneQuizResponseOriginal, type CreateQuizApplicationErrors as CreateQuizApplicationErrorsOriginal, type CreateQuizRequest as CreateQuizRequestOriginal, type CreateQuizResponse as CreateQuizResponseOriginal, type DeleteQuizApplicationErrors as DeleteQuizApplicationErrorsOriginal, 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, type FileUploadField as FileUploadFieldOriginal, FileUploadFormat as FileUploadFormatOriginal, type FileUploadFormatWithLiterals as FileUploadFormatWithLiteralsOriginal, type GetQuizApplicationErrors as GetQuizApplicationErrorsOriginal, 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 };