@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.
- package/build/cjs/index.d.ts +63 -0
- package/build/cjs/index.js +506 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +525 -0
- package/build/cjs/index.typings.js +451 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +318 -0
- package/build/cjs/meta.js +385 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +63 -0
- package/build/es/index.mjs +475 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +525 -0
- package/build/es/index.typings.mjs +420 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +318 -0
- package/build/es/meta.mjs +353 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +63 -0
- package/build/internal/cjs/index.js +506 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +525 -0
- package/build/internal/cjs/index.typings.js +451 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +318 -0
- package/build/internal/cjs/meta.js +385 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +63 -0
- package/build/internal/es/index.mjs +475 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +525 -0
- package/build/internal/es/index.typings.mjs +420 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +318 -0
- package/build/internal/es/meta.mjs +353 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- 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.mjs';
|
|
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,353 @@
|
|
|
1
|
+
// src/achievements-quizzes-v1-quiz-quizzes.http.ts
|
|
2
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
3
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
4
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
5
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
6
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
7
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
8
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
9
|
+
function resolveWixAchievementsQuizzesV1QuizServiceUrl(opts) {
|
|
10
|
+
const domainToMappings = {};
|
|
11
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
12
|
+
}
|
|
13
|
+
var PACKAGE_NAME = "@wix/auto_sdk_online-programs_quizzes";
|
|
14
|
+
function createQuiz(payload) {
|
|
15
|
+
function __createQuiz({ host }) {
|
|
16
|
+
const serializedData = transformPaths(payload, [
|
|
17
|
+
{
|
|
18
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
19
|
+
paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
23
|
+
paths: [
|
|
24
|
+
{ path: "quiz.fields.score" },
|
|
25
|
+
{ path: "quiz.fields.numeric.rightAnswer" }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]);
|
|
29
|
+
const metadata = {
|
|
30
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
31
|
+
method: "POST",
|
|
32
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.CreateQuiz",
|
|
33
|
+
packageName: PACKAGE_NAME,
|
|
34
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
35
|
+
protoPath: "/v1/quizzes",
|
|
36
|
+
data: serializedData,
|
|
37
|
+
host
|
|
38
|
+
}),
|
|
39
|
+
data: serializedData,
|
|
40
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
41
|
+
{
|
|
42
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
43
|
+
paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
47
|
+
paths: [
|
|
48
|
+
{ path: "quiz.fields.score" },
|
|
49
|
+
{ path: "quiz.fields.numeric.rightAnswer" }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
])
|
|
53
|
+
};
|
|
54
|
+
return metadata;
|
|
55
|
+
}
|
|
56
|
+
return __createQuiz;
|
|
57
|
+
}
|
|
58
|
+
function cloneQuiz(payload) {
|
|
59
|
+
function __cloneQuiz({ host }) {
|
|
60
|
+
const metadata = {
|
|
61
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
62
|
+
method: "POST",
|
|
63
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.CloneQuiz",
|
|
64
|
+
packageName: PACKAGE_NAME,
|
|
65
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
66
|
+
protoPath: "/v1/quizzes/{quizId}/clone",
|
|
67
|
+
data: payload,
|
|
68
|
+
host
|
|
69
|
+
}),
|
|
70
|
+
data: payload,
|
|
71
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
72
|
+
{
|
|
73
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
74
|
+
paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
78
|
+
paths: [
|
|
79
|
+
{ path: "quiz.fields.score" },
|
|
80
|
+
{ path: "quiz.fields.numeric.rightAnswer" }
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
])
|
|
84
|
+
};
|
|
85
|
+
return metadata;
|
|
86
|
+
}
|
|
87
|
+
return __cloneQuiz;
|
|
88
|
+
}
|
|
89
|
+
function bulkCreateQuiz(payload) {
|
|
90
|
+
function __bulkCreateQuiz({ host }) {
|
|
91
|
+
const serializedData = transformPaths(payload, [
|
|
92
|
+
{
|
|
93
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
94
|
+
paths: [
|
|
95
|
+
{ path: "quizzes.createdDate" },
|
|
96
|
+
{ path: "quizzes.updatedDate" }
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
101
|
+
paths: [
|
|
102
|
+
{ path: "quizzes.fields.score" },
|
|
103
|
+
{ path: "quizzes.fields.numeric.rightAnswer" }
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]);
|
|
107
|
+
const metadata = {
|
|
108
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
109
|
+
method: "POST",
|
|
110
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.BulkCreateQuiz",
|
|
111
|
+
packageName: PACKAGE_NAME,
|
|
112
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
113
|
+
protoPath: "/v1/bulk/quizzes/create",
|
|
114
|
+
data: serializedData,
|
|
115
|
+
host
|
|
116
|
+
}),
|
|
117
|
+
data: serializedData,
|
|
118
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
119
|
+
{
|
|
120
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
121
|
+
paths: [
|
|
122
|
+
{ path: "results.item.createdDate" },
|
|
123
|
+
{ path: "results.item.updatedDate" }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
128
|
+
paths: [
|
|
129
|
+
{ path: "results.item.fields.score" },
|
|
130
|
+
{ path: "results.item.fields.numeric.rightAnswer" }
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
])
|
|
134
|
+
};
|
|
135
|
+
return metadata;
|
|
136
|
+
}
|
|
137
|
+
return __bulkCreateQuiz;
|
|
138
|
+
}
|
|
139
|
+
function bulkCloneQuiz(payload) {
|
|
140
|
+
function __bulkCloneQuiz({ host }) {
|
|
141
|
+
const metadata = {
|
|
142
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
143
|
+
method: "POST",
|
|
144
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.BulkCloneQuiz",
|
|
145
|
+
packageName: PACKAGE_NAME,
|
|
146
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
147
|
+
protoPath: "/v1/bulk/quizzes/clone",
|
|
148
|
+
data: payload,
|
|
149
|
+
host
|
|
150
|
+
}),
|
|
151
|
+
data: payload,
|
|
152
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
153
|
+
{
|
|
154
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
155
|
+
paths: [
|
|
156
|
+
{ path: "results.item.createdDate" },
|
|
157
|
+
{ path: "results.item.updatedDate" }
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
162
|
+
paths: [
|
|
163
|
+
{ path: "results.item.fields.score" },
|
|
164
|
+
{ path: "results.item.fields.numeric.rightAnswer" }
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
])
|
|
168
|
+
};
|
|
169
|
+
return metadata;
|
|
170
|
+
}
|
|
171
|
+
return __bulkCloneQuiz;
|
|
172
|
+
}
|
|
173
|
+
function getQuiz(payload) {
|
|
174
|
+
function __getQuiz({ host }) {
|
|
175
|
+
const metadata = {
|
|
176
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
177
|
+
method: "GET",
|
|
178
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.GetQuiz",
|
|
179
|
+
packageName: PACKAGE_NAME,
|
|
180
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
181
|
+
protoPath: "/v1/quizzes/{quizId}",
|
|
182
|
+
data: payload,
|
|
183
|
+
host
|
|
184
|
+
}),
|
|
185
|
+
params: toURLSearchParams(payload),
|
|
186
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
187
|
+
{
|
|
188
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
189
|
+
paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
193
|
+
paths: [
|
|
194
|
+
{ path: "quiz.fields.score" },
|
|
195
|
+
{ path: "quiz.fields.numeric.rightAnswer" }
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
])
|
|
199
|
+
};
|
|
200
|
+
return metadata;
|
|
201
|
+
}
|
|
202
|
+
return __getQuiz;
|
|
203
|
+
}
|
|
204
|
+
function deleteQuiz(payload) {
|
|
205
|
+
function __deleteQuiz({ host }) {
|
|
206
|
+
const metadata = {
|
|
207
|
+
entityFqdn: "wix.achievements.quizzes.v1.quiz",
|
|
208
|
+
method: "DELETE",
|
|
209
|
+
methodFqn: "wix.achievements.quizzes.v1.QuizService.DeleteQuiz",
|
|
210
|
+
packageName: PACKAGE_NAME,
|
|
211
|
+
url: resolveWixAchievementsQuizzesV1QuizServiceUrl({
|
|
212
|
+
protoPath: "/v1/quizzes/{quizId}",
|
|
213
|
+
data: payload,
|
|
214
|
+
host
|
|
215
|
+
}),
|
|
216
|
+
params: toURLSearchParams(payload),
|
|
217
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
218
|
+
{
|
|
219
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
220
|
+
paths: [{ path: "quiz.createdDate" }, { path: "quiz.updatedDate" }]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
224
|
+
paths: [
|
|
225
|
+
{ path: "quiz.fields.score" },
|
|
226
|
+
{ path: "quiz.fields.numeric.rightAnswer" }
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
])
|
|
230
|
+
};
|
|
231
|
+
return metadata;
|
|
232
|
+
}
|
|
233
|
+
return __deleteQuiz;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// src/achievements-quizzes-v1-quiz-quizzes.meta.ts
|
|
237
|
+
function createQuiz2() {
|
|
238
|
+
const payload = {};
|
|
239
|
+
const getRequestOptions = createQuiz(payload);
|
|
240
|
+
const getUrl = (context) => {
|
|
241
|
+
const { url } = getRequestOptions(context);
|
|
242
|
+
return url;
|
|
243
|
+
};
|
|
244
|
+
return {
|
|
245
|
+
getUrl,
|
|
246
|
+
httpMethod: "POST",
|
|
247
|
+
path: "/v1/quizzes",
|
|
248
|
+
pathParams: {},
|
|
249
|
+
__requestType: null,
|
|
250
|
+
__originalRequestType: null,
|
|
251
|
+
__responseType: null,
|
|
252
|
+
__originalResponseType: null
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
function cloneQuiz2() {
|
|
256
|
+
const payload = { quizId: ":quizId" };
|
|
257
|
+
const getRequestOptions = cloneQuiz(payload);
|
|
258
|
+
const getUrl = (context) => {
|
|
259
|
+
const { url } = getRequestOptions(context);
|
|
260
|
+
return url;
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
getUrl,
|
|
264
|
+
httpMethod: "POST",
|
|
265
|
+
path: "/v1/quizzes/{quizId}/clone",
|
|
266
|
+
pathParams: { quizId: "quizId" },
|
|
267
|
+
__requestType: null,
|
|
268
|
+
__originalRequestType: null,
|
|
269
|
+
__responseType: null,
|
|
270
|
+
__originalResponseType: null
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function bulkCreateQuiz2() {
|
|
274
|
+
const payload = {};
|
|
275
|
+
const getRequestOptions = bulkCreateQuiz(payload);
|
|
276
|
+
const getUrl = (context) => {
|
|
277
|
+
const { url } = getRequestOptions(context);
|
|
278
|
+
return url;
|
|
279
|
+
};
|
|
280
|
+
return {
|
|
281
|
+
getUrl,
|
|
282
|
+
httpMethod: "POST",
|
|
283
|
+
path: "/v1/bulk/quizzes/create",
|
|
284
|
+
pathParams: {},
|
|
285
|
+
__requestType: null,
|
|
286
|
+
__originalRequestType: null,
|
|
287
|
+
__responseType: null,
|
|
288
|
+
__originalResponseType: null
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function bulkCloneQuiz2() {
|
|
292
|
+
const payload = {};
|
|
293
|
+
const getRequestOptions = bulkCloneQuiz(payload);
|
|
294
|
+
const getUrl = (context) => {
|
|
295
|
+
const { url } = getRequestOptions(context);
|
|
296
|
+
return url;
|
|
297
|
+
};
|
|
298
|
+
return {
|
|
299
|
+
getUrl,
|
|
300
|
+
httpMethod: "POST",
|
|
301
|
+
path: "/v1/bulk/quizzes/clone",
|
|
302
|
+
pathParams: {},
|
|
303
|
+
__requestType: null,
|
|
304
|
+
__originalRequestType: null,
|
|
305
|
+
__responseType: null,
|
|
306
|
+
__originalResponseType: null
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function getQuiz2() {
|
|
310
|
+
const payload = { quizId: ":quizId" };
|
|
311
|
+
const getRequestOptions = getQuiz(payload);
|
|
312
|
+
const getUrl = (context) => {
|
|
313
|
+
const { url } = getRequestOptions(context);
|
|
314
|
+
return url;
|
|
315
|
+
};
|
|
316
|
+
return {
|
|
317
|
+
getUrl,
|
|
318
|
+
httpMethod: "GET",
|
|
319
|
+
path: "/v1/quizzes/{quizId}",
|
|
320
|
+
pathParams: { quizId: "quizId" },
|
|
321
|
+
__requestType: null,
|
|
322
|
+
__originalRequestType: null,
|
|
323
|
+
__responseType: null,
|
|
324
|
+
__originalResponseType: null
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function deleteQuiz2() {
|
|
328
|
+
const payload = { quizId: ":quizId" };
|
|
329
|
+
const getRequestOptions = deleteQuiz(payload);
|
|
330
|
+
const getUrl = (context) => {
|
|
331
|
+
const { url } = getRequestOptions(context);
|
|
332
|
+
return url;
|
|
333
|
+
};
|
|
334
|
+
return {
|
|
335
|
+
getUrl,
|
|
336
|
+
httpMethod: "DELETE",
|
|
337
|
+
path: "/v1/quizzes/{quizId}",
|
|
338
|
+
pathParams: { quizId: "quizId" },
|
|
339
|
+
__requestType: null,
|
|
340
|
+
__originalRequestType: null,
|
|
341
|
+
__responseType: null,
|
|
342
|
+
__originalResponseType: null
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
export {
|
|
346
|
+
bulkCloneQuiz2 as bulkCloneQuiz,
|
|
347
|
+
bulkCreateQuiz2 as bulkCreateQuiz,
|
|
348
|
+
cloneQuiz2 as cloneQuiz,
|
|
349
|
+
createQuiz2 as createQuiz,
|
|
350
|
+
deleteQuiz2 as deleteQuiz,
|
|
351
|
+
getQuiz2 as getQuiz
|
|
352
|
+
};
|
|
353
|
+
//# sourceMappingURL=meta.mjs.map
|