@wix/auto_sdk_online-programs_quizzes 1.0.20 → 1.0.21

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAchievementsQuizzesV1Quiz from './achievements-quizzes-v1-quiz-quizzes.http.js';\n\nexport interface Quiz {\n /**\n * ID of the quiz\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Quiz settings */\n settings?: QuizSettings;\n /**\n * Represents the current state of the quiz. Each time the it is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision\n * @readonly\n */\n revision?: string | null;\n /**\n * The time this quiz was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * The time this quiz was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Quiz fields\n * @minSize 1\n * @maxSize 200\n */\n fields?: QuizField[];\n}\n\nexport interface QuizSettings {\n /**\n * Minimal grade to pass the quiz\n * @max 100\n */\n passingGrade?: number | null;\n /**\n * Quiz title\n * @maxLength 200\n */\n title?: string | null;\n /**\n * Maximal number of submission attempts\n * @min 1\n */\n attempts?: number | null;\n}\n\nexport interface QuizField extends QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n /**\n * Field ID\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Key used in submission\n * @maxLength 200\n * @immutable\n */\n target?: string | null;\n /**\n * Question\n * @minLength 1\n * @maxLength 350\n */\n question?: string | null;\n /** Score of the question when answered right */\n score?: number | null;\n /**\n * Message shown for right answer\n * @maxLength 350\n */\n rightMessage?: string | null;\n /**\n * Message shown for wrong answer\n * @maxLength 350\n */\n wrongMessage?: string | null;\n}\n\n/** @oneof */\nexport interface QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n}\n\nexport enum FileFormat {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n ARCHIVE = 'ARCHIVE',\n}\n\n/** @enumType */\nexport type FileFormatWithLiterals =\n | FileFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE';\n\nexport enum FileUploadFormat {\n /** Image files. */\n IMAGE = 'IMAGE',\n /** Video files. */\n VIDEO = 'VIDEO',\n /** Audio files. */\n AUDIO = 'AUDIO',\n /** Document files. */\n DOCUMENT = 'DOCUMENT',\n /** Archive files. */\n ARCHIVE = 'ARCHIVE',\n}\n\n/** @enumType */\nexport type FileUploadFormatWithLiterals =\n | FileUploadFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE';\n\nexport interface NumericField {\n /** Right answer */\n rightAnswer?: number | null;\n}\n\nexport interface ShortTextField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 200\n */\n rightAnswer?: string | null;\n}\n\nexport interface LongTextField {}\n\nexport interface SingleChoiceField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface MultiChoiceField {\n /**\n * Right answer\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string[] | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface FileUploadField {\n /**\n * Text for upload button\n * @minLength 1\n * @maxLength 100\n */\n buttonText?: string | null;\n /**\n * Limit of upload items\n * @min 1\n * @max 10\n */\n itemsLimit?: number | null;\n /**\n * Deprecated. Use `file_upload_formats` instead.\n * @maxSize 5\n * @deprecated Deprecated. Use `file_upload_formats` instead.\n * @replacedBy file_upload_formats\n * @targetRemovalDate 2027-09-03\n */\n fileFormats?: FileFormatWithLiterals[];\n /**\n * Formats of files that can be uploaded.\n *\n * 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.\n * @maxSize 5\n */\n fileUploadFormats?: FileUploadFormatWithLiterals[];\n}\n\nexport interface CreateQuizRequest {\n /** Quiz to created */\n quiz: Quiz;\n}\n\nexport interface CreateQuizResponse {\n /** Created quiz */\n quiz?: Quiz;\n}\n\nexport interface CloneQuizRequest {\n /**\n * ID of the quiz to be cloned\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface CloneQuizResponse {\n /** Cloned quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkCreateQuizzesRequest {\n /**\n * Quiz definitions to create.\n * @minSize 1\n * @maxSize 30\n */\n quizzes: Quiz[];\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateQuizzesResponse {\n /**\n * Results of the bulk create operation.\n * @minSize 1\n * @maxSize 30\n */\n results?: BulkCreateQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkCreateQuizzesResponseBulkQuizResult {\n /** Metadata for the individual create operation. */\n itemMetadata?: ItemMetadata;\n /** Created quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkCloneQuizzesRequest {\n /**\n * IDs of the quizzes to clone.\n * @minSize 1\n * @maxSize 30\n * @format GUID\n */\n quizIds?: string[];\n /**\n * Whether to return the cloned quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCloneQuizzesResponse {\n /** Results of the bulk clone operation, including cloned quizzes and metadata. */\n results?: BulkQuizResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkQuizResult {\n /** Metadata for the cloned quiz. */\n itemMetadata?: ItemMetadata;\n /** Cloned quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface GetQuizRequest {\n /**\n * ID of the quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface GetQuizResponse {\n /** Requested quiz */\n quiz?: Quiz;\n}\n\nexport interface DeleteQuizRequest {\n /**\n * ID of quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface DeleteQuizResponse {\n /** Deleted quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkDeleteQuizzesRequest {\n /**\n * IDs of the quizzes to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n quizIds: string[];\n}\n\nexport interface BulkDeleteQuizzesResponse {\n /**\n * Results of the bulk delete operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteQuizzesResponseBulkQuizResult {\n /** Metadata for the individual delete operation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Creates quiz\n * @param quiz - Quiz to created\n * @public\n * @requiredField quiz\n * @requiredField quiz.fields\n * @requiredField quiz.fields.FieldType\n * @requiredField quiz.fields.FieldType.multiChoice.options\n * @requiredField quiz.fields.FieldType.singleChoice.options\n * @requiredField quiz.fields._id\n * @requiredField quiz.fields.question\n * @requiredField quiz.fields.target\n * @permissionId QUIZZES.CREATE_QUIZ\n * @applicableIdentity APP\n * @returns Created quiz\n * @fqn wix.achievements.quizzes.v1.QuizService.CreateQuiz\n */\nexport async function createQuiz(\n quiz: NonNullablePaths<\n Quiz,\n | `fields`\n | `fields.${number}._id`\n | `fields.${number}.multiChoice.options`\n | `fields.${number}.question`\n | `fields.${number}.singleChoice.options`\n | `fields.${number}.target`,\n 5\n >\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quiz: quiz });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.createQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.quiz!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quiz: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quiz']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Clones quiz\n * @param quizId - ID of the quiz to be cloned\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.CREATE_QUIZ\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.CloneQuiz\n */\nexport async function cloneQuiz(\n quizId: string\n): Promise<\n NonNullablePaths<\n CloneQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.cloneQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates up to 30 quiz definitions in a single API call.\n * @param quizzes - Quiz definitions to create.\n * @public\n * @documentationMaturity preview\n * @requiredField quizzes\n * @requiredField quizzes.fields\n * @requiredField quizzes.fields.FieldType\n * @requiredField quizzes.fields.FieldType.multiChoice.options\n * @requiredField quizzes.fields.FieldType.singleChoice.options\n * @requiredField quizzes.fields._id\n * @requiredField quizzes.fields.question\n * @requiredField quizzes.fields.target\n * @permissionId achievements:quizzes:v1:quiz:bulk_create_quizzes\n * @fqn wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes\n */\nexport async function bulkCreateQuizzes(\n quizzes: NonNullablePaths<\n Quiz,\n | `fields`\n | `fields.${number}._id`\n | `fields.${number}.multiChoice.options`\n | `fields.${number}.question`\n | `fields.${number}.singleChoice.options`\n | `fields.${number}.target`,\n 5\n >[],\n options?: BulkCreateQuizzesOptions\n): Promise<\n NonNullablePaths<\n BulkCreateQuizzesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n quizzes: quizzes,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkCreateQuizzes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n quizzes: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['quizzes', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateQuizzesOptions {\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Reads quiz by ID\n * @param quizId - ID of the quiz\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.READ_QUIZ\n * @applicableIdentity APP\n * @returns Requested quiz\n * @fqn wix.achievements.quizzes.v1.QuizService.GetQuiz\n */\nexport async function getQuiz(\n quizId: string\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.getQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.quiz!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes quiz\n * @param quizId - ID of quiz\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.DELETE_QUIZ\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.DeleteQuiz\n */\nexport async function deleteQuiz(\n quizId: string\n): Promise<\n NonNullablePaths<\n DeleteQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.deleteQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n * @param quizIds - IDs of the quizzes to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField quizIds\n * @permissionId achievements:quizzes:v1:quiz:bulk_delete_quizzes\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes\n */\nexport async function bulkDeleteQuizzes(\n quizIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteQuizzesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizIds: quizIds });\n\n const reqOpts =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkDeleteQuizzes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAchievementsQuizzesV1QuizServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_online-programs_quizzes';\n\n/** Creates quiz */\nexport function createQuiz(payload: object): RequestOptionsFactory<any> {\n function __createQuiz({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CreateQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createQuiz;\n}\n\n/** Clones quiz */\nexport function cloneQuiz(payload: object): RequestOptionsFactory<any> {\n function __cloneQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CloneQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}/clone',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cloneQuiz;\n}\n\n/** Creates up to 30 quiz definitions in a single API call. */\nexport function bulkCreateQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateQuizzes({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'quizzes.createdDate' },\n { path: 'quizzes.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quizzes.fields.score' },\n { path: 'quizzes.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.fields.score' },\n { path: 'results.item.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateQuizzes;\n}\n\n/** Reads quiz by ID */\nexport function getQuiz(payload: object): RequestOptionsFactory<any> {\n function __getQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'GET' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.GetQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getQuiz;\n}\n\n/** Deletes quiz */\nexport function deleteQuiz(payload: object): RequestOptionsFactory<any> {\n function __deleteQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'DELETE' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.DeleteQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteQuiz;\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n */\nexport function bulkDeleteQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteQuizzes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteQuizzes;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MA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;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAcA,eAAsBC,mBACpB,SAcA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,EAAE,QAAiB,CAAC;AAE1E,QAAM,UACmC,kBAAkB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,SAAS,OAAO;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","FileFormat","FileUploadFormat","WebhookIdentityType","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
1
+ {"version":3,"sources":["../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAchievementsQuizzesV1Quiz from './achievements-quizzes-v1-quiz-quizzes.http.js';\n\nexport interface Quiz {\n /**\n * ID of the quiz\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Quiz settings */\n settings?: QuizSettings;\n /**\n * Represents the current state of the quiz. Each time the it is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision\n * @readonly\n */\n revision?: string | null;\n /**\n * The time this quiz was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * The time this quiz was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Quiz fields\n * @minSize 1\n * @maxSize 200\n */\n fields?: QuizField[];\n}\n\nexport interface QuizSettings {\n /**\n * Minimal grade to pass the quiz\n * @max 100\n */\n passingGrade?: number | null;\n /**\n * Quiz title\n * @maxLength 200\n */\n title?: string | null;\n /**\n * Maximal number of submission attempts\n * @min 1\n */\n attempts?: number | null;\n}\n\nexport interface QuizField extends QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n /**\n * Field ID\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Key used in submission\n * @maxLength 200\n * @immutable\n */\n target?: string | null;\n /**\n * Question\n * @minLength 1\n * @maxLength 350\n */\n question?: string | null;\n /** Score of the question when answered right */\n score?: number | null;\n /**\n * Message shown for right answer\n * @maxLength 350\n */\n rightMessage?: string | null;\n /**\n * Message shown for wrong answer\n * @maxLength 350\n */\n wrongMessage?: string | null;\n}\n\n/** @oneof */\nexport interface QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n}\n\nexport enum FileFormat {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n ARCHIVE = 'ARCHIVE',\n MODEL_3D = 'MODEL_3D',\n}\n\n/** @enumType */\nexport type FileFormatWithLiterals =\n | FileFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE'\n | 'MODEL_3D';\n\nexport enum FileUploadFormat {\n /** Image files. */\n IMAGE = 'IMAGE',\n /** Video files. */\n VIDEO = 'VIDEO',\n /** Audio files. */\n AUDIO = 'AUDIO',\n /** Document files. */\n DOCUMENT = 'DOCUMENT',\n /** Archive files. */\n ARCHIVE = 'ARCHIVE',\n /** 3D model files. */\n MODEL_3D = 'MODEL_3D',\n}\n\n/** @enumType */\nexport type FileUploadFormatWithLiterals =\n | FileUploadFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE'\n | 'MODEL_3D';\n\nexport interface NumericField {\n /** Right answer */\n rightAnswer?: number | null;\n}\n\nexport interface ShortTextField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 200\n */\n rightAnswer?: string | null;\n}\n\nexport interface LongTextField {}\n\nexport interface SingleChoiceField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface MultiChoiceField {\n /**\n * Right answer\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string[] | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface FileUploadField {\n /**\n * Text for upload button\n * @minLength 1\n * @maxLength 100\n */\n buttonText?: string | null;\n /**\n * Limit of upload items\n * @min 1\n * @max 10\n */\n itemsLimit?: number | null;\n /**\n * Deprecated. Use `file_upload_formats` instead.\n * @maxSize 6\n * @deprecated Deprecated. Use `file_upload_formats` instead.\n * @replacedBy file_upload_formats\n * @targetRemovalDate 2027-09-03\n */\n fileFormats?: FileFormatWithLiterals[];\n /**\n * Formats of files that can be uploaded.\n *\n * 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.\n * @maxSize 6\n */\n fileUploadFormats?: FileUploadFormatWithLiterals[];\n}\n\nexport interface CreateQuizRequest {\n /** Quiz to created */\n quiz: Quiz;\n}\n\nexport interface CreateQuizResponse {\n /** Created quiz */\n quiz?: Quiz;\n}\n\nexport interface CloneQuizRequest {\n /**\n * ID of the quiz to be cloned\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface CloneQuizResponse {\n /** Cloned quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkCreateQuizzesRequest {\n /**\n * Quiz definitions to create.\n * @minSize 1\n * @maxSize 30\n */\n quizzes: Quiz[];\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateQuizzesResponse {\n /**\n * Results of the bulk create operation.\n * @minSize 1\n * @maxSize 30\n */\n results?: BulkCreateQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkCreateQuizzesResponseBulkQuizResult {\n /** Metadata for the individual create operation. */\n itemMetadata?: ItemMetadata;\n /** Created quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkCloneQuizzesRequest {\n /**\n * IDs of the quizzes to clone.\n * @minSize 1\n * @maxSize 30\n * @format GUID\n */\n quizIds?: string[];\n /**\n * Whether to return the cloned quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCloneQuizzesResponse {\n /** Results of the bulk clone operation, including cloned quizzes and metadata. */\n results?: BulkQuizResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkQuizResult {\n /** Metadata for the cloned quiz. */\n itemMetadata?: ItemMetadata;\n /** Cloned quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface GetQuizRequest {\n /**\n * ID of the quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface GetQuizResponse {\n /** Requested quiz */\n quiz?: Quiz;\n}\n\nexport interface DeleteQuizRequest {\n /**\n * ID of quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface DeleteQuizResponse {\n /** Deleted quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkDeleteQuizzesRequest {\n /**\n * IDs of the quizzes to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n quizIds: string[];\n}\n\nexport interface BulkDeleteQuizzesResponse {\n /**\n * Results of the bulk delete operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteQuizzesResponseBulkQuizResult {\n /** Metadata for the individual delete operation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Creates quiz\n * @param quiz - Quiz to created\n * @public\n * @requiredField quiz\n * @requiredField quiz.fields\n * @requiredField quiz.fields.FieldType\n * @requiredField quiz.fields.FieldType.multiChoice.options\n * @requiredField quiz.fields.FieldType.singleChoice.options\n * @requiredField quiz.fields._id\n * @requiredField quiz.fields.question\n * @requiredField quiz.fields.target\n * @permissionId QUIZZES.CREATE_QUIZ\n * @applicableIdentity APP\n * @returns Created quiz\n * @fqn wix.achievements.quizzes.v1.QuizService.CreateQuiz\n */\nexport async function createQuiz(\n quiz: NonNullablePaths<\n Quiz,\n | `fields`\n | `fields.${number}._id`\n | `fields.${number}.multiChoice.options`\n | `fields.${number}.question`\n | `fields.${number}.singleChoice.options`\n | `fields.${number}.target`,\n 5\n >\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quiz: quiz });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.createQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.quiz!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quiz: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quiz']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Clones quiz\n * @param quizId - ID of the quiz to be cloned\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.CREATE_QUIZ\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.CloneQuiz\n */\nexport async function cloneQuiz(\n quizId: string\n): Promise<\n NonNullablePaths<\n CloneQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.cloneQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates up to 30 quiz definitions in a single API call.\n * @param quizzes - Quiz definitions to create.\n * @public\n * @documentationMaturity preview\n * @requiredField quizzes\n * @requiredField quizzes.fields\n * @requiredField quizzes.fields.FieldType\n * @requiredField quizzes.fields.FieldType.multiChoice.options\n * @requiredField quizzes.fields.FieldType.singleChoice.options\n * @requiredField quizzes.fields._id\n * @requiredField quizzes.fields.question\n * @requiredField quizzes.fields.target\n * @permissionId achievements:quizzes:v1:quiz:bulk_create_quizzes\n * @fqn wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes\n */\nexport async function bulkCreateQuizzes(\n quizzes: NonNullablePaths<\n Quiz,\n | `fields`\n | `fields.${number}._id`\n | `fields.${number}.multiChoice.options`\n | `fields.${number}.question`\n | `fields.${number}.singleChoice.options`\n | `fields.${number}.target`,\n 5\n >[],\n options?: BulkCreateQuizzesOptions\n): Promise<\n NonNullablePaths<\n BulkCreateQuizzesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n quizzes: quizzes,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkCreateQuizzes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n quizzes: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['quizzes', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateQuizzesOptions {\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Reads quiz by ID\n * @param quizId - ID of the quiz\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.READ_QUIZ\n * @applicableIdentity APP\n * @returns Requested quiz\n * @fqn wix.achievements.quizzes.v1.QuizService.GetQuiz\n */\nexport async function getQuiz(\n quizId: string\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.getQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.quiz!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes quiz\n * @param quizId - ID of quiz\n * @public\n * @requiredField quizId\n * @permissionId QUIZZES.DELETE_QUIZ\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.DeleteQuiz\n */\nexport async function deleteQuiz(\n quizId: string\n): Promise<\n NonNullablePaths<\n DeleteQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizId: quizId });\n\n const reqOpts = ambassadorWixAchievementsQuizzesV1Quiz.deleteQuiz(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n * @param quizIds - IDs of the quizzes to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField quizIds\n * @permissionId achievements:quizzes:v1:quiz:bulk_delete_quizzes\n * @applicableIdentity APP\n * @fqn wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes\n */\nexport async function bulkDeleteQuizzes(\n quizIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteQuizzesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ quizIds: quizIds });\n\n const reqOpts =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkDeleteQuizzes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { quizIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['quizIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAchievementsQuizzesV1QuizServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_online-programs_quizzes';\n\n/** Creates quiz */\nexport function createQuiz(payload: object): RequestOptionsFactory<any> {\n function __createQuiz({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CreateQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createQuiz;\n}\n\n/** Clones quiz */\nexport function cloneQuiz(payload: object): RequestOptionsFactory<any> {\n function __cloneQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CloneQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}/clone',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cloneQuiz;\n}\n\n/** Creates up to 30 quiz definitions in a single API call. */\nexport function bulkCreateQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateQuizzes({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'quizzes.createdDate' },\n { path: 'quizzes.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quizzes.fields.score' },\n { path: 'quizzes.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.fields.score' },\n { path: 'results.item.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateQuizzes;\n}\n\n/** Reads quiz by ID */\nexport function getQuiz(payload: object): RequestOptionsFactory<any> {\n function __getQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'GET' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.GetQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getQuiz;\n}\n\n/** Deletes quiz */\nexport function deleteQuiz(payload: object): RequestOptionsFactory<any> {\n function __deleteQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'DELETE' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.DeleteQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteQuiz;\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n */\nexport function bulkDeleteQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteQuizzes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteQuizzes;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,mBAAmB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAAA,MACpE;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,oBAAoB;AAAA,UAC5B,EAAE,MAAM,kCAAkC;AAAA,QAC5C;AAAA,MACF;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,8CAA8C;AAAA,QACjD,WAAW;AAAA,QACX,MAAM;AAAA,QAC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AAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,SAAS,OAAO;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","FileFormat","FileUploadFormat","WebhookIdentityType","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
@@ -113,10 +113,11 @@ declare enum FileFormat {
113
113
  VIDEO = "VIDEO",
114
114
  AUDIO = "AUDIO",
115
115
  DOCUMENT = "DOCUMENT",
116
- ARCHIVE = "ARCHIVE"
116
+ ARCHIVE = "ARCHIVE",
117
+ MODEL_3D = "MODEL_3D"
117
118
  }
118
119
  /** @enumType */
119
- type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
120
+ type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
120
121
  declare enum FileUploadFormat {
121
122
  /** Image files. */
122
123
  IMAGE = "IMAGE",
@@ -127,10 +128,12 @@ declare enum FileUploadFormat {
127
128
  /** Document files. */
128
129
  DOCUMENT = "DOCUMENT",
129
130
  /** Archive files. */
130
- ARCHIVE = "ARCHIVE"
131
+ ARCHIVE = "ARCHIVE",
132
+ /** 3D model files. */
133
+ MODEL_3D = "MODEL_3D"
131
134
  }
132
135
  /** @enumType */
133
- type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
136
+ type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
134
137
  interface NumericField {
135
138
  /** Right answer */
136
139
  rightAnswer?: number | null;
@@ -193,7 +196,7 @@ interface FileUploadField {
193
196
  itemsLimit?: number | null;
194
197
  /**
195
198
  * Deprecated. Use `file_upload_formats` instead.
196
- * @maxSize 5
199
+ * @maxSize 6
197
200
  * @deprecated Deprecated. Use `file_upload_formats` instead.
198
201
  * @replacedBy file_upload_formats
199
202
  * @targetRemovalDate 2027-09-03
@@ -203,7 +206,7 @@ interface FileUploadField {
203
206
  * Formats of files that can be uploaded.
204
207
  *
205
208
  * 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
209
+ * @maxSize 6
207
210
  */
208
211
  fileUploadFormats?: FileUploadFormatWithLiterals[];
209
212
  }
package/build/es/meta.mjs CHANGED
@@ -242,6 +242,7 @@ var FileFormat = /* @__PURE__ */ ((FileFormat2) => {
242
242
  FileFormat2["AUDIO"] = "AUDIO";
243
243
  FileFormat2["DOCUMENT"] = "DOCUMENT";
244
244
  FileFormat2["ARCHIVE"] = "ARCHIVE";
245
+ FileFormat2["MODEL_3D"] = "MODEL_3D";
245
246
  return FileFormat2;
246
247
  })(FileFormat || {});
247
248
  var FileUploadFormat = /* @__PURE__ */ ((FileUploadFormat2) => {
@@ -250,6 +251,7 @@ var FileUploadFormat = /* @__PURE__ */ ((FileUploadFormat2) => {
250
251
  FileUploadFormat2["AUDIO"] = "AUDIO";
251
252
  FileUploadFormat2["DOCUMENT"] = "DOCUMENT";
252
253
  FileUploadFormat2["ARCHIVE"] = "ARCHIVE";
254
+ FileUploadFormat2["MODEL_3D"] = "MODEL_3D";
253
255
  return FileUploadFormat2;
254
256
  })(FileUploadFormat || {});
255
257
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/achievements-quizzes-v1-quiz-quizzes.http.ts","../../src/achievements-quizzes-v1-quiz-quizzes.types.ts","../../src/achievements-quizzes-v1-quiz-quizzes.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAchievementsQuizzesV1QuizServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_online-programs_quizzes';\n\n/** Creates quiz */\nexport function createQuiz(payload: object): RequestOptionsFactory<any> {\n function __createQuiz({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CreateQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createQuiz;\n}\n\n/** Clones quiz */\nexport function cloneQuiz(payload: object): RequestOptionsFactory<any> {\n function __cloneQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CloneQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}/clone',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cloneQuiz;\n}\n\n/** Creates up to 30 quiz definitions in a single API call. */\nexport function bulkCreateQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateQuizzes({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'quizzes.createdDate' },\n { path: 'quizzes.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quizzes.fields.score' },\n { path: 'quizzes.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.fields.score' },\n { path: 'results.item.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateQuizzes;\n}\n\n/** Reads quiz by ID */\nexport function getQuiz(payload: object): RequestOptionsFactory<any> {\n function __getQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'GET' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.GetQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getQuiz;\n}\n\n/** Deletes quiz */\nexport function deleteQuiz(payload: object): RequestOptionsFactory<any> {\n function __deleteQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'DELETE' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.DeleteQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteQuiz;\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n */\nexport function bulkDeleteQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteQuizzes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteQuizzes;\n}\n","export interface Quiz {\n /**\n * ID of the quiz\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /** Quiz settings */\n settings?: QuizSettings;\n /**\n * Represents the current state of the quiz. Each time the it is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision\n * @readonly\n */\n revision?: string | null;\n /**\n * The time this quiz was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * The time this quiz was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Quiz fields\n * @minSize 1\n * @maxSize 200\n */\n fields?: QuizField[];\n}\n\nexport interface QuizSettings {\n /**\n * Minimal grade to pass the quiz\n * @max 100\n */\n passingGrade?: number | null;\n /**\n * Quiz title\n * @maxLength 200\n */\n title?: string | null;\n /**\n * Maximal number of submission attempts\n * @min 1\n */\n attempts?: number | null;\n}\n\nexport interface QuizField extends QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n /**\n * Field ID\n * @format GUID\n * @immutable\n */\n id?: string;\n /**\n * Key used in submission\n * @maxLength 200\n * @immutable\n */\n target?: string | null;\n /**\n * Question\n * @minLength 1\n * @maxLength 350\n */\n question?: string | null;\n /** Score of the question when answered right */\n score?: number | null;\n /**\n * Message shown for right answer\n * @maxLength 350\n */\n rightMessage?: string | null;\n /**\n * Message shown for wrong answer\n * @maxLength 350\n */\n wrongMessage?: string | null;\n}\n\n/** @oneof */\nexport interface QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n}\n\nexport enum FileFormat {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n ARCHIVE = 'ARCHIVE',\n}\n\n/** @enumType */\nexport type FileFormatWithLiterals =\n | FileFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE';\n\nexport enum FileUploadFormat {\n /** Image files. */\n IMAGE = 'IMAGE',\n /** Video files. */\n VIDEO = 'VIDEO',\n /** Audio files. */\n AUDIO = 'AUDIO',\n /** Document files. */\n DOCUMENT = 'DOCUMENT',\n /** Archive files. */\n ARCHIVE = 'ARCHIVE',\n}\n\n/** @enumType */\nexport type FileUploadFormatWithLiterals =\n | FileUploadFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE';\n\nexport interface NumericField {\n /** Right answer */\n rightAnswer?: number | null;\n}\n\nexport interface ShortTextField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 200\n */\n rightAnswer?: string | null;\n}\n\nexport interface LongTextField {}\n\nexport interface SingleChoiceField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface MultiChoiceField {\n /**\n * Right answer\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string[] | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface FileUploadField {\n /**\n * Text for upload button\n * @minLength 1\n * @maxLength 100\n */\n buttonText?: string | null;\n /**\n * Limit of upload items\n * @min 1\n * @max 10\n */\n itemsLimit?: number | null;\n /**\n * Deprecated. Use `file_upload_formats` instead.\n * @maxSize 5\n * @deprecated Deprecated. Use `file_upload_formats` instead.\n * @replacedBy file_upload_formats\n * @targetRemovalDate 2027-09-03\n */\n fileFormats?: FileFormatWithLiterals[];\n /**\n * Formats of files that can be uploaded.\n *\n * 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.\n * @maxSize 5\n */\n fileUploadFormats?: FileUploadFormatWithLiterals[];\n}\n\nexport interface CreateQuizRequest {\n /** Quiz to created */\n quiz: Quiz;\n}\n\nexport interface CreateQuizResponse {\n /** Created quiz */\n quiz?: Quiz;\n}\n\nexport interface CloneQuizRequest {\n /**\n * ID of the quiz to be cloned\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface CloneQuizResponse {\n /** Cloned quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkCreateQuizzesRequest {\n /**\n * Quiz definitions to create.\n * @minSize 1\n * @maxSize 30\n */\n quizzes: Quiz[];\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateQuizzesResponse {\n /**\n * Results of the bulk create operation.\n * @minSize 1\n * @maxSize 30\n */\n results?: BulkCreateQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkCreateQuizzesResponseBulkQuizResult {\n /** Metadata for the individual create operation. */\n itemMetadata?: ItemMetadata;\n /** Created quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkCloneQuizzesRequest {\n /**\n * IDs of the quizzes to clone.\n * @minSize 1\n * @maxSize 30\n * @format GUID\n */\n quizIds?: string[];\n /**\n * Whether to return the cloned quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCloneQuizzesResponse {\n /** Results of the bulk clone operation, including cloned quizzes and metadata. */\n results?: BulkQuizResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkQuizResult {\n /** Metadata for the cloned quiz. */\n itemMetadata?: ItemMetadata;\n /** Cloned quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface GetQuizRequest {\n /**\n * ID of the quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface GetQuizResponse {\n /** Requested quiz */\n quiz?: Quiz;\n}\n\nexport interface DeleteQuizRequest {\n /**\n * ID of quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface DeleteQuizResponse {\n /** Deleted quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkDeleteQuizzesRequest {\n /**\n * IDs of the quizzes to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n quizIds: string[];\n}\n\nexport interface BulkDeleteQuizzesResponse {\n /**\n * Results of the bulk delete operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteQuizzesResponseBulkQuizResult {\n /** Metadata for the individual delete operation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixAchievementsQuizzesV1Quiz from './achievements-quizzes-v1-quiz-quizzes.http.js';\nimport * as ambassadorWixAchievementsQuizzesV1QuizTypes from './achievements-quizzes-v1-quiz-quizzes.types.js';\nimport * as ambassadorWixAchievementsQuizzesV1QuizUniversalTypes from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createQuiz(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CreateQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CreateQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CreateQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CreateQuizResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.createQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/quizzes',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function cloneQuiz(): __PublicMethodMetaInfo<\n 'POST',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CloneQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CloneQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CloneQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CloneQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.cloneQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/quizzes/{quizId}/clone',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateQuizzes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkCreateQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkCreateQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkCreateQuizzesResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkCreateQuizzesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkCreateQuizzes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/quizzes/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getQuiz(): __PublicMethodMetaInfo<\n 'GET',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.GetQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.GetQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.GetQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.GetQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.getQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/quizzes/{quizId}',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteQuiz(): __PublicMethodMetaInfo<\n 'DELETE',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.DeleteQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.DeleteQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.DeleteQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.DeleteQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.deleteQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/quizzes/{quizId}',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkDeleteQuizzes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkDeleteQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkDeleteQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkDeleteQuizzesResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkDeleteQuizzesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkDeleteQuizzes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/quizzes/delete',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Quiz as QuizOriginal,\n QuizSettings as QuizSettingsOriginal,\n QuizField as QuizFieldOriginal,\n QuizFieldFieldTypeOneOf as QuizFieldFieldTypeOneOfOriginal,\n FileFormat as FileFormatOriginal,\n FileFormatWithLiterals as FileFormatWithLiteralsOriginal,\n FileUploadFormat as FileUploadFormatOriginal,\n FileUploadFormatWithLiterals as FileUploadFormatWithLiteralsOriginal,\n NumericField as NumericFieldOriginal,\n ShortTextField as ShortTextFieldOriginal,\n LongTextField as LongTextFieldOriginal,\n SingleChoiceField as SingleChoiceFieldOriginal,\n MultiChoiceField as MultiChoiceFieldOriginal,\n FileUploadField as FileUploadFieldOriginal,\n CreateQuizRequest as CreateQuizRequestOriginal,\n CreateQuizResponse as CreateQuizResponseOriginal,\n CloneQuizRequest as CloneQuizRequestOriginal,\n CloneQuizResponse as CloneQuizResponseOriginal,\n BulkCreateQuizzesRequest as BulkCreateQuizzesRequestOriginal,\n BulkCreateQuizzesResponse as BulkCreateQuizzesResponseOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkCreateQuizzesResponseBulkQuizResult as BulkCreateQuizzesResponseBulkQuizResultOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal,\n BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal,\n BulkQuizResult as BulkQuizResultOriginal,\n GetQuizRequest as GetQuizRequestOriginal,\n GetQuizResponse as GetQuizResponseOriginal,\n DeleteQuizRequest as DeleteQuizRequestOriginal,\n DeleteQuizResponse as DeleteQuizResponseOriginal,\n BulkDeleteQuizzesRequest as BulkDeleteQuizzesRequestOriginal,\n BulkDeleteQuizzesResponse as BulkDeleteQuizzesResponseOriginal,\n BulkDeleteQuizzesResponseBulkQuizResult as BulkDeleteQuizzesResponseBulkQuizResultOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './achievements-quizzes-v1-quiz-quizzes.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAA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B,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,WAOd;AACA,QAAM,UAAU,EAAE,QAAQ,UAAU;AAEpC,QAAM,oBACmC,QAAQ,OAAO;AAExD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,cAOd;AACA,QAAM,UAAU,EAAE,QAAQ,UAAU;AAEpC,QAAM,oBACmC,WAAW,OAAO;AAE3D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACmC,kBAAkB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","FileFormat","FileUploadFormat","WebhookIdentityType","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
1
+ {"version":3,"sources":["../../src/achievements-quizzes-v1-quiz-quizzes.http.ts","../../src/achievements-quizzes-v1-quiz-quizzes.types.ts","../../src/achievements-quizzes-v1-quiz-quizzes.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAchievementsQuizzesV1QuizServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_online-programs_quizzes';\n\n/** Creates quiz */\nexport function createQuiz(payload: object): RequestOptionsFactory<any> {\n function __createQuiz({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CreateQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createQuiz;\n}\n\n/** Clones quiz */\nexport function cloneQuiz(payload: object): RequestOptionsFactory<any> {\n function __cloneQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.CloneQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}/clone',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cloneQuiz;\n}\n\n/** Creates up to 30 quiz definitions in a single API call. */\nexport function bulkCreateQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateQuizzes({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'quizzes.createdDate' },\n { path: 'quizzes.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'quizzes.fields.score' },\n { path: 'quizzes.fields.numeric.rightAnswer' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.fields.score' },\n { path: 'results.item.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateQuizzes;\n}\n\n/** Reads quiz by ID */\nexport function getQuiz(payload: object): RequestOptionsFactory<any> {\n function __getQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'GET' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.GetQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getQuiz;\n}\n\n/** Deletes quiz */\nexport function deleteQuiz(payload: object): RequestOptionsFactory<any> {\n function __deleteQuiz({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'DELETE' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.DeleteQuiz',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/quizzes/{quizId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'quiz.createdDate' }, { path: 'quiz.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'quiz.fields.score' },\n { path: 'quiz.fields.numeric.rightAnswer' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteQuiz;\n}\n\n/**\n * Permanently deletes up to 100 quiz definitions.\n *\n * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.\n */\nexport function bulkDeleteQuizzes(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteQuizzes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.achievements.quizzes.v1.quiz',\n method: 'POST' as any,\n methodFqn: 'wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAchievementsQuizzesV1QuizServiceUrl({\n protoPath: '/v1/bulk/quizzes/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteQuizzes;\n}\n","export interface Quiz {\n /**\n * ID of the quiz\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /** Quiz settings */\n settings?: QuizSettings;\n /**\n * Represents the current state of the quiz. Each time the it is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision\n * @readonly\n */\n revision?: string | null;\n /**\n * The time this quiz was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * The time this quiz was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Quiz fields\n * @minSize 1\n * @maxSize 200\n */\n fields?: QuizField[];\n}\n\nexport interface QuizSettings {\n /**\n * Minimal grade to pass the quiz\n * @max 100\n */\n passingGrade?: number | null;\n /**\n * Quiz title\n * @maxLength 200\n */\n title?: string | null;\n /**\n * Maximal number of submission attempts\n * @min 1\n */\n attempts?: number | null;\n}\n\nexport interface QuizField extends QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n /**\n * Field ID\n * @format GUID\n * @immutable\n */\n id?: string;\n /**\n * Key used in submission\n * @maxLength 200\n * @immutable\n */\n target?: string | null;\n /**\n * Question\n * @minLength 1\n * @maxLength 350\n */\n question?: string | null;\n /** Score of the question when answered right */\n score?: number | null;\n /**\n * Message shown for right answer\n * @maxLength 350\n */\n rightMessage?: string | null;\n /**\n * Message shown for wrong answer\n * @maxLength 350\n */\n wrongMessage?: string | null;\n}\n\n/** @oneof */\nexport interface QuizFieldFieldTypeOneOf {\n /** Type for numeric input */\n numeric?: NumericField;\n /** Type for text input */\n shortText?: ShortTextField;\n /** Type for long text input */\n longText?: LongTextField;\n /** Type for input with predefined options where only one can be selected */\n singleChoice?: SingleChoiceField;\n /** Type for input with predefined options where multiple can be selected */\n multiChoice?: MultiChoiceField;\n /** Type for file input */\n fileUpload?: FileUploadField;\n}\n\nexport enum FileFormat {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n ARCHIVE = 'ARCHIVE',\n MODEL_3D = 'MODEL_3D',\n}\n\n/** @enumType */\nexport type FileFormatWithLiterals =\n | FileFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE'\n | 'MODEL_3D';\n\nexport enum FileUploadFormat {\n /** Image files. */\n IMAGE = 'IMAGE',\n /** Video files. */\n VIDEO = 'VIDEO',\n /** Audio files. */\n AUDIO = 'AUDIO',\n /** Document files. */\n DOCUMENT = 'DOCUMENT',\n /** Archive files. */\n ARCHIVE = 'ARCHIVE',\n /** 3D model files. */\n MODEL_3D = 'MODEL_3D',\n}\n\n/** @enumType */\nexport type FileUploadFormatWithLiterals =\n | FileUploadFormat\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT'\n | 'ARCHIVE'\n | 'MODEL_3D';\n\nexport interface NumericField {\n /** Right answer */\n rightAnswer?: number | null;\n}\n\nexport interface ShortTextField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 200\n */\n rightAnswer?: string | null;\n}\n\nexport interface LongTextField {}\n\nexport interface SingleChoiceField {\n /**\n * Right answer\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface MultiChoiceField {\n /**\n * Right answer\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n rightAnswer?: string[] | null;\n /**\n * Answer options\n * @minSize 1\n * @maxSize 90\n * @minLength 1\n * @maxLength 350\n */\n options?: string[] | null;\n}\n\nexport interface FileUploadField {\n /**\n * Text for upload button\n * @minLength 1\n * @maxLength 100\n */\n buttonText?: string | null;\n /**\n * Limit of upload items\n * @min 1\n * @max 10\n */\n itemsLimit?: number | null;\n /**\n * Deprecated. Use `file_upload_formats` instead.\n * @maxSize 6\n * @deprecated Deprecated. Use `file_upload_formats` instead.\n * @replacedBy file_upload_formats\n * @targetRemovalDate 2027-09-03\n */\n fileFormats?: FileFormatWithLiterals[];\n /**\n * Formats of files that can be uploaded.\n *\n * 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.\n * @maxSize 6\n */\n fileUploadFormats?: FileUploadFormatWithLiterals[];\n}\n\nexport interface CreateQuizRequest {\n /** Quiz to created */\n quiz: Quiz;\n}\n\nexport interface CreateQuizResponse {\n /** Created quiz */\n quiz?: Quiz;\n}\n\nexport interface CloneQuizRequest {\n /**\n * ID of the quiz to be cloned\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface CloneQuizResponse {\n /** Cloned quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkCreateQuizzesRequest {\n /**\n * Quiz definitions to create.\n * @minSize 1\n * @maxSize 30\n */\n quizzes: Quiz[];\n /**\n * Whether to return the created quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateQuizzesResponse {\n /**\n * Results of the bulk create operation.\n * @minSize 1\n * @maxSize 30\n */\n results?: BulkCreateQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkCreateQuizzesResponseBulkQuizResult {\n /** Metadata for the individual create operation. */\n itemMetadata?: ItemMetadata;\n /** Created quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkCloneQuizzesRequest {\n /**\n * IDs of the quizzes to clone.\n * @minSize 1\n * @maxSize 30\n * @format GUID\n */\n quizIds?: string[];\n /**\n * Whether to return the cloned quizzes in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCloneQuizzesResponse {\n /** Results of the bulk clone operation, including cloned quizzes and metadata. */\n results?: BulkQuizResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkQuizResult {\n /** Metadata for the cloned quiz. */\n itemMetadata?: ItemMetadata;\n /** Cloned quiz. Empty when `return_entity` is `false`. */\n item?: Quiz;\n}\n\nexport interface GetQuizRequest {\n /**\n * ID of the quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface GetQuizResponse {\n /** Requested quiz */\n quiz?: Quiz;\n}\n\nexport interface DeleteQuizRequest {\n /**\n * ID of quiz\n * @format GUID\n */\n quizId: string;\n}\n\nexport interface DeleteQuizResponse {\n /** Deleted quiz */\n quiz?: Quiz;\n}\n\nexport interface BulkDeleteQuizzesRequest {\n /**\n * IDs of the quizzes to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n quizIds: string[];\n}\n\nexport interface BulkDeleteQuizzesResponse {\n /**\n * Results of the bulk delete operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteQuizzesResponseBulkQuizResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteQuizzesResponseBulkQuizResult {\n /** Metadata for the individual delete operation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixAchievementsQuizzesV1Quiz from './achievements-quizzes-v1-quiz-quizzes.http.js';\nimport * as ambassadorWixAchievementsQuizzesV1QuizTypes from './achievements-quizzes-v1-quiz-quizzes.types.js';\nimport * as ambassadorWixAchievementsQuizzesV1QuizUniversalTypes from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createQuiz(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CreateQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CreateQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CreateQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CreateQuizResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.createQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/quizzes',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function cloneQuiz(): __PublicMethodMetaInfo<\n 'POST',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CloneQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CloneQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.CloneQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.CloneQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.cloneQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/quizzes/{quizId}/clone',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateQuizzes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkCreateQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkCreateQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkCreateQuizzesResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkCreateQuizzesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkCreateQuizzes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/quizzes/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getQuiz(): __PublicMethodMetaInfo<\n 'GET',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.GetQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.GetQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.GetQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.GetQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.getQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/quizzes/{quizId}',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteQuiz(): __PublicMethodMetaInfo<\n 'DELETE',\n { quizId: string },\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.DeleteQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.DeleteQuizRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.DeleteQuizResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.DeleteQuizResponse\n> {\n const payload = { quizId: ':quizId' } as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.deleteQuiz(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/quizzes/{quizId}',\n pathParams: { quizId: 'quizId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkDeleteQuizzes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkDeleteQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkDeleteQuizzesRequest,\n ambassadorWixAchievementsQuizzesV1QuizUniversalTypes.BulkDeleteQuizzesResponse,\n ambassadorWixAchievementsQuizzesV1QuizTypes.BulkDeleteQuizzesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAchievementsQuizzesV1Quiz.bulkDeleteQuizzes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/quizzes/delete',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Quiz as QuizOriginal,\n QuizSettings as QuizSettingsOriginal,\n QuizField as QuizFieldOriginal,\n QuizFieldFieldTypeOneOf as QuizFieldFieldTypeOneOfOriginal,\n FileFormat as FileFormatOriginal,\n FileFormatWithLiterals as FileFormatWithLiteralsOriginal,\n FileUploadFormat as FileUploadFormatOriginal,\n FileUploadFormatWithLiterals as FileUploadFormatWithLiteralsOriginal,\n NumericField as NumericFieldOriginal,\n ShortTextField as ShortTextFieldOriginal,\n LongTextField as LongTextFieldOriginal,\n SingleChoiceField as SingleChoiceFieldOriginal,\n MultiChoiceField as MultiChoiceFieldOriginal,\n FileUploadField as FileUploadFieldOriginal,\n CreateQuizRequest as CreateQuizRequestOriginal,\n CreateQuizResponse as CreateQuizResponseOriginal,\n CloneQuizRequest as CloneQuizRequestOriginal,\n CloneQuizResponse as CloneQuizResponseOriginal,\n BulkCreateQuizzesRequest as BulkCreateQuizzesRequestOriginal,\n BulkCreateQuizzesResponse as BulkCreateQuizzesResponseOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkCreateQuizzesResponseBulkQuizResult as BulkCreateQuizzesResponseBulkQuizResultOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n BulkCloneQuizzesRequest as BulkCloneQuizzesRequestOriginal,\n BulkCloneQuizzesResponse as BulkCloneQuizzesResponseOriginal,\n BulkQuizResult as BulkQuizResultOriginal,\n GetQuizRequest as GetQuizRequestOriginal,\n GetQuizResponse as GetQuizResponseOriginal,\n DeleteQuizRequest as DeleteQuizRequestOriginal,\n DeleteQuizResponse as DeleteQuizResponseOriginal,\n BulkDeleteQuizzesRequest as BulkDeleteQuizzesRequestOriginal,\n BulkDeleteQuizzesResponse as BulkDeleteQuizzesResponseOriginal,\n BulkDeleteQuizzesResponseBulkQuizResult as BulkDeleteQuizzesResponseBulkQuizResultOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './achievements-quizzes-v1-quiz-quizzes.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAs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ityType","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
@@ -112,10 +112,11 @@ declare enum FileFormat {
112
112
  VIDEO = "VIDEO",
113
113
  AUDIO = "AUDIO",
114
114
  DOCUMENT = "DOCUMENT",
115
- ARCHIVE = "ARCHIVE"
115
+ ARCHIVE = "ARCHIVE",
116
+ MODEL_3D = "MODEL_3D"
116
117
  }
117
118
  /** @enumType */
118
- type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
119
+ type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
119
120
  declare enum FileUploadFormat {
120
121
  /** Image files. */
121
122
  IMAGE = "IMAGE",
@@ -126,10 +127,12 @@ declare enum FileUploadFormat {
126
127
  /** Document files. */
127
128
  DOCUMENT = "DOCUMENT",
128
129
  /** Archive files. */
129
- ARCHIVE = "ARCHIVE"
130
+ ARCHIVE = "ARCHIVE",
131
+ /** 3D model files. */
132
+ MODEL_3D = "MODEL_3D"
130
133
  }
131
134
  /** @enumType */
132
- type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
135
+ type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
133
136
  interface NumericField {
134
137
  /** Right answer */
135
138
  rightAnswer?: number | null;
@@ -192,7 +195,7 @@ interface FileUploadField {
192
195
  itemsLimit?: number | null;
193
196
  /**
194
197
  * Deprecated. Use `file_upload_formats` instead.
195
- * @maxSize 5
198
+ * @maxSize 6
196
199
  * @deprecated Deprecated. Use `file_upload_formats` instead.
197
200
  * @replacedBy file_upload_formats
198
201
  * @targetRemovalDate 2027-09-03
@@ -202,7 +205,7 @@ interface FileUploadField {
202
205
  * Formats of files that can be uploaded.
203
206
  *
204
207
  * 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
208
+ * @maxSize 6
206
209
  */
207
210
  fileUploadFormats?: FileUploadFormatWithLiterals[];
208
211
  }
@@ -113,10 +113,11 @@ declare enum FileFormat {
113
113
  VIDEO = "VIDEO",
114
114
  AUDIO = "AUDIO",
115
115
  DOCUMENT = "DOCUMENT",
116
- ARCHIVE = "ARCHIVE"
116
+ ARCHIVE = "ARCHIVE",
117
+ MODEL_3D = "MODEL_3D"
117
118
  }
118
119
  /** @enumType */
119
- type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
120
+ type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
120
121
  declare enum FileUploadFormat {
121
122
  /** Image files. */
122
123
  IMAGE = "IMAGE",
@@ -127,10 +128,12 @@ declare enum FileUploadFormat {
127
128
  /** Document files. */
128
129
  DOCUMENT = "DOCUMENT",
129
130
  /** Archive files. */
130
- ARCHIVE = "ARCHIVE"
131
+ ARCHIVE = "ARCHIVE",
132
+ /** 3D model files. */
133
+ MODEL_3D = "MODEL_3D"
131
134
  }
132
135
  /** @enumType */
133
- type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
136
+ type FileUploadFormatWithLiterals = FileUploadFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'MODEL_3D';
134
137
  interface NumericField {
135
138
  /** Right answer */
136
139
  rightAnswer?: number | null;
@@ -193,7 +196,7 @@ interface FileUploadField {
193
196
  itemsLimit?: number | null;
194
197
  /**
195
198
  * Deprecated. Use `file_upload_formats` instead.
196
- * @maxSize 5
199
+ * @maxSize 6
197
200
  * @deprecated Deprecated. Use `file_upload_formats` instead.
198
201
  * @replacedBy file_upload_formats
199
202
  * @targetRemovalDate 2027-09-03
@@ -203,7 +206,7 @@ interface FileUploadField {
203
206
  * Formats of files that can be uploaded.
204
207
  *
205
208
  * 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
209
+ * @maxSize 6
207
210
  */
208
211
  fileUploadFormats?: FileUploadFormatWithLiterals[];
209
212
  }