@wix/auto_sdk_online-programs_quizzes 1.0.22 → 1.0.24

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.
@@ -9,7 +9,7 @@ interface CreateQuizSignature {
9
9
  * @param - Quiz to created
10
10
  * @returns Created quiz
11
11
  */
12
- (quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>>;
12
+ (quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>>;
13
13
  }
14
14
  declare function cloneQuiz$1(httpClient: HttpClient): CloneQuizSignature;
15
15
  interface CloneQuizSignature {
@@ -17,7 +17,7 @@ interface CloneQuizSignature {
17
17
  * Clones quiz
18
18
  * @param - ID of the quiz to be cloned
19
19
  */
20
- (quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
20
+ (quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3>>;
21
21
  }
22
22
  declare function bulkCreateQuizzes$1(httpClient: HttpClient): BulkCreateQuizzesSignature;
23
23
  interface BulkCreateQuizzesSignature {
@@ -25,7 +25,7 @@ interface BulkCreateQuizzesSignature {
25
25
  * Creates up to 30 quiz definitions in a single API call.
26
26
  * @param - Quiz definitions to create.
27
27
  */
28
- (quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
28
+ (quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
29
29
  }
30
30
  declare function getQuiz$1(httpClient: HttpClient): GetQuizSignature;
31
31
  interface GetQuizSignature {
@@ -34,7 +34,7 @@ interface GetQuizSignature {
34
34
  * @param - ID of the quiz
35
35
  * @returns Requested quiz
36
36
  */
37
- (quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>>;
37
+ (quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>>;
38
38
  }
39
39
  declare function deleteQuiz$1(httpClient: HttpClient): DeleteQuizSignature;
40
40
  interface DeleteQuizSignature {
@@ -42,7 +42,7 @@ interface DeleteQuizSignature {
42
42
  * Deletes quiz
43
43
  * @param - ID of quiz
44
44
  */
45
- (quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
45
+ (quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3>>;
46
46
  }
47
47
  declare function bulkDeleteQuizzes$1(httpClient: HttpClient): BulkDeleteQuizzesSignature;
48
48
  interface BulkDeleteQuizzesSignature {
@@ -52,7 +52,7 @@ interface BulkDeleteQuizzesSignature {
52
52
  * This operation doesn't check whether Online Programs steps reference the quizzes. Callers must remove or verify those references before deleting.
53
53
  * @param - IDs of the quizzes to delete.
54
54
  */
55
- (quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
55
+ (quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
56
56
  }
57
57
 
58
58
  declare const createQuiz: MaybeContext<BuildRESTFunction<typeof createQuiz$1> & typeof createQuiz$1>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts","../../src/achievements-quizzes-v1-quiz-quizzes.public.ts","../../src/achievements-quizzes-v1-quiz-quizzes.context.ts"],"sourcesContent":["export * from './src/achievements-quizzes-v1-quiz-quizzes.context.js';\n","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 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 * Formats of files that can be uploaded.\n *\n * Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection.\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 'www.wixapis.com': [\n {\n srcPath: '/online-programs/v1/quizzes',\n destPath: '/v1/quizzes',\n },\n {\n srcPath: '/online-programs/v1/bulk/quizzes',\n destPath: '/v1/bulk/quizzes',\n },\n ],\n };\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateQuizzesOptions,\n BulkCreateQuizzesResponse,\n BulkDeleteQuizzesResponse,\n CloneQuizResponse,\n DeleteQuizResponse,\n Quiz,\n bulkCreateQuizzes as universalBulkCreateQuizzes,\n bulkDeleteQuizzes as universalBulkDeleteQuizzes,\n cloneQuiz as universalCloneQuiz,\n createQuiz as universalCreateQuiz,\n deleteQuiz as universalDeleteQuiz,\n getQuiz as universalGetQuiz,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/online-programs' };\n\nexport function createQuiz(httpClient: HttpClient): CreateQuizSignature {\n return (\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 ) =>\n universalCreateQuiz(\n quiz,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateQuizSignature {\n /**\n * Creates quiz\n * @param - Quiz to created\n * @returns Created quiz\n */\n (\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}\n\nexport function cloneQuiz(httpClient: HttpClient): CloneQuizSignature {\n return (quizId: string) =>\n universalCloneQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CloneQuizSignature {\n /**\n * Clones quiz\n * @param - ID of the quiz to be cloned\n */\n (quizId: string): Promise<\n NonNullablePaths<\n CloneQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n >;\n}\n\nexport function bulkCreateQuizzes(\n httpClient: HttpClient\n): BulkCreateQuizzesSignature {\n return (\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 ) =>\n universalBulkCreateQuizzes(\n quizzes,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateQuizzesSignature {\n /**\n * Creates up to 30 quiz definitions in a single API call.\n * @param - Quiz definitions to create.\n */\n (\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}\n\nexport function getQuiz(httpClient: HttpClient): GetQuizSignature {\n return (quizId: string) =>\n universalGetQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetQuizSignature {\n /**\n * Reads quiz by ID\n * @param - ID of the quiz\n * @returns Requested quiz\n */\n (quizId: string): Promise<\n NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>\n >;\n}\n\nexport function deleteQuiz(httpClient: HttpClient): DeleteQuizSignature {\n return (quizId: string) =>\n universalDeleteQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteQuizSignature {\n /**\n * Deletes quiz\n * @param - ID of quiz\n */\n (quizId: string): Promise<\n NonNullablePaths<\n DeleteQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 5\n >\n >;\n}\n\nexport function bulkDeleteQuizzes(\n httpClient: HttpClient\n): BulkDeleteQuizzesSignature {\n return (quizIds: string[]) =>\n universalBulkDeleteQuizzes(\n quizIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteQuizzesSignature {\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 - IDs of the quizzes to delete.\n */\n (quizIds: string[]): 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}\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n BulkActionMetadata,\n BulkCloneQuizzesRequest,\n BulkCloneQuizzesResponse,\n BulkCreateQuizzesOptions,\n BulkCreateQuizzesRequest,\n BulkCreateQuizzesResponse,\n BulkCreateQuizzesResponseBulkQuizResult,\n BulkDeleteQuizzesRequest,\n BulkDeleteQuizzesResponse,\n BulkDeleteQuizzesResponseBulkQuizResult,\n BulkQuizResult,\n CloneQuizRequest,\n CloneQuizResponse,\n CreateQuizRequest,\n CreateQuizResponse,\n DeleteQuizRequest,\n DeleteQuizResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileUploadField,\n FileUploadFormat,\n GetQuizRequest,\n GetQuizResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n LongTextField,\n MessageEnvelope,\n MultiChoiceField,\n NumericField,\n Quiz,\n QuizField,\n QuizFieldFieldTypeOneOf,\n QuizSettings,\n RestoreInfo,\n ShortTextField,\n SingleChoiceField,\n WebhookIdentityType,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n","import {\n createQuiz as publicCreateQuiz,\n cloneQuiz as publicCloneQuiz,\n bulkCreateQuizzes as publicBulkCreateQuizzes,\n getQuiz as publicGetQuiz,\n deleteQuiz as publicDeleteQuiz,\n bulkDeleteQuizzes as publicBulkDeleteQuizzes,\n} from './achievements-quizzes-v1-quiz-quizzes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createQuiz: MaybeContext<\n BuildRESTFunction<typeof publicCreateQuiz> & typeof publicCreateQuiz\n> = /*#__PURE__*/ createRESTModule(publicCreateQuiz);\nexport const cloneQuiz: MaybeContext<\n BuildRESTFunction<typeof publicCloneQuiz> & typeof publicCloneQuiz\n> = /*#__PURE__*/ createRESTModule(publicCloneQuiz);\nexport const bulkCreateQuizzes: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateQuizzes> &\n typeof publicBulkCreateQuizzes\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateQuizzes);\nexport const getQuiz: MaybeContext<\n BuildRESTFunction<typeof publicGetQuiz> & typeof publicGetQuiz\n> = /*#__PURE__*/ createRESTModule(publicGetQuiz);\nexport const deleteQuiz: MaybeContext<\n BuildRESTFunction<typeof publicDeleteQuiz> & typeof publicDeleteQuiz\n> = /*#__PURE__*/ createRESTModule(publicDeleteQuiz);\nexport const bulkDeleteQuizzes: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteQuizzes> &\n typeof publicBulkDeleteQuizzes\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteQuizzes);\n\nexport {\n FileUploadFormat,\n WebhookIdentityType,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\nexport {\n Quiz,\n QuizSettings,\n QuizField,\n QuizFieldFieldTypeOneOf,\n NumericField,\n ShortTextField,\n LongTextField,\n SingleChoiceField,\n MultiChoiceField,\n FileUploadField,\n CreateQuizRequest,\n CreateQuizResponse,\n CloneQuizRequest,\n CloneQuizResponse,\n BulkCreateQuizzesRequest,\n BulkCreateQuizzesResponse,\n ItemMetadata,\n ApplicationError,\n BulkCreateQuizzesResponseBulkQuizResult,\n BulkActionMetadata,\n BulkCloneQuizzesRequest,\n BulkCloneQuizzesResponse,\n BulkQuizResult,\n GetQuizRequest,\n GetQuizResponse,\n DeleteQuizRequest,\n DeleteQuizResponse,\n BulkDeleteQuizzesRequest,\n BulkDeleteQuizzesResponse,\n BulkDeleteQuizzesResponseBulkQuizResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BulkCreateQuizzesOptions,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\nexport {\n FileUploadFormatWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,qBAAiB,uCAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb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AAAA,EACf;AACJ;AAgBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtLA,IAAAC,uBAAiC;AAG1B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,aAEK,2DAAiBA,UAAe;AAC3C,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["bulkCreateQuizzes","bulkDeleteQuizzes","cloneQuiz","createQuiz","deleteQuiz","getQuiz","import_float","import_timestamp","import_rest_modules","payload","FileUploadFormat","WebhookIdentityType","createQuiz","sdkTransformError","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes","import_rest_modules","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts","../../src/achievements-quizzes-v1-quiz-quizzes.public.ts","../../src/achievements-quizzes-v1-quiz-quizzes.context.ts"],"sourcesContent":["export * from './src/achievements-quizzes-v1-quiz-quizzes.context.js';\n","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 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 * Formats of files that can be uploaded.\n *\n * Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection.\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 3\n >\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>> {\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 3\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 * @applicableIdentity APP\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 3\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 4\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`, 2>> {\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 3\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 4\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 'www.wixapis.com': [\n {\n srcPath: '/online-programs/v1/quizzes',\n destPath: '/v1/quizzes',\n },\n {\n srcPath: '/online-programs/v1/bulk/quizzes',\n destPath: '/v1/bulk/quizzes',\n },\n ],\n };\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateQuizzesOptions,\n BulkCreateQuizzesResponse,\n BulkDeleteQuizzesResponse,\n CloneQuizResponse,\n DeleteQuizResponse,\n Quiz,\n bulkCreateQuizzes as universalBulkCreateQuizzes,\n bulkDeleteQuizzes as universalBulkDeleteQuizzes,\n cloneQuiz as universalCloneQuiz,\n createQuiz as universalCreateQuiz,\n deleteQuiz as universalDeleteQuiz,\n getQuiz as universalGetQuiz,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/online-programs' };\n\nexport function createQuiz(httpClient: HttpClient): CreateQuizSignature {\n return (\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 3\n >\n ) =>\n universalCreateQuiz(\n quiz,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateQuizSignature {\n /**\n * Creates quiz\n * @param - Quiz to created\n * @returns Created quiz\n */\n (\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 3\n >\n ): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>>;\n}\n\nexport function cloneQuiz(httpClient: HttpClient): CloneQuizSignature {\n return (quizId: string) =>\n universalCloneQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CloneQuizSignature {\n /**\n * Clones quiz\n * @param - ID of the quiz to be cloned\n */\n (quizId: string): Promise<\n NonNullablePaths<\n CloneQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 3\n >\n >;\n}\n\nexport function bulkCreateQuizzes(\n httpClient: HttpClient\n): BulkCreateQuizzesSignature {\n return (\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 3\n >[],\n options?: BulkCreateQuizzesOptions\n ) =>\n universalBulkCreateQuizzes(\n quizzes,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateQuizzesSignature {\n /**\n * Creates up to 30 quiz definitions in a single API call.\n * @param - Quiz definitions to create.\n */\n (\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 3\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 4\n >\n >;\n}\n\nexport function getQuiz(httpClient: HttpClient): GetQuizSignature {\n return (quizId: string) =>\n universalGetQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetQuizSignature {\n /**\n * Reads quiz by ID\n * @param - ID of the quiz\n * @returns Requested quiz\n */\n (quizId: string): Promise<\n NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>\n >;\n}\n\nexport function deleteQuiz(httpClient: HttpClient): DeleteQuizSignature {\n return (quizId: string) =>\n universalDeleteQuiz(\n quizId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteQuizSignature {\n /**\n * Deletes quiz\n * @param - ID of quiz\n */\n (quizId: string): Promise<\n NonNullablePaths<\n DeleteQuizResponse,\n `quiz.fields` | `quiz.fields.${number}._id`,\n 3\n >\n >;\n}\n\nexport function bulkDeleteQuizzes(\n httpClient: HttpClient\n): BulkDeleteQuizzesSignature {\n return (quizIds: string[]) =>\n universalBulkDeleteQuizzes(\n quizIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteQuizzesSignature {\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 - IDs of the quizzes to delete.\n */\n (quizIds: string[]): 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 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n BulkActionMetadata,\n BulkCloneQuizzesRequest,\n BulkCloneQuizzesResponse,\n BulkCreateQuizzesOptions,\n BulkCreateQuizzesRequest,\n BulkCreateQuizzesResponse,\n BulkCreateQuizzesResponseBulkQuizResult,\n BulkDeleteQuizzesRequest,\n BulkDeleteQuizzesResponse,\n BulkDeleteQuizzesResponseBulkQuizResult,\n BulkQuizResult,\n CloneQuizRequest,\n CloneQuizResponse,\n CreateQuizRequest,\n CreateQuizResponse,\n DeleteQuizRequest,\n DeleteQuizResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileUploadField,\n FileUploadFormat,\n GetQuizRequest,\n GetQuizResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n LongTextField,\n MessageEnvelope,\n MultiChoiceField,\n NumericField,\n Quiz,\n QuizField,\n QuizFieldFieldTypeOneOf,\n QuizSettings,\n RestoreInfo,\n ShortTextField,\n SingleChoiceField,\n WebhookIdentityType,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n","import {\n createQuiz as publicCreateQuiz,\n cloneQuiz as publicCloneQuiz,\n bulkCreateQuizzes as publicBulkCreateQuizzes,\n getQuiz as publicGetQuiz,\n deleteQuiz as publicDeleteQuiz,\n bulkDeleteQuizzes as publicBulkDeleteQuizzes,\n} from './achievements-quizzes-v1-quiz-quizzes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createQuiz: MaybeContext<\n BuildRESTFunction<typeof publicCreateQuiz> & typeof publicCreateQuiz\n> = /*#__PURE__*/ createRESTModule(publicCreateQuiz);\nexport const cloneQuiz: MaybeContext<\n BuildRESTFunction<typeof publicCloneQuiz> & typeof publicCloneQuiz\n> = /*#__PURE__*/ createRESTModule(publicCloneQuiz);\nexport const bulkCreateQuizzes: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateQuizzes> &\n typeof publicBulkCreateQuizzes\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateQuizzes);\nexport const getQuiz: MaybeContext<\n BuildRESTFunction<typeof publicGetQuiz> & typeof publicGetQuiz\n> = /*#__PURE__*/ createRESTModule(publicGetQuiz);\nexport const deleteQuiz: MaybeContext<\n BuildRESTFunction<typeof publicDeleteQuiz> & typeof publicDeleteQuiz\n> = /*#__PURE__*/ createRESTModule(publicDeleteQuiz);\nexport const bulkDeleteQuizzes: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteQuizzes> &\n typeof publicBulkDeleteQuizzes\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteQuizzes);\n\nexport {\n FileUploadFormat,\n WebhookIdentityType,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\nexport {\n Quiz,\n QuizSettings,\n QuizField,\n QuizFieldFieldTypeOneOf,\n NumericField,\n ShortTextField,\n LongTextField,\n SingleChoiceField,\n MultiChoiceField,\n FileUploadField,\n CreateQuizRequest,\n CreateQuizResponse,\n CloneQuizRequest,\n CloneQuizResponse,\n BulkCreateQuizzesRequest,\n BulkCreateQuizzesResponse,\n ItemMetadata,\n ApplicationError,\n BulkCreateQuizzesResponseBulkQuizResult,\n BulkActionMetadata,\n BulkCloneQuizzesRequest,\n BulkCloneQuizzesResponse,\n BulkQuizResult,\n GetQuizRequest,\n GetQuizResponse,\n DeleteQuizRequest,\n DeleteQuizResponse,\n BulkDeleteQuizzesRequest,\n BulkDeleteQuizzesResponse,\n BulkDeleteQuizzesResponseBulkQuizResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BulkCreateQuizzesOptions,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\nexport {\n FileUploadFormatWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './achievements-quizzes-v1-quiz-quizzes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,qB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SAAO,CAAC,WACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtLA,IAAAC,uBAAiC;AAG1B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,aAEK,2DAAiBA,UAAe;AAC3C,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["bulkCreateQuizzes","bulkDeleteQuizzes","cloneQuiz","createQuiz","deleteQuiz","getQuiz","import_float","import_timestamp","import_rest_modules","payload","FileUploadFormat","WebhookIdentityType","createQuiz","sdkTransformError","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes","import_rest_modules","createQuiz","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
@@ -508,7 +508,7 @@ interface AccountInfo {
508
508
  * @returns Created quiz
509
509
  * @fqn wix.achievements.quizzes.v1.QuizService.CreateQuiz
510
510
  */
511
- declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>>;
511
+ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>>;
512
512
  /**
513
513
  * Clones quiz
514
514
  * @param quizId - ID of the quiz to be cloned
@@ -518,7 +518,7 @@ declare function createQuiz(quiz: NonNullablePaths<Quiz, `fields` | `fields.${nu
518
518
  * @applicableIdentity APP
519
519
  * @fqn wix.achievements.quizzes.v1.QuizService.CloneQuiz
520
520
  */
521
- declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
521
+ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3>>;
522
522
  /**
523
523
  * Creates up to 30 quiz definitions in a single API call.
524
524
  * @param quizzes - Quiz definitions to create.
@@ -533,9 +533,10 @@ declare function cloneQuiz(quizId: string): Promise<NonNullablePaths<CloneQuizRe
533
533
  * @requiredField quizzes.fields.question
534
534
  * @requiredField quizzes.fields.target
535
535
  * @permissionId achievements:quizzes:v1:quiz:bulk_create_quizzes
536
+ * @applicableIdentity APP
536
537
  * @fqn wix.achievements.quizzes.v1.QuizService.BulkCreateQuizzes
537
538
  */
538
- declare function bulkCreateQuizzes(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 5>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
539
+ declare function bulkCreateQuizzes(quizzes: NonNullablePaths<Quiz, `fields` | `fields.${number}._id` | `fields.${number}.multiChoice.options` | `fields.${number}.question` | `fields.${number}.singleChoice.options` | `fields.${number}.target`, 3>[], options?: BulkCreateQuizzesOptions): Promise<NonNullablePaths<BulkCreateQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
539
540
  interface BulkCreateQuizzesOptions {
540
541
  /**
541
542
  * Whether to return the created quizzes in the response.
@@ -554,7 +555,7 @@ interface BulkCreateQuizzesOptions {
554
555
  * @returns Requested quiz
555
556
  * @fqn wix.achievements.quizzes.v1.QuizService.GetQuiz
556
557
  */
557
- declare function getQuiz(quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 4>>;
558
+ declare function getQuiz(quizId: string): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>>;
558
559
  /**
559
560
  * Deletes quiz
560
561
  * @param quizId - ID of quiz
@@ -564,7 +565,7 @@ declare function getQuiz(quizId: string): Promise<NonNullablePaths<Quiz, `fields
564
565
  * @applicableIdentity APP
565
566
  * @fqn wix.achievements.quizzes.v1.QuizService.DeleteQuiz
566
567
  */
567
- declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 5>>;
568
+ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuizResponse, `quiz.fields` | `quiz.fields.${number}._id`, 3>>;
568
569
  /**
569
570
  * Permanently deletes up to 100 quiz definitions.
570
571
  *
@@ -577,6 +578,6 @@ declare function deleteQuiz(quizId: string): Promise<NonNullablePaths<DeleteQuiz
577
578
  * @applicableIdentity APP
578
579
  * @fqn wix.achievements.quizzes.v1.QuizService.BulkDeleteQuizzes
579
580
  */
580
- declare function bulkDeleteQuizzes(quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
581
+ declare function bulkDeleteQuizzes(quizIds: string[]): Promise<NonNullablePaths<BulkDeleteQuizzesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
581
582
 
582
583
  export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkCloneQuizzesRequest, type BulkCloneQuizzesResponse, type BulkCreateQuizzesOptions, type BulkCreateQuizzesRequest, type BulkCreateQuizzesResponse, type BulkCreateQuizzesResponseBulkQuizResult, type BulkDeleteQuizzesRequest, type BulkDeleteQuizzesResponse, type BulkDeleteQuizzesResponseBulkQuizResult, type BulkQuizResult, type CloneQuizRequest, type CloneQuizResponse, type CreateQuizRequest, type CreateQuizResponse, type DeleteQuizRequest, type DeleteQuizResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FileUploadField, FileUploadFormat, type FileUploadFormatWithLiterals, type GetQuizRequest, type GetQuizResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type LongTextField, type MessageEnvelope, type MultiChoiceField, type NumericField, type Quiz, type QuizField, type QuizFieldFieldTypeOneOf, type QuizSettings, type RestoreInfo, type ShortTextField, type SingleChoiceField, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateQuizzes, bulkDeleteQuizzes, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts"],"sourcesContent":["export * from './src/achievements-quizzes-v1-quiz-quizzes.universal.js';\n","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 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 * Formats of files that can be uploaded.\n *\n * Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection.\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 'www.wixapis.com': [\n {\n srcPath: '/online-programs/v1/quizzes',\n destPath: '/v1/quizzes',\n },\n {\n srcPath: '/online-programs/v1/bulk/quizzes',\n destPath: '/v1/bulk/quizzes',\n },\n ],\n };\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;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,qBAAiB,uCAAe,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;AA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AAM,UACmC,kBAAkB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;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":["bulkCreateQuizzes","bulkDeleteQuizzes","cloneQuiz","createQuiz","deleteQuiz","getQuiz","import_float","import_timestamp","import_rest_modules","payload","FileUploadFormat","WebhookIdentityType","createQuiz","sdkTransformError","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/achievements-quizzes-v1-quiz-quizzes.universal.ts","../../src/achievements-quizzes-v1-quiz-quizzes.http.ts"],"sourcesContent":["export * from './src/achievements-quizzes-v1-quiz-quizzes.universal.js';\n","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 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 * Formats of files that can be uploaded.\n *\n * Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection.\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 3\n >\n): Promise<NonNullablePaths<Quiz, `fields` | `fields.${number}._id`, 2>> {\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 3\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 * @applicableIdentity APP\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 3\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 4\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`, 2>> {\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 3\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 4\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 'www.wixapis.com': [\n {\n srcPath: '/online-programs/v1/quizzes',\n destPath: '/v1/quizzes',\n },\n {\n srcPath: '/online-programs/v1/bulk/quizzes',\n destPath: '/v1/bulk/quizzes',\n },\n ],\n };\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;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;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CreateQuizzes","bulkDeleteQuizzes","cloneQuiz","createQuiz","deleteQuiz","getQuiz","import_float","import_timestamp","import_rest_modules","payload","FileUploadFormat","WebhookIdentityType","createQuiz","sdkTransformError","cloneQuiz","bulkCreateQuizzes","getQuiz","deleteQuiz","bulkDeleteQuizzes"]}