@wix/auto_sdk_online-programs_quizzes 1.0.0

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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +63 -0
  2. package/build/cjs/index.js +506 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +525 -0
  5. package/build/cjs/index.typings.js +451 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +318 -0
  8. package/build/cjs/meta.js +385 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +63 -0
  11. package/build/es/index.mjs +475 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +525 -0
  14. package/build/es/index.typings.mjs +420 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +318 -0
  17. package/build/es/meta.mjs +353 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +63 -0
  21. package/build/internal/cjs/index.js +506 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +525 -0
  24. package/build/internal/cjs/index.typings.js +451 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +318 -0
  27. package/build/internal/cjs/meta.js +385 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +63 -0
  30. package/build/internal/es/index.mjs +475 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +525 -0
  33. package/build/internal/es/index.typings.mjs +420 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +318 -0
  36. package/build/internal/es/meta.mjs +353 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,318 @@
1
+ import { CreateQuizRequest as CreateQuizRequest$1, CreateQuizResponse as CreateQuizResponse$1, CloneQuizRequest as CloneQuizRequest$1, CloneQuizResponse as CloneQuizResponse$1, BulkCreateQuizRequest as BulkCreateQuizRequest$1, BulkCreateQuizResponse as BulkCreateQuizResponse$1, BulkCloneQuizRequest as BulkCloneQuizRequest$1, BulkCloneQuizResponse as BulkCloneQuizResponse$1, GetQuizRequest as GetQuizRequest$1, GetQuizResponse as GetQuizResponse$1, DeleteQuizRequest as DeleteQuizRequest$1, DeleteQuizResponse as DeleteQuizResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
3
+
4
+ interface Quiz {
5
+ /**
6
+ * ID of the quiz
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ id?: string | null;
11
+ /** Quiz settings */
12
+ settings?: QuizSettings;
13
+ /**
14
+ * 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
15
+ * @readonly
16
+ */
17
+ revision?: string | null;
18
+ /**
19
+ * The time this quiz was created
20
+ * @readonly
21
+ */
22
+ createdDate?: Date | null;
23
+ /**
24
+ * The time this quiz was last updated
25
+ * @readonly
26
+ */
27
+ updatedDate?: Date | null;
28
+ /**
29
+ * Quiz fields
30
+ * @minSize 1
31
+ * @maxSize 200
32
+ */
33
+ fields?: QuizField[];
34
+ }
35
+ interface QuizSettings {
36
+ /**
37
+ * Minimal grade to pass the quiz
38
+ * @max 100
39
+ */
40
+ passingGrade?: number | null;
41
+ /**
42
+ * Quiz title
43
+ * @maxLength 200
44
+ */
45
+ title?: string | null;
46
+ /**
47
+ * Maximal number of submission attempts
48
+ * @min 1
49
+ */
50
+ attempts?: number | null;
51
+ }
52
+ interface QuizField extends QuizFieldFieldTypeOneOf {
53
+ /** Type for numeric input */
54
+ numeric?: NumericField;
55
+ /** Type for text input */
56
+ shortText?: ShortTextField;
57
+ /** Type for long text input */
58
+ longText?: LongTextField;
59
+ /** Type for input with predefined options where only one can be selected */
60
+ singleChoice?: SingleChoiceField;
61
+ /** Type for input with predefined options where multiple can be selected */
62
+ multiChoice?: MultiChoiceField;
63
+ /** Type for file input */
64
+ fileUpload?: FileUploadField;
65
+ /**
66
+ * Field ID
67
+ * @format GUID
68
+ * @immutable
69
+ */
70
+ id?: string;
71
+ /**
72
+ * Key used in submission
73
+ * @maxLength 200
74
+ * @immutable
75
+ */
76
+ target?: string | null;
77
+ /**
78
+ * Question
79
+ * @minLength 1
80
+ * @maxLength 350
81
+ */
82
+ question?: string | null;
83
+ /** Score of the question when answered right */
84
+ score?: number | null;
85
+ /**
86
+ * Message shown for right answer
87
+ * @maxLength 350
88
+ */
89
+ rightMessage?: string | null;
90
+ /**
91
+ * Message shown for wrong answer
92
+ * @maxLength 350
93
+ */
94
+ wrongMessage?: string | null;
95
+ }
96
+ /** @oneof */
97
+ interface QuizFieldFieldTypeOneOf {
98
+ /** Type for numeric input */
99
+ numeric?: NumericField;
100
+ /** Type for text input */
101
+ shortText?: ShortTextField;
102
+ /** Type for long text input */
103
+ longText?: LongTextField;
104
+ /** Type for input with predefined options where only one can be selected */
105
+ singleChoice?: SingleChoiceField;
106
+ /** Type for input with predefined options where multiple can be selected */
107
+ multiChoice?: MultiChoiceField;
108
+ /** Type for file input */
109
+ fileUpload?: FileUploadField;
110
+ }
111
+ declare enum FileFormat {
112
+ IMAGE = "IMAGE",
113
+ VIDEO = "VIDEO",
114
+ AUDIO = "AUDIO",
115
+ DOCUMENT = "DOCUMENT",
116
+ ARCHIVE = "ARCHIVE"
117
+ }
118
+ /** @enumType */
119
+ type FileFormatWithLiterals = FileFormat | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE';
120
+ interface NumericField {
121
+ /** Right answer */
122
+ rightAnswer?: number | null;
123
+ }
124
+ interface ShortTextField {
125
+ /**
126
+ * Right answer
127
+ * @minLength 1
128
+ * @maxLength 200
129
+ */
130
+ rightAnswer?: string | null;
131
+ }
132
+ interface LongTextField {
133
+ }
134
+ interface SingleChoiceField {
135
+ /**
136
+ * Right answer
137
+ * @minLength 1
138
+ * @maxLength 350
139
+ */
140
+ rightAnswer?: string | null;
141
+ /**
142
+ * Answer options
143
+ * @minSize 1
144
+ * @maxSize 90
145
+ * @minLength 1
146
+ * @maxLength 350
147
+ */
148
+ options?: string[] | null;
149
+ }
150
+ interface MultiChoiceField {
151
+ /**
152
+ * Right answer
153
+ * @maxSize 90
154
+ * @minLength 1
155
+ * @maxLength 350
156
+ */
157
+ rightAnswer?: string[] | null;
158
+ /**
159
+ * Answer options
160
+ * @minSize 1
161
+ * @maxSize 90
162
+ * @minLength 1
163
+ * @maxLength 350
164
+ */
165
+ options?: string[] | null;
166
+ }
167
+ interface FileUploadField {
168
+ /**
169
+ * Text for upload button
170
+ * @minLength 1
171
+ * @maxLength 100
172
+ */
173
+ buttonText?: string | null;
174
+ /**
175
+ * Limit of upload items
176
+ * @min 1
177
+ * @max 10
178
+ */
179
+ itemsLimit?: number | null;
180
+ /**
181
+ * Formats of files that can be uploaded
182
+ * @minSize 1
183
+ * @maxSize 4
184
+ */
185
+ fileFormats?: FileFormatWithLiterals[];
186
+ }
187
+ interface CreateQuizRequest {
188
+ /** Quiz to created */
189
+ quiz: Quiz;
190
+ }
191
+ interface CreateQuizResponse {
192
+ /** Created quiz */
193
+ quiz?: Quiz;
194
+ }
195
+ interface CloneQuizRequest {
196
+ /**
197
+ * ID of the quiz to be cloned
198
+ * @format GUID
199
+ */
200
+ quizId: string;
201
+ }
202
+ interface CloneQuizResponse {
203
+ /** Cloned quiz */
204
+ quiz?: Quiz;
205
+ }
206
+ interface BulkCreateQuizRequest {
207
+ /**
208
+ * Quizzes to be created
209
+ * @maxSize 30
210
+ */
211
+ quizzes: Quiz[];
212
+ /** When set, items will be returned on successful create */
213
+ returnEntity?: boolean;
214
+ }
215
+ interface BulkCreateQuizResponse {
216
+ /** Created quizzes with metadata */
217
+ results?: BulkQuizResult[];
218
+ }
219
+ interface BulkQuizResult {
220
+ /** Created quiz metadata */
221
+ itemMetadata?: ItemMetadata;
222
+ /** Created quiz */
223
+ item?: Quiz;
224
+ }
225
+ interface ItemMetadata {
226
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
227
+ id?: string | null;
228
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
229
+ originalIndex?: number;
230
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
231
+ success?: boolean;
232
+ /** Details about the error in case of failure. */
233
+ error?: ApplicationError;
234
+ }
235
+ interface ApplicationError {
236
+ /** Error code. */
237
+ code?: string;
238
+ /** Description of the error. */
239
+ description?: string;
240
+ /** Data related to the error. */
241
+ data?: Record<string, any> | null;
242
+ }
243
+ interface BulkCloneQuizRequest {
244
+ /**
245
+ * IDs of the quizzes to clone.
246
+ * @minSize 1
247
+ * @maxSize 30
248
+ * @format GUID
249
+ */
250
+ quizIds: string[];
251
+ /**
252
+ * Whether to return the cloned quizzes in the response.
253
+ *
254
+ * Default: `false`
255
+ */
256
+ returnEntity?: boolean;
257
+ }
258
+ interface BulkCloneQuizResponse {
259
+ /** Results of the bulk clone operation, including cloned quizzes and metadata. */
260
+ results?: BulkQuizResult[];
261
+ /** Metadata about the bulk operation. */
262
+ bulkActionMetadata?: BulkActionMetadata;
263
+ }
264
+ interface BulkActionMetadata {
265
+ /** Number of items that were successfully processed. */
266
+ totalSuccesses?: number;
267
+ /** Number of items that couldn't be processed. */
268
+ totalFailures?: number;
269
+ /** Number of failures without details because detailed failure threshold was exceeded. */
270
+ undetailedFailures?: number;
271
+ }
272
+ interface GetQuizRequest {
273
+ /**
274
+ * ID of the quiz
275
+ * @format GUID
276
+ */
277
+ quizId: string;
278
+ }
279
+ interface GetQuizResponse {
280
+ /** Requested quiz */
281
+ quiz?: Quiz;
282
+ }
283
+ interface DeleteQuizRequest {
284
+ /**
285
+ * ID of quiz
286
+ * @format GUID
287
+ */
288
+ quizId: string;
289
+ }
290
+ interface DeleteQuizResponse {
291
+ /** Deleted quiz */
292
+ quiz?: Quiz;
293
+ }
294
+
295
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
296
+ getUrl: (context: any) => string;
297
+ httpMethod: K;
298
+ path: string;
299
+ pathParams: M;
300
+ __requestType: T;
301
+ __originalRequestType: S;
302
+ __responseType: Q;
303
+ __originalResponseType: R;
304
+ };
305
+ declare function createQuiz(): __PublicMethodMetaInfo<'POST', {}, CreateQuizRequest$1, CreateQuizRequest, CreateQuizResponse$1, CreateQuizResponse>;
306
+ declare function cloneQuiz(): __PublicMethodMetaInfo<'POST', {
307
+ quizId: string;
308
+ }, CloneQuizRequest$1, CloneQuizRequest, CloneQuizResponse$1, CloneQuizResponse>;
309
+ declare function bulkCreateQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkCreateQuizRequest$1, BulkCreateQuizRequest, BulkCreateQuizResponse$1, BulkCreateQuizResponse>;
310
+ declare function bulkCloneQuiz(): __PublicMethodMetaInfo<'POST', {}, BulkCloneQuizRequest$1, BulkCloneQuizRequest, BulkCloneQuizResponse$1, BulkCloneQuizResponse>;
311
+ declare function getQuiz(): __PublicMethodMetaInfo<'GET', {
312
+ quizId: string;
313
+ }, GetQuizRequest$1, GetQuizRequest, GetQuizResponse$1, GetQuizResponse>;
314
+ declare function deleteQuiz(): __PublicMethodMetaInfo<'DELETE', {
315
+ quizId: string;
316
+ }, DeleteQuizRequest$1, DeleteQuizRequest, DeleteQuizResponse$1, DeleteQuizResponse>;
317
+
318
+ export { type __PublicMethodMetaInfo, bulkCloneQuiz, bulkCreateQuiz, cloneQuiz, createQuiz, deleteQuiz, getQuiz };
@@ -0,0 +1,385 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ bulkCloneQuiz: () => bulkCloneQuiz2,
24
+ bulkCreateQuiz: () => bulkCreateQuiz2,
25
+ cloneQuiz: () => cloneQuiz2,
26
+ createQuiz: () => createQuiz2,
27
+ deleteQuiz: () => deleteQuiz2,
28
+ getQuiz: () => getQuiz2
29
+ });
30
+ module.exports = __toCommonJS(meta_exports);
31
+
32
+ // src/achievements-quizzes-v1-quiz-quizzes.http.ts
33
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
34
+ var import_float = require("@wix/sdk-runtime/transformations/float");
35
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
36
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
37
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
38
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
39
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
40
+ function resolveWixAchievementsQuizzesV1QuizServiceUrl(opts) {
41
+ const domainToMappings = {};
42
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
43
+ }
44
+ var PACKAGE_NAME = "@wix/auto_sdk_online-programs_quizzes";
45
+ function createQuiz(payload) {
46
+ function __createQuiz({ host }) {
47
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
48
+ {
49
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
50
+ paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
51
+ },
52
+ {
53
+ transformFn: import_float.transformSDKFloatToRESTFloat,
54
+ paths: [
55
+ { path: "quiz.fields.score" },
56
+ { path: "quiz.fields.numeric.rightAnswer" }
57
+ ]
58
+ }
59
+ ]);
60
+ const metadata = {
61
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
62
+ method: "POST",
63
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.CreateQuiz",
64
+ packageName: PACKAGE_NAME,
65
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
66
+ protoPath: "/v1/quizzes",
67
+ data: serializedData,
68
+ host
69
+ }),
70
+ data: serializedData,
71
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
72
+ {
73
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
74
+ paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
75
+ },
76
+ {
77
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
78
+ paths: [
79
+ { path: "quiz.fields.score" },
80
+ { path: "quiz.fields.numeric.rightAnswer" }
81
+ ]
82
+ }
83
+ ])
84
+ };
85
+ return metadata;
86
+ }
87
+ return __createQuiz;
88
+ }
89
+ function cloneQuiz(payload) {
90
+ function __cloneQuiz({ host }) {
91
+ const metadata = {
92
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
93
+ method: "POST",
94
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.CloneQuiz",
95
+ packageName: PACKAGE_NAME,
96
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
97
+ protoPath: "/v1/quizzes/{quizId}/clone",
98
+ data: payload,
99
+ host
100
+ }),
101
+ data: payload,
102
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
103
+ {
104
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
105
+ paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
106
+ },
107
+ {
108
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
109
+ paths: [
110
+ { path: "quiz.fields.score" },
111
+ { path: "quiz.fields.numeric.rightAnswer" }
112
+ ]
113
+ }
114
+ ])
115
+ };
116
+ return metadata;
117
+ }
118
+ return __cloneQuiz;
119
+ }
120
+ function bulkCreateQuiz(payload) {
121
+ function __bulkCreateQuiz({ host }) {
122
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
123
+ {
124
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
125
+ paths: [
126
+ { path: "quizzes.createdDate" },
127
+ { path: "quizzes.updatedDate" }
128
+ ]
129
+ },
130
+ {
131
+ transformFn: import_float.transformSDKFloatToRESTFloat,
132
+ paths: [
133
+ { path: "quizzes.fields.score" },
134
+ { path: "quizzes.fields.numeric.rightAnswer" }
135
+ ]
136
+ }
137
+ ]);
138
+ const metadata = {
139
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
140
+ method: "POST",
141
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.BulkCreateQuiz",
142
+ packageName: PACKAGE_NAME,
143
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
144
+ protoPath: "/v1/bulk/quizzes/create",
145
+ data: serializedData,
146
+ host
147
+ }),
148
+ data: serializedData,
149
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
150
+ {
151
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
152
+ paths: [
153
+ { path: "results.item.createdDate" },
154
+ { path: "results.item.updatedDate" }
155
+ ]
156
+ },
157
+ {
158
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
159
+ paths: [
160
+ { path: "results.item.fields.score" },
161
+ { path: "results.item.fields.numeric.rightAnswer" }
162
+ ]
163
+ }
164
+ ])
165
+ };
166
+ return metadata;
167
+ }
168
+ return __bulkCreateQuiz;
169
+ }
170
+ function bulkCloneQuiz(payload) {
171
+ function __bulkCloneQuiz({ host }) {
172
+ const metadata = {
173
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
174
+ method: "POST",
175
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.BulkCloneQuiz",
176
+ packageName: PACKAGE_NAME,
177
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
178
+ protoPath: "/v1/bulk/quizzes/clone",
179
+ data: payload,
180
+ host
181
+ }),
182
+ data: payload,
183
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
184
+ {
185
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
186
+ paths: [
187
+ { path: "results.item.createdDate" },
188
+ { path: "results.item.updatedDate" }
189
+ ]
190
+ },
191
+ {
192
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
193
+ paths: [
194
+ { path: "results.item.fields.score" },
195
+ { path: "results.item.fields.numeric.rightAnswer" }
196
+ ]
197
+ }
198
+ ])
199
+ };
200
+ return metadata;
201
+ }
202
+ return __bulkCloneQuiz;
203
+ }
204
+ function getQuiz(payload) {
205
+ function __getQuiz({ host }) {
206
+ const metadata = {
207
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
208
+ method: "GET",
209
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.GetQuiz",
210
+ packageName: PACKAGE_NAME,
211
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
212
+ protoPath: "/v1/quizzes/{quizId}",
213
+ data: payload,
214
+ host
215
+ }),
216
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
217
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
218
+ {
219
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
220
+ paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
221
+ },
222
+ {
223
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
224
+ paths: [
225
+ { path: "quiz.fields.score" },
226
+ { path: "quiz.fields.numeric.rightAnswer" }
227
+ ]
228
+ }
229
+ ])
230
+ };
231
+ return metadata;
232
+ }
233
+ return __getQuiz;
234
+ }
235
+ function deleteQuiz(payload) {
236
+ function __deleteQuiz({ host }) {
237
+ const metadata = {
238
+ entityFqdn: "wix.achievements.quizzes.v1.quiz",
239
+ method: "DELETE",
240
+ methodFqn: "wix.achievements.quizzes.v1.QuizService.DeleteQuiz",
241
+ packageName: PACKAGE_NAME,
242
+ url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
243
+ protoPath: "/v1/quizzes/{quizId}",
244
+ data: payload,
245
+ host
246
+ }),
247
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
248
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
249
+ {
250
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
251
+ paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
252
+ },
253
+ {
254
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
255
+ paths: [
256
+ { path: "quiz.fields.score" },
257
+ { path: "quiz.fields.numeric.rightAnswer" }
258
+ ]
259
+ }
260
+ ])
261
+ };
262
+ return metadata;
263
+ }
264
+ return __deleteQuiz;
265
+ }
266
+
267
+ // src/achievements-quizzes-v1-quiz-quizzes.meta.ts
268
+ function createQuiz2() {
269
+ const payload = {};
270
+ const getRequestOptions = createQuiz(payload);
271
+ const getUrl = (context) => {
272
+ const { url } = getRequestOptions(context);
273
+ return url;
274
+ };
275
+ return {
276
+ getUrl,
277
+ httpMethod: "POST",
278
+ path: "/v1/quizzes",
279
+ pathParams: {},
280
+ __requestType: null,
281
+ __originalRequestType: null,
282
+ __responseType: null,
283
+ __originalResponseType: null
284
+ };
285
+ }
286
+ function cloneQuiz2() {
287
+ const payload = { quizId: ":quizId" };
288
+ const getRequestOptions = cloneQuiz(payload);
289
+ const getUrl = (context) => {
290
+ const { url } = getRequestOptions(context);
291
+ return url;
292
+ };
293
+ return {
294
+ getUrl,
295
+ httpMethod: "POST",
296
+ path: "/v1/quizzes/{quizId}/clone",
297
+ pathParams: { quizId: "quizId" },
298
+ __requestType: null,
299
+ __originalRequestType: null,
300
+ __responseType: null,
301
+ __originalResponseType: null
302
+ };
303
+ }
304
+ function bulkCreateQuiz2() {
305
+ const payload = {};
306
+ const getRequestOptions = bulkCreateQuiz(payload);
307
+ const getUrl = (context) => {
308
+ const { url } = getRequestOptions(context);
309
+ return url;
310
+ };
311
+ return {
312
+ getUrl,
313
+ httpMethod: "POST",
314
+ path: "/v1/bulk/quizzes/create",
315
+ pathParams: {},
316
+ __requestType: null,
317
+ __originalRequestType: null,
318
+ __responseType: null,
319
+ __originalResponseType: null
320
+ };
321
+ }
322
+ function bulkCloneQuiz2() {
323
+ const payload = {};
324
+ const getRequestOptions = bulkCloneQuiz(payload);
325
+ const getUrl = (context) => {
326
+ const { url } = getRequestOptions(context);
327
+ return url;
328
+ };
329
+ return {
330
+ getUrl,
331
+ httpMethod: "POST",
332
+ path: "/v1/bulk/quizzes/clone",
333
+ pathParams: {},
334
+ __requestType: null,
335
+ __originalRequestType: null,
336
+ __responseType: null,
337
+ __originalResponseType: null
338
+ };
339
+ }
340
+ function getQuiz2() {
341
+ const payload = { quizId: ":quizId" };
342
+ const getRequestOptions = getQuiz(payload);
343
+ const getUrl = (context) => {
344
+ const { url } = getRequestOptions(context);
345
+ return url;
346
+ };
347
+ return {
348
+ getUrl,
349
+ httpMethod: "GET",
350
+ path: "/v1/quizzes/{quizId}",
351
+ pathParams: { quizId: "quizId" },
352
+ __requestType: null,
353
+ __originalRequestType: null,
354
+ __responseType: null,
355
+ __originalResponseType: null
356
+ };
357
+ }
358
+ function deleteQuiz2() {
359
+ const payload = { quizId: ":quizId" };
360
+ const getRequestOptions = deleteQuiz(payload);
361
+ const getUrl = (context) => {
362
+ const { url } = getRequestOptions(context);
363
+ return url;
364
+ };
365
+ return {
366
+ getUrl,
367
+ httpMethod: "DELETE",
368
+ path: "/v1/quizzes/{quizId}",
369
+ pathParams: { quizId: "quizId" },
370
+ __requestType: null,
371
+ __originalRequestType: null,
372
+ __responseType: null,
373
+ __originalResponseType: null
374
+ };
375
+ }
376
+ // Annotate the CommonJS export names for ESM import in node:
377
+ 0 && (module.exports = {
378
+ bulkCloneQuiz,
379
+ bulkCreateQuiz,
380
+ cloneQuiz,
381
+ createQuiz,
382
+ deleteQuiz,
383
+ getQuiz
384
+ });
385
+ //# sourceMappingURL=meta.js.map