@behio/storefront-sdk 0.37.0 → 0.41.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/dist/{chunk-QKEW2EU5.js → chunk-3TPJG2WV.js} +589 -145
- package/dist/{chunk-5C6MNGGB.mjs → chunk-QOZYQMK2.mjs} +587 -143
- package/dist/{client-BgYibdTK.d.mts → client-sN7fZvjG.d.mts} +363 -7
- package/dist/{client-BgYibdTK.d.ts → client-sN7fZvjG.d.ts} +363 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +142 -40
- package/dist/index.mjs +111 -9
- package/dist/next.d.mts +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +2 -2
- package/dist/next.mjs +1 -1
- package/dist/react.d.mts +3026 -4
- package/dist/react.d.ts +3026 -4
- package/dist/react.js +2612 -467
- package/dist/react.mjs +2128 -86
- package/package.json +2 -2
- package/dist/chunk-CZRSJULD.js +0 -118
- package/dist/chunk-QUU76QUB.mjs +0 -118
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface BehioStorefrontConfig {
|
|
2
2
|
/** API key (public: pk_live_xxx or private: sk_live_xxx) */
|
|
3
3
|
apiKey: string;
|
|
4
|
-
/** Backend base URL. Default: https://
|
|
4
|
+
/** Backend base URL. Default: https://be.behio.com */
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
/**
|
|
7
7
|
* The domain this storefront is served on (e.g. "mujshop.cz"), sent as
|
|
@@ -339,6 +339,31 @@ interface ProductListItem {
|
|
|
339
339
|
/** `null` when prices are gated behind login for guests (B2B mode). */
|
|
340
340
|
price: ProductPrice | null;
|
|
341
341
|
inStock: boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Launch okno: sale window opens at this time (epoch ms); null/undefined =
|
|
344
|
+
* on sale since publish. Before it the product is visible but NOT
|
|
345
|
+
* purchasable — render a "Prodej startuje za ..." countdown instead of the
|
|
346
|
+
* buy button.
|
|
347
|
+
*/
|
|
348
|
+
saleStartAt?: number | null;
|
|
349
|
+
/** Sale window closes at this time (epoch ms); null/undefined = never closes. */
|
|
350
|
+
saleEndAt?: number | null;
|
|
351
|
+
/**
|
|
352
|
+
* Server-resolved "can this be bought RIGHT NOW": the sale window is open
|
|
353
|
+
* AND the product can be ordered (in stock, or the shop sells beyond
|
|
354
|
+
* stock). The cart/checkout enforce the same rule server-side — use this to
|
|
355
|
+
* disable the buy button, never re-derive the rule client-side.
|
|
356
|
+
*/
|
|
357
|
+
isPurchasable: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Early bird (time-based launch price) is active: `price.amount` already IS
|
|
360
|
+
* the discounted early-bird amount and the regular price sits in
|
|
361
|
+
* `price.compareAtPrice`. Applies in the eshop default currency only.
|
|
362
|
+
*/
|
|
363
|
+
earlyBirdActive: boolean;
|
|
364
|
+
/** When the active early bird ends (epoch ms) — render "Early bird do ...".
|
|
365
|
+
* Null when no early bird is active. */
|
|
366
|
+
earlyBirdUntil?: number | null;
|
|
342
367
|
/** Exact remaining stock, or `null` when the merchant hides the count
|
|
343
368
|
* (showStockCount off) — treat null as "unknown", never as 0. */
|
|
344
369
|
stockQuantity?: number | null;
|
|
@@ -404,7 +429,7 @@ interface ProductPromotionSummary {
|
|
|
404
429
|
badgeText: string | null;
|
|
405
430
|
/** Merchant hex badge color; null falls back to the shop's sale color. */
|
|
406
431
|
badgeColor: string | null;
|
|
407
|
-
discountType:
|
|
432
|
+
discountType: "PERCENTAGE" | "FIXED_AMOUNT" | "BUY_X_GET_Y";
|
|
408
433
|
discountValue: number;
|
|
409
434
|
/** Promotion end (epoch ms), or null for open-ended. */
|
|
410
435
|
endsAt: number | null;
|
|
@@ -413,8 +438,8 @@ interface ProductPromotionSummary {
|
|
|
413
438
|
}
|
|
414
439
|
/** A single responsive derivative (size + format) of a media image. */
|
|
415
440
|
interface ProductMediaVariant {
|
|
416
|
-
variant:
|
|
417
|
-
format:
|
|
441
|
+
variant: "thumb" | "medium" | "large" | "xlarge";
|
|
442
|
+
format: "jpeg" | "webp" | "avif";
|
|
418
443
|
url: string;
|
|
419
444
|
width: number;
|
|
420
445
|
height: number;
|
|
@@ -427,7 +452,7 @@ interface ProductMediaVariant {
|
|
|
427
452
|
*/
|
|
428
453
|
interface ProductMedia {
|
|
429
454
|
id: string;
|
|
430
|
-
type:
|
|
455
|
+
type: "IMAGE" | "VIDEO";
|
|
431
456
|
/** Original uploaded file URL. */
|
|
432
457
|
url: string;
|
|
433
458
|
alt?: string | null;
|
|
@@ -452,7 +477,7 @@ interface VariantAxisValue {
|
|
|
452
477
|
*/
|
|
453
478
|
interface VariantAxis {
|
|
454
479
|
name: string;
|
|
455
|
-
displayType:
|
|
480
|
+
displayType: "DROPDOWN" | "BUTTON" | "SWATCH_COLOR" | "SWATCH_IMAGE";
|
|
456
481
|
order: number;
|
|
457
482
|
/** Values present among the purchasable variants, in admin-defined order. */
|
|
458
483
|
values: VariantAxisValue[];
|
|
@@ -1108,6 +1133,242 @@ interface DigitalDownload {
|
|
|
1108
1133
|
isMaxedOut: boolean;
|
|
1109
1134
|
createdAt: number;
|
|
1110
1135
|
}
|
|
1136
|
+
/** One enrolled course on the customer's "My courses" list. */
|
|
1137
|
+
interface CourseListItem {
|
|
1138
|
+
courseId: string;
|
|
1139
|
+
/** Localized course (product) name, best-effort. */
|
|
1140
|
+
name: string | null;
|
|
1141
|
+
/** Product slug for linking to the PDP. */
|
|
1142
|
+
slug: string;
|
|
1143
|
+
imageUrl: string | null;
|
|
1144
|
+
totalLessons: number;
|
|
1145
|
+
completedLessons: number;
|
|
1146
|
+
enrolledAt: number;
|
|
1147
|
+
/** Access expiry (epoch ms, null = never expires). */
|
|
1148
|
+
expiresAt: number | null;
|
|
1149
|
+
isExpired: boolean;
|
|
1150
|
+
/**
|
|
1151
|
+
* Course content opens at this time (epoch ms); null/undefined = already
|
|
1152
|
+
* open. While in the future, render "Startujeme ..." + countdown.
|
|
1153
|
+
*/
|
|
1154
|
+
contentAvailableFrom?: number | null;
|
|
1155
|
+
}
|
|
1156
|
+
/** Downloadable attachment on a course lesson. */
|
|
1157
|
+
interface CourseAttachment {
|
|
1158
|
+
name: string;
|
|
1159
|
+
url: string;
|
|
1160
|
+
fileSize?: number;
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* One lesson in the course player. Locked lessons (drip unlocking) expose
|
|
1164
|
+
* only the title and `unlockAt` — `videoUrl`/`content`/`attachments` are
|
|
1165
|
+
* null/empty until the lesson unlocks server-side.
|
|
1166
|
+
*/
|
|
1167
|
+
interface CourseLesson {
|
|
1168
|
+
id: string;
|
|
1169
|
+
title: string;
|
|
1170
|
+
isPreview: boolean;
|
|
1171
|
+
isUnlocked: boolean;
|
|
1172
|
+
/** When a locked lesson unlocks (epoch ms). Null once unlocked. */
|
|
1173
|
+
unlockAt: number | null;
|
|
1174
|
+
isCompleted: boolean;
|
|
1175
|
+
videoUrl: string | null;
|
|
1176
|
+
content: string | null;
|
|
1177
|
+
attachments: CourseAttachment[];
|
|
1178
|
+
/**
|
|
1179
|
+
* Number of quiz questions on this lesson (0 = no quiz). Load the quiz via
|
|
1180
|
+
* `customer.getLessonQuiz()` once the lesson is unlocked.
|
|
1181
|
+
*/
|
|
1182
|
+
quizQuestionCount: number;
|
|
1183
|
+
}
|
|
1184
|
+
interface CourseModule {
|
|
1185
|
+
id: string;
|
|
1186
|
+
title: string;
|
|
1187
|
+
lessons: CourseLesson[];
|
|
1188
|
+
}
|
|
1189
|
+
/** Full course player payload for an enrolled customer. */
|
|
1190
|
+
interface CourseDetail {
|
|
1191
|
+
courseId: string;
|
|
1192
|
+
name: string | null;
|
|
1193
|
+
slug: string;
|
|
1194
|
+
imageUrl: string | null;
|
|
1195
|
+
/** Welcome text shown at the top of the member area (markdown). */
|
|
1196
|
+
welcomeText: string | null;
|
|
1197
|
+
/**
|
|
1198
|
+
* AI tutor ("Ask about this lesson") is available on unlocked lessons —
|
|
1199
|
+
* render the tutor widget only when true.
|
|
1200
|
+
*/
|
|
1201
|
+
aiTutorEnabled: boolean;
|
|
1202
|
+
/**
|
|
1203
|
+
* Lesson discussion (comments) is available on unlocked lessons — render
|
|
1204
|
+
* the discussion widget only when true.
|
|
1205
|
+
*/
|
|
1206
|
+
discussionEnabled: boolean;
|
|
1207
|
+
/**
|
|
1208
|
+
* Course content opens at this time (epoch ms); null/undefined = already
|
|
1209
|
+
* open. While in the future EVERY lesson (including previews) is locked
|
|
1210
|
+
* with `unlockAt >= contentAvailableFrom` — render "Startujeme ..." +
|
|
1211
|
+
* countdown in the member area.
|
|
1212
|
+
*/
|
|
1213
|
+
contentAvailableFrom?: number | null;
|
|
1214
|
+
enrolledAt: number;
|
|
1215
|
+
expiresAt: number | null;
|
|
1216
|
+
totalLessons: number;
|
|
1217
|
+
completedLessons: number;
|
|
1218
|
+
modules: CourseModule[];
|
|
1219
|
+
/**
|
|
1220
|
+
* Completion certificate, present once the course is 100 % finished and the
|
|
1221
|
+
* merchant has certificates enabled. Verify the code publicly via
|
|
1222
|
+
* `certificates.verify(code)`.
|
|
1223
|
+
*/
|
|
1224
|
+
certificate?: {
|
|
1225
|
+
code: string;
|
|
1226
|
+
issuedAt: number;
|
|
1227
|
+
} | null;
|
|
1228
|
+
}
|
|
1229
|
+
/** Progress snapshot returned after completing a lesson. */
|
|
1230
|
+
interface CourseProgress {
|
|
1231
|
+
courseId: string;
|
|
1232
|
+
lessonId: string;
|
|
1233
|
+
totalLessons: number;
|
|
1234
|
+
completedLessons: number;
|
|
1235
|
+
}
|
|
1236
|
+
/** One quiz question. Correct answers are never exposed before submitting. */
|
|
1237
|
+
interface QuizQuestion {
|
|
1238
|
+
id: string;
|
|
1239
|
+
question: string;
|
|
1240
|
+
/** Option texts in order; submit the chosen option's index. */
|
|
1241
|
+
options: string[];
|
|
1242
|
+
}
|
|
1243
|
+
interface LessonQuiz {
|
|
1244
|
+
courseId: string;
|
|
1245
|
+
lessonId: string;
|
|
1246
|
+
/** Minimum score (in %) that completes the lesson automatically. */
|
|
1247
|
+
passPercent: number;
|
|
1248
|
+
questions: QuizQuestion[];
|
|
1249
|
+
}
|
|
1250
|
+
interface QuizAnswerInput {
|
|
1251
|
+
questionId: string;
|
|
1252
|
+
/** Index of the chosen option (0-based). */
|
|
1253
|
+
selectedIndex: number;
|
|
1254
|
+
}
|
|
1255
|
+
interface QuizAnswerResult {
|
|
1256
|
+
questionId: string;
|
|
1257
|
+
/** Echo of the submitted choice; null when unanswered or out of range. */
|
|
1258
|
+
selectedIndex: number | null;
|
|
1259
|
+
/** Correct option index, revealed only after submitting. */
|
|
1260
|
+
correctIndex: number;
|
|
1261
|
+
correct: boolean;
|
|
1262
|
+
}
|
|
1263
|
+
interface QuizResult {
|
|
1264
|
+
courseId: string;
|
|
1265
|
+
lessonId: string;
|
|
1266
|
+
totalQuestions: number;
|
|
1267
|
+
correctCount: number;
|
|
1268
|
+
scorePercent: number;
|
|
1269
|
+
passPercent: number;
|
|
1270
|
+
passed: boolean;
|
|
1271
|
+
/** True when the passing score marked the lesson completed. */
|
|
1272
|
+
lessonCompleted: boolean;
|
|
1273
|
+
results: QuizAnswerResult[];
|
|
1274
|
+
/** Course progress after a passing submit; null when not passed. */
|
|
1275
|
+
progress: {
|
|
1276
|
+
totalLessons: number;
|
|
1277
|
+
completedLessons: number;
|
|
1278
|
+
} | null;
|
|
1279
|
+
}
|
|
1280
|
+
/** One exchange in the private AI tutor thread: question + answer. */
|
|
1281
|
+
interface CourseTutorMessage {
|
|
1282
|
+
id: string;
|
|
1283
|
+
/** The student's question. */
|
|
1284
|
+
question: string;
|
|
1285
|
+
/** The AI tutor's answer (plain text / light markdown). */
|
|
1286
|
+
answer: string;
|
|
1287
|
+
createdAt: number;
|
|
1288
|
+
}
|
|
1289
|
+
/** The student's private tutor thread for one lesson. */
|
|
1290
|
+
interface CourseTutorThread {
|
|
1291
|
+
courseId: string;
|
|
1292
|
+
lessonId: string;
|
|
1293
|
+
/** False when the merchant disabled the AI tutor — hide the widget. */
|
|
1294
|
+
enabled: boolean;
|
|
1295
|
+
/** Oldest first. */
|
|
1296
|
+
items: CourseTutorMessage[];
|
|
1297
|
+
}
|
|
1298
|
+
/** A one-level reply under a top-level lesson comment. */
|
|
1299
|
+
interface CourseCommentReply {
|
|
1300
|
+
id: string;
|
|
1301
|
+
/** Id of the parent (top-level) comment. */
|
|
1302
|
+
parentId: string;
|
|
1303
|
+
body: string;
|
|
1304
|
+
/** Author's first name, or a masked e-mail when no name is known. */
|
|
1305
|
+
authorName: string;
|
|
1306
|
+
/** True when the logged-in customer wrote this reply (can delete it). */
|
|
1307
|
+
isMine: boolean;
|
|
1308
|
+
createdAt: number;
|
|
1309
|
+
}
|
|
1310
|
+
/** A top-level comment under a lesson, with one level of replies. */
|
|
1311
|
+
interface CourseComment {
|
|
1312
|
+
id: string;
|
|
1313
|
+
body: string;
|
|
1314
|
+
/** Author's first name, or a masked e-mail when no name is known. */
|
|
1315
|
+
authorName: string;
|
|
1316
|
+
/** True when the logged-in customer wrote this comment (can delete it). */
|
|
1317
|
+
isMine: boolean;
|
|
1318
|
+
createdAt: number;
|
|
1319
|
+
/** Oldest first. */
|
|
1320
|
+
replies: CourseCommentReply[];
|
|
1321
|
+
}
|
|
1322
|
+
/** Paginated lesson discussion (top-level comments, newest first). */
|
|
1323
|
+
interface CourseCommentsList {
|
|
1324
|
+
courseId: string;
|
|
1325
|
+
lessonId: string;
|
|
1326
|
+
/** False when the merchant disabled the discussion — hide the widget. */
|
|
1327
|
+
enabled: boolean;
|
|
1328
|
+
/** 1-based page of top-level comments. */
|
|
1329
|
+
page: number;
|
|
1330
|
+
pageSize: number;
|
|
1331
|
+
/** Total count of top-level comments on the lesson. */
|
|
1332
|
+
totalCount: number;
|
|
1333
|
+
items: CourseComment[];
|
|
1334
|
+
}
|
|
1335
|
+
/** The comment (or reply) just posted by the logged-in customer. */
|
|
1336
|
+
interface CoursePostedComment {
|
|
1337
|
+
id: string;
|
|
1338
|
+
/** Id of the parent comment when this is a reply; null for top-level. */
|
|
1339
|
+
parentId?: string | null;
|
|
1340
|
+
body: string;
|
|
1341
|
+
authorName: string;
|
|
1342
|
+
isMine: boolean;
|
|
1343
|
+
createdAt: number;
|
|
1344
|
+
}
|
|
1345
|
+
/** The student's private note for one lesson (visible only to them). */
|
|
1346
|
+
interface LessonNote {
|
|
1347
|
+
courseId: string;
|
|
1348
|
+
lessonId: string;
|
|
1349
|
+
/** The note text; empty string when no note exists yet. */
|
|
1350
|
+
body: string;
|
|
1351
|
+
/** Last save time (epoch ms); null when no note exists yet. */
|
|
1352
|
+
updatedAt: number | null;
|
|
1353
|
+
}
|
|
1354
|
+
/** One completion certificate on the customer's account. */
|
|
1355
|
+
interface CourseCertificate {
|
|
1356
|
+
courseId: string;
|
|
1357
|
+
courseName: string | null;
|
|
1358
|
+
/** Public verification code (share it, verify via `certificates.verify`). */
|
|
1359
|
+
code: string;
|
|
1360
|
+
issuedAt: number;
|
|
1361
|
+
}
|
|
1362
|
+
/** Public verification payload for a certificate code. */
|
|
1363
|
+
interface CertificateVerification {
|
|
1364
|
+
valid: boolean;
|
|
1365
|
+
code: string;
|
|
1366
|
+
courseId: string;
|
|
1367
|
+
courseName: string | null;
|
|
1368
|
+
/** Student's name, or a masked e-mail when no name is known. */
|
|
1369
|
+
studentName: string;
|
|
1370
|
+
issuedAt: number;
|
|
1371
|
+
}
|
|
1111
1372
|
/** Short-lived signed URL to fetch a purchased digital file. */
|
|
1112
1373
|
interface DownloadUrl {
|
|
1113
1374
|
/** Short-lived (15 min) signed URL. */
|
|
@@ -1812,6 +2073,7 @@ declare class BehioStorefront {
|
|
|
1812
2073
|
readonly shipping: ShippingModule;
|
|
1813
2074
|
readonly newsletter: NewsletterModule;
|
|
1814
2075
|
readonly subscriptions: SubscriptionsModule;
|
|
2076
|
+
readonly certificates: CourseCertificatesModule;
|
|
1815
2077
|
/**
|
|
1816
2078
|
* Called by the analytics tracker when the visitor grants (id) or revokes
|
|
1817
2079
|
* (null) analytics consent. When set, requests carry the X-Behio-Vid header
|
|
@@ -1942,6 +2204,13 @@ declare class BehioStorefront {
|
|
|
1942
2204
|
signal?: AbortSignal;
|
|
1943
2205
|
headers?: Record<string, string>;
|
|
1944
2206
|
}): Promise<SdkResult<T>>;
|
|
2207
|
+
/**
|
|
2208
|
+
* Binary GET (PDF downloads). Same auth headers as `request()`, but the
|
|
2209
|
+
* response is returned as a Blob instead of parsed JSON.
|
|
2210
|
+
*
|
|
2211
|
+
* @internal — use the typed module methods (behio.certificates.downloadPdf).
|
|
2212
|
+
*/
|
|
2213
|
+
requestBlob(path: string): Promise<SdkResult<Blob>>;
|
|
1945
2214
|
/**
|
|
1946
2215
|
* Throws on failure (API error / network / timeout). Kept private so
|
|
1947
2216
|
* internal auth refresh recursion keeps its existing control flow —
|
|
@@ -2218,6 +2487,93 @@ declare class CustomerModule {
|
|
|
2218
2487
|
* server-side. Requires an authenticated customer session.
|
|
2219
2488
|
*/
|
|
2220
2489
|
getDownloadUrl(downloadId: string): Promise<SdkResult<DownloadUrl>>;
|
|
2490
|
+
/**
|
|
2491
|
+
* Online courses (LMS): list the logged-in customer's enrolled courses
|
|
2492
|
+
* with progress. Enrollment is created automatically when an order with a
|
|
2493
|
+
* course product is paid. Requires an authenticated customer session.
|
|
2494
|
+
*/
|
|
2495
|
+
getCourses(): Promise<SdkResult<{
|
|
2496
|
+
items: CourseListItem[];
|
|
2497
|
+
}>>;
|
|
2498
|
+
/**
|
|
2499
|
+
* Course player payload: modules and lessons in order, with per-lesson
|
|
2500
|
+
* drip-unlock state. Locked lessons never contain content — the server
|
|
2501
|
+
* withholds `videoUrl`/`content`/`attachments` until `unlockAt`.
|
|
2502
|
+
*/
|
|
2503
|
+
getCourse(courseId: string): Promise<SdkResult<CourseDetail>>;
|
|
2504
|
+
/** Mark an unlocked lesson as completed (idempotent). */
|
|
2505
|
+
completeLesson(courseId: string, lessonId: string): Promise<SdkResult<CourseProgress>>;
|
|
2506
|
+
/**
|
|
2507
|
+
* Quiz for an unlocked lesson. Correct answers are never included — scoring
|
|
2508
|
+
* happens server-side in `submitLessonQuiz`. Locked lessons return 403.
|
|
2509
|
+
*/
|
|
2510
|
+
getLessonQuiz(courseId: string, lessonId: string): Promise<SdkResult<LessonQuiz>>;
|
|
2511
|
+
/**
|
|
2512
|
+
* Submit quiz answers: returns the score, reveals correct answers and, when
|
|
2513
|
+
* the score reaches `passPercent` (70 %), marks the lesson completed
|
|
2514
|
+
* automatically.
|
|
2515
|
+
*/
|
|
2516
|
+
submitLessonQuiz(courseId: string, lessonId: string, answers: QuizAnswerInput[]): Promise<SdkResult<QuizResult>>;
|
|
2517
|
+
/**
|
|
2518
|
+
* Completion certificates of the logged-in customer. Each carries a public
|
|
2519
|
+
* verification code for sharing (LinkedIn, CV).
|
|
2520
|
+
*/
|
|
2521
|
+
getCourseCertificates(): Promise<SdkResult<{
|
|
2522
|
+
items: CourseCertificate[];
|
|
2523
|
+
}>>;
|
|
2524
|
+
/**
|
|
2525
|
+
* AI tutor "Ask about this lesson": the student's private thread for one
|
|
2526
|
+
* lesson (oldest first). `enabled: false` = the merchant turned the tutor
|
|
2527
|
+
* off — hide the widget. Locked lessons return 403.
|
|
2528
|
+
*/
|
|
2529
|
+
getLessonTutorThread(courseId: string, lessonId: string): Promise<SdkResult<CourseTutorThread>>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Ask the AI tutor a question about the lesson. The answer sticks to the
|
|
2532
|
+
* lesson topic and comes back in the language of the question (Czech by
|
|
2533
|
+
* default). Rate limited (20/min); 403 on locked lessons or when the
|
|
2534
|
+
* merchant disabled the tutor.
|
|
2535
|
+
*/
|
|
2536
|
+
askLessonTutor(courseId: string, lessonId: string, question: string): Promise<SdkResult<CourseTutorMessage>>;
|
|
2537
|
+
/**
|
|
2538
|
+
* Lesson discussion: paginated top-level comments (newest first) with one
|
|
2539
|
+
* level of replies. Only enrolled customers with the lesson unlocked; 403
|
|
2540
|
+
* when the merchant disabled the discussion.
|
|
2541
|
+
*/
|
|
2542
|
+
getLessonComments(courseId: string, lessonId: string, page?: number): Promise<SdkResult<CourseCommentsList>>;
|
|
2543
|
+
/**
|
|
2544
|
+
* Post a comment under the lesson, or a reply when `parentId` points to a
|
|
2545
|
+
* top-level comment (replies go one level deep only). Max 5000 characters.
|
|
2546
|
+
*/
|
|
2547
|
+
postLessonComment(courseId: string, lessonId: string, body: string, parentId?: string): Promise<SdkResult<CoursePostedComment>>;
|
|
2548
|
+
/**
|
|
2549
|
+
* Delete the customer's OWN comment (including its replies). Someone
|
|
2550
|
+
* else's comment returns 404.
|
|
2551
|
+
*/
|
|
2552
|
+
deleteLessonComment(courseId: string, lessonId: string, commentId: string): Promise<SdkResult<void>>;
|
|
2553
|
+
/**
|
|
2554
|
+
* The student's private note for one lesson. `body` is an empty string
|
|
2555
|
+
* when no note exists yet. Visible only to the logged-in student.
|
|
2556
|
+
*/
|
|
2557
|
+
getLessonNote(courseId: string, lessonId: string): Promise<SdkResult<LessonNote>>;
|
|
2558
|
+
/**
|
|
2559
|
+
* Save (upsert) the student's private lesson note. Autosave-friendly; an
|
|
2560
|
+
* empty string clears the note. Max 20 000 characters.
|
|
2561
|
+
*/
|
|
2562
|
+
saveLessonNote(courseId: string, lessonId: string, body: string): Promise<SdkResult<LessonNote>>;
|
|
2563
|
+
}
|
|
2564
|
+
declare class CourseCertificatesModule {
|
|
2565
|
+
private client;
|
|
2566
|
+
constructor(client: BehioStorefront);
|
|
2567
|
+
/**
|
|
2568
|
+
* Publicly verify a certificate code (no customer login needed) — build a
|
|
2569
|
+
* `/certifikat/{code}` page with this. Unknown codes return a 404 error.
|
|
2570
|
+
*/
|
|
2571
|
+
verify(code: string): Promise<SdkResult<CertificateVerification>>;
|
|
2572
|
+
/**
|
|
2573
|
+
* Download the certificate as a branded PDF (A5 landscape). Returns a Blob;
|
|
2574
|
+
* trigger a browser download via `URL.createObjectURL(blob)`.
|
|
2575
|
+
*/
|
|
2576
|
+
downloadPdf(code: string): Promise<SdkResult<Blob>>;
|
|
2221
2577
|
}
|
|
2222
2578
|
declare class PagesModule {
|
|
2223
2579
|
private client;
|
|
@@ -2408,4 +2764,4 @@ declare class NewsletterModule {
|
|
|
2408
2764
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
2409
2765
|
}
|
|
2410
2766
|
|
|
2411
|
-
export { type
|
|
2767
|
+
export { type DownloadUrl as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type CheckoutAddress as D, type CheckoutInput as E, type CheckoutPaymentMethod as F, type CheckoutSettings as G, type CookieConsentInput as H, type CourseAttachment as I, type CourseCertificate as J, type CourseComment as K, type CourseCommentReply as L, type CourseCommentsList as M, type CourseDetail as N, type CourseLesson as O, type CourseListItem as P, type CourseModule as Q, type CoursePostedComment as R, type SdkResult as S, type CourseProgress as T, type CourseTutorMessage as U, type CourseTutorThread as V, type CrossSellItem as W, type CustomerAddress as X, type CustomerProfile as Y, type DataGroupFieldType as Z, type DigitalDownload as _, type AddToCartInput as a, type ProductPrice as a$, type Facet as a0, type FacetAvailability as a1, type FacetCategory as a2, type FacetLabel as a3, type FacetPriceRange as a4, type FacetRange as a5, type FacetRatingBucket as a6, type FacetValue as a7, type FacetsResponse as a8, type FilterField as a9, type OrderAccessVerifyResponse as aA, type OrderDetail as aB, type OrderItem as aC, type OrderListItem as aD, type OrderStatus as aE, type OrderStatusHistory as aF, OrderStatuses as aG, type OrderTracking as aH, type Page as aI, type PageAttachment as aJ, type PageDetail as aK, type PaginatedResponse as aL, type PaymentStatus as aM, PaymentStatuses as aN, type PickupPoint as aO, type PickupPointHours as aP, type PickupPointsInput as aQ, type PriceDisplay as aR, type ProductAvailability as aS, type ProductCustomField as aT, type ProductCustomFieldGroup as aU, type ProductDetail as aV, type ProductGroup as aW, type ProductLabel as aX, type ProductListItem as aY, type ProductMedia as aZ, type ProductMediaVariant as a_, type FulfillmentStatus as aa, FulfillmentStatuses as ab, type GiftCardBalance as ac, type GiftCardPurchaseInput as ad, type GiftCardPurchaseResult as ae, type GiftCardSummary as af, type LessonNote as ag, type LessonQuiz as ah, type LoginInput as ai, type LoyaltyBalance as aj, type LoyaltyNextTier as ak, type LoyaltyProgram as al, type LoyaltySummary as am, type LoyaltyTier as an, type LoyaltyTierPerks as ao, type LoyaltyTransaction as ap, type Menu as aq, type MenuItem as ar, type MenuItemRef as as, type MenuItemType as at, type MessageResponse as au, type NewsletterOptInDefault as av, type NewsletterSubscribeInput as aw, type NewsletterSubscribeResult as ax, type NewsletterUnsubscribeResult as ay, type OrderAccessRequestResponse as az, type AddressDetail as b, type ProductPromotionSummary as b0, type ProductReview as b1, type ProductReviewsResponse as b2, ProductSort as b3, type ProductSortValue as b4, type ProductVariant as b5, type ProductVolumePrice as b6, type ProductsQuery as b7, type QuizAnswerInput as b8, type QuizAnswerResult as b9, type ShopSeoIdentity as bA, type StockBehavior as bB, type StockMode as bC, type SubmitQuoteInput as bD, type SubmitReturnInput as bE, type SubmitReviewInput as bF, type Subscription as bG, type SubscriptionAction as bH, type SubscriptionFrequency as bI, type SubscriptionItem as bJ, type SubscriptionStatus as bK, type TaxBreakdownLine as bL, type VariantAxis as bM, type VariantAxisValue as bN, type WishlistItem as bO, err as bP, ok as bQ, toSdkError as bR, type QuizQuestion as ba, type QuizResult as bb, type QuoteItem as bc, type QuoteRequest as bd, type RegisterInput as be, type RegisterResult as bf, type RequestInterceptor as bg, type RequestInterceptorConfig as bh, type ResponseInterceptor as bi, type ResponseInterceptorData as bj, type ReturnRequest as bk, type ReturnRequestItem as bl, type ReturnStatus as bm, type ReturnStatusItem as bn, type ReturnableOrder as bo, type ReturnableOrderItem as bp, type SdkError as bq, type ShippingMethodSummary as br, type ShippingQuote as bs, type ShippingQuoteInput as bt, type ShopInfo as bu, type ShopScript as bv, type ShopScriptPlacement as bw, type ShopScriptType as bx, type ShopScripts as by, type ShopSeo as bz, type AddressSuggestion as c, type AddressType as d, AddressTypes as e, type AuthTokens as f, type BackInStockSubscription as g, type BadgeTone as h, BehioApiError as i, type BehioErrorCode as j, type BehioEventHandler as k, type BehioEventType as l, BehioNetworkError as m, type BehioStorefrontConfig as n, type Bundle as o, type BundleItem as p, type Cart as q, type CartBundleLine as r, type CartBundleLineItem as s, type CartDiscount as t, type CartItem as u, type CartItemProduct as v, type CartPromotion as w, type Category as x, type CategoryDetail as y, type CertificateVerification as z };
|