@behio/storefront-sdk 0.38.0 → 0.42.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-FOUBL2EQ.js → chunk-3TPJG2WV.js} +568 -147
- package/dist/{chunk-MF5LMHZ4.mjs → chunk-QOZYQMK2.mjs} +566 -145
- package/dist/{client-Cb_eHKm9.d.mts → client-B0vlHxB1.d.mts} +312 -6
- package/dist/{client-Cb_eHKm9.d.ts → client-B0vlHxB1.d.ts} +312 -6
- 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 +3022 -4
- package/dist/react.d.ts +3022 -4
- package/dist/react.js +2584 -477
- package/dist/react.mjs +2090 -86
- package/package.json +1 -1
- package/dist/chunk-CZRSJULD.js +0 -118
- package/dist/chunk-QUU76QUB.mjs +0 -118
|
@@ -339,6 +339,61 @@ 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
|
+
* The merchant sells this product ONLY through its variants: "Tričko" on its
|
|
360
|
+
* own means nothing, the shop sells the red one and the yellow one.
|
|
361
|
+
*
|
|
362
|
+
* The product keeps its card, its PDP and its search presence — it simply is
|
|
363
|
+
* not a sellable unit. `isPurchasable` is false and the cart/checkout reject
|
|
364
|
+
* its `id` with a 400, so the shopper must pick a variant first.
|
|
365
|
+
*
|
|
366
|
+
* When this is true, render the headline price as **"od {priceFrom}"** and
|
|
367
|
+
* keep the buy button disabled until a variant is chosen; then switch to that
|
|
368
|
+
* variant's own `price` and add `variant.id` to the cart. `price` still
|
|
369
|
+
* carries the parent's own number for backwards compatibility, but showing it
|
|
370
|
+
* as *the* price would quote 990 and charge 1990 — always label it "od".
|
|
371
|
+
*
|
|
372
|
+
* False for every product without variants, so nothing changes for shops that
|
|
373
|
+
* never turn it on.
|
|
374
|
+
*/
|
|
375
|
+
variantsOnly: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* "From" price: the CHEAPEST variant price, in the requested currency, or
|
|
378
|
+
* null when the product has no variants (or prices are gated behind login in
|
|
379
|
+
* B2B mode). Populated for EVERY variant parent, not only `variantsOnly`
|
|
380
|
+
* ones, so a card can render "od 990 Kč" whenever the template wants to.
|
|
381
|
+
*
|
|
382
|
+
* Computed over the same variant set the PDP lists (published, enabled
|
|
383
|
+
* variants) and deliberately IGNORING stock — a size selling out must not
|
|
384
|
+
* make the advertised price jump. `compareAtPrice` carries that same
|
|
385
|
+
* variant's strike-through price when it has one.
|
|
386
|
+
*/
|
|
387
|
+
priceFrom?: ProductPrice | null;
|
|
388
|
+
/**
|
|
389
|
+
* Early bird (time-based launch price) is active: `price.amount` already IS
|
|
390
|
+
* the discounted early-bird amount and the regular price sits in
|
|
391
|
+
* `price.compareAtPrice`. Applies in the eshop default currency only.
|
|
392
|
+
*/
|
|
393
|
+
earlyBirdActive: boolean;
|
|
394
|
+
/** When the active early bird ends (epoch ms) — render "Early bird do ...".
|
|
395
|
+
* Null when no early bird is active. */
|
|
396
|
+
earlyBirdUntil?: number | null;
|
|
342
397
|
/** Exact remaining stock, or `null` when the merchant hides the count
|
|
343
398
|
* (showStockCount off) — treat null as "unknown", never as 0. */
|
|
344
399
|
stockQuantity?: number | null;
|
|
@@ -404,7 +459,7 @@ interface ProductPromotionSummary {
|
|
|
404
459
|
badgeText: string | null;
|
|
405
460
|
/** Merchant hex badge color; null falls back to the shop's sale color. */
|
|
406
461
|
badgeColor: string | null;
|
|
407
|
-
discountType:
|
|
462
|
+
discountType: "PERCENTAGE" | "FIXED_AMOUNT" | "BUY_X_GET_Y";
|
|
408
463
|
discountValue: number;
|
|
409
464
|
/** Promotion end (epoch ms), or null for open-ended. */
|
|
410
465
|
endsAt: number | null;
|
|
@@ -413,8 +468,8 @@ interface ProductPromotionSummary {
|
|
|
413
468
|
}
|
|
414
469
|
/** A single responsive derivative (size + format) of a media image. */
|
|
415
470
|
interface ProductMediaVariant {
|
|
416
|
-
variant:
|
|
417
|
-
format:
|
|
471
|
+
variant: "thumb" | "medium" | "large" | "xlarge";
|
|
472
|
+
format: "jpeg" | "webp" | "avif";
|
|
418
473
|
url: string;
|
|
419
474
|
width: number;
|
|
420
475
|
height: number;
|
|
@@ -427,7 +482,7 @@ interface ProductMediaVariant {
|
|
|
427
482
|
*/
|
|
428
483
|
interface ProductMedia {
|
|
429
484
|
id: string;
|
|
430
|
-
type:
|
|
485
|
+
type: "IMAGE" | "VIDEO";
|
|
431
486
|
/** Original uploaded file URL. */
|
|
432
487
|
url: string;
|
|
433
488
|
alt?: string | null;
|
|
@@ -452,7 +507,7 @@ interface VariantAxisValue {
|
|
|
452
507
|
*/
|
|
453
508
|
interface VariantAxis {
|
|
454
509
|
name: string;
|
|
455
|
-
displayType:
|
|
510
|
+
displayType: "DROPDOWN" | "BUTTON" | "SWATCH_COLOR" | "SWATCH_IMAGE";
|
|
456
511
|
order: number;
|
|
457
512
|
/** Values present among the purchasable variants, in admin-defined order. */
|
|
458
513
|
values: VariantAxisValue[];
|
|
@@ -1122,6 +1177,11 @@ interface CourseListItem {
|
|
|
1122
1177
|
/** Access expiry (epoch ms, null = never expires). */
|
|
1123
1178
|
expiresAt: number | null;
|
|
1124
1179
|
isExpired: boolean;
|
|
1180
|
+
/**
|
|
1181
|
+
* Course content opens at this time (epoch ms); null/undefined = already
|
|
1182
|
+
* open. While in the future, render "Startujeme ..." + countdown.
|
|
1183
|
+
*/
|
|
1184
|
+
contentAvailableFrom?: number | null;
|
|
1125
1185
|
}
|
|
1126
1186
|
/** Downloadable attachment on a course lesson. */
|
|
1127
1187
|
interface CourseAttachment {
|
|
@@ -1145,6 +1205,11 @@ interface CourseLesson {
|
|
|
1145
1205
|
videoUrl: string | null;
|
|
1146
1206
|
content: string | null;
|
|
1147
1207
|
attachments: CourseAttachment[];
|
|
1208
|
+
/**
|
|
1209
|
+
* Number of quiz questions on this lesson (0 = no quiz). Load the quiz via
|
|
1210
|
+
* `customer.getLessonQuiz()` once the lesson is unlocked.
|
|
1211
|
+
*/
|
|
1212
|
+
quizQuestionCount: number;
|
|
1148
1213
|
}
|
|
1149
1214
|
interface CourseModule {
|
|
1150
1215
|
id: string;
|
|
@@ -1159,11 +1224,37 @@ interface CourseDetail {
|
|
|
1159
1224
|
imageUrl: string | null;
|
|
1160
1225
|
/** Welcome text shown at the top of the member area (markdown). */
|
|
1161
1226
|
welcomeText: string | null;
|
|
1227
|
+
/**
|
|
1228
|
+
* AI tutor ("Ask about this lesson") is available on unlocked lessons —
|
|
1229
|
+
* render the tutor widget only when true.
|
|
1230
|
+
*/
|
|
1231
|
+
aiTutorEnabled: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* Lesson discussion (comments) is available on unlocked lessons — render
|
|
1234
|
+
* the discussion widget only when true.
|
|
1235
|
+
*/
|
|
1236
|
+
discussionEnabled: boolean;
|
|
1237
|
+
/**
|
|
1238
|
+
* Course content opens at this time (epoch ms); null/undefined = already
|
|
1239
|
+
* open. While in the future EVERY lesson (including previews) is locked
|
|
1240
|
+
* with `unlockAt >= contentAvailableFrom` — render "Startujeme ..." +
|
|
1241
|
+
* countdown in the member area.
|
|
1242
|
+
*/
|
|
1243
|
+
contentAvailableFrom?: number | null;
|
|
1162
1244
|
enrolledAt: number;
|
|
1163
1245
|
expiresAt: number | null;
|
|
1164
1246
|
totalLessons: number;
|
|
1165
1247
|
completedLessons: number;
|
|
1166
1248
|
modules: CourseModule[];
|
|
1249
|
+
/**
|
|
1250
|
+
* Completion certificate, present once the course is 100 % finished and the
|
|
1251
|
+
* merchant has certificates enabled. Verify the code publicly via
|
|
1252
|
+
* `certificates.verify(code)`.
|
|
1253
|
+
*/
|
|
1254
|
+
certificate?: {
|
|
1255
|
+
code: string;
|
|
1256
|
+
issuedAt: number;
|
|
1257
|
+
} | null;
|
|
1167
1258
|
}
|
|
1168
1259
|
/** Progress snapshot returned after completing a lesson. */
|
|
1169
1260
|
interface CourseProgress {
|
|
@@ -1172,6 +1263,142 @@ interface CourseProgress {
|
|
|
1172
1263
|
totalLessons: number;
|
|
1173
1264
|
completedLessons: number;
|
|
1174
1265
|
}
|
|
1266
|
+
/** One quiz question. Correct answers are never exposed before submitting. */
|
|
1267
|
+
interface QuizQuestion {
|
|
1268
|
+
id: string;
|
|
1269
|
+
question: string;
|
|
1270
|
+
/** Option texts in order; submit the chosen option's index. */
|
|
1271
|
+
options: string[];
|
|
1272
|
+
}
|
|
1273
|
+
interface LessonQuiz {
|
|
1274
|
+
courseId: string;
|
|
1275
|
+
lessonId: string;
|
|
1276
|
+
/** Minimum score (in %) that completes the lesson automatically. */
|
|
1277
|
+
passPercent: number;
|
|
1278
|
+
questions: QuizQuestion[];
|
|
1279
|
+
}
|
|
1280
|
+
interface QuizAnswerInput {
|
|
1281
|
+
questionId: string;
|
|
1282
|
+
/** Index of the chosen option (0-based). */
|
|
1283
|
+
selectedIndex: number;
|
|
1284
|
+
}
|
|
1285
|
+
interface QuizAnswerResult {
|
|
1286
|
+
questionId: string;
|
|
1287
|
+
/** Echo of the submitted choice; null when unanswered or out of range. */
|
|
1288
|
+
selectedIndex: number | null;
|
|
1289
|
+
/** Correct option index, revealed only after submitting. */
|
|
1290
|
+
correctIndex: number;
|
|
1291
|
+
correct: boolean;
|
|
1292
|
+
}
|
|
1293
|
+
interface QuizResult {
|
|
1294
|
+
courseId: string;
|
|
1295
|
+
lessonId: string;
|
|
1296
|
+
totalQuestions: number;
|
|
1297
|
+
correctCount: number;
|
|
1298
|
+
scorePercent: number;
|
|
1299
|
+
passPercent: number;
|
|
1300
|
+
passed: boolean;
|
|
1301
|
+
/** True when the passing score marked the lesson completed. */
|
|
1302
|
+
lessonCompleted: boolean;
|
|
1303
|
+
results: QuizAnswerResult[];
|
|
1304
|
+
/** Course progress after a passing submit; null when not passed. */
|
|
1305
|
+
progress: {
|
|
1306
|
+
totalLessons: number;
|
|
1307
|
+
completedLessons: number;
|
|
1308
|
+
} | null;
|
|
1309
|
+
}
|
|
1310
|
+
/** One exchange in the private AI tutor thread: question + answer. */
|
|
1311
|
+
interface CourseTutorMessage {
|
|
1312
|
+
id: string;
|
|
1313
|
+
/** The student's question. */
|
|
1314
|
+
question: string;
|
|
1315
|
+
/** The AI tutor's answer (plain text / light markdown). */
|
|
1316
|
+
answer: string;
|
|
1317
|
+
createdAt: number;
|
|
1318
|
+
}
|
|
1319
|
+
/** The student's private tutor thread for one lesson. */
|
|
1320
|
+
interface CourseTutorThread {
|
|
1321
|
+
courseId: string;
|
|
1322
|
+
lessonId: string;
|
|
1323
|
+
/** False when the merchant disabled the AI tutor — hide the widget. */
|
|
1324
|
+
enabled: boolean;
|
|
1325
|
+
/** Oldest first. */
|
|
1326
|
+
items: CourseTutorMessage[];
|
|
1327
|
+
}
|
|
1328
|
+
/** A one-level reply under a top-level lesson comment. */
|
|
1329
|
+
interface CourseCommentReply {
|
|
1330
|
+
id: string;
|
|
1331
|
+
/** Id of the parent (top-level) comment. */
|
|
1332
|
+
parentId: string;
|
|
1333
|
+
body: string;
|
|
1334
|
+
/** Author's first name, or a masked e-mail when no name is known. */
|
|
1335
|
+
authorName: string;
|
|
1336
|
+
/** True when the logged-in customer wrote this reply (can delete it). */
|
|
1337
|
+
isMine: boolean;
|
|
1338
|
+
createdAt: number;
|
|
1339
|
+
}
|
|
1340
|
+
/** A top-level comment under a lesson, with one level of replies. */
|
|
1341
|
+
interface CourseComment {
|
|
1342
|
+
id: string;
|
|
1343
|
+
body: string;
|
|
1344
|
+
/** Author's first name, or a masked e-mail when no name is known. */
|
|
1345
|
+
authorName: string;
|
|
1346
|
+
/** True when the logged-in customer wrote this comment (can delete it). */
|
|
1347
|
+
isMine: boolean;
|
|
1348
|
+
createdAt: number;
|
|
1349
|
+
/** Oldest first. */
|
|
1350
|
+
replies: CourseCommentReply[];
|
|
1351
|
+
}
|
|
1352
|
+
/** Paginated lesson discussion (top-level comments, newest first). */
|
|
1353
|
+
interface CourseCommentsList {
|
|
1354
|
+
courseId: string;
|
|
1355
|
+
lessonId: string;
|
|
1356
|
+
/** False when the merchant disabled the discussion — hide the widget. */
|
|
1357
|
+
enabled: boolean;
|
|
1358
|
+
/** 1-based page of top-level comments. */
|
|
1359
|
+
page: number;
|
|
1360
|
+
pageSize: number;
|
|
1361
|
+
/** Total count of top-level comments on the lesson. */
|
|
1362
|
+
totalCount: number;
|
|
1363
|
+
items: CourseComment[];
|
|
1364
|
+
}
|
|
1365
|
+
/** The comment (or reply) just posted by the logged-in customer. */
|
|
1366
|
+
interface CoursePostedComment {
|
|
1367
|
+
id: string;
|
|
1368
|
+
/** Id of the parent comment when this is a reply; null for top-level. */
|
|
1369
|
+
parentId?: string | null;
|
|
1370
|
+
body: string;
|
|
1371
|
+
authorName: string;
|
|
1372
|
+
isMine: boolean;
|
|
1373
|
+
createdAt: number;
|
|
1374
|
+
}
|
|
1375
|
+
/** The student's private note for one lesson (visible only to them). */
|
|
1376
|
+
interface LessonNote {
|
|
1377
|
+
courseId: string;
|
|
1378
|
+
lessonId: string;
|
|
1379
|
+
/** The note text; empty string when no note exists yet. */
|
|
1380
|
+
body: string;
|
|
1381
|
+
/** Last save time (epoch ms); null when no note exists yet. */
|
|
1382
|
+
updatedAt: number | null;
|
|
1383
|
+
}
|
|
1384
|
+
/** One completion certificate on the customer's account. */
|
|
1385
|
+
interface CourseCertificate {
|
|
1386
|
+
courseId: string;
|
|
1387
|
+
courseName: string | null;
|
|
1388
|
+
/** Public verification code (share it, verify via `certificates.verify`). */
|
|
1389
|
+
code: string;
|
|
1390
|
+
issuedAt: number;
|
|
1391
|
+
}
|
|
1392
|
+
/** Public verification payload for a certificate code. */
|
|
1393
|
+
interface CertificateVerification {
|
|
1394
|
+
valid: boolean;
|
|
1395
|
+
code: string;
|
|
1396
|
+
courseId: string;
|
|
1397
|
+
courseName: string | null;
|
|
1398
|
+
/** Student's name, or a masked e-mail when no name is known. */
|
|
1399
|
+
studentName: string;
|
|
1400
|
+
issuedAt: number;
|
|
1401
|
+
}
|
|
1175
1402
|
/** Short-lived signed URL to fetch a purchased digital file. */
|
|
1176
1403
|
interface DownloadUrl {
|
|
1177
1404
|
/** Short-lived (15 min) signed URL. */
|
|
@@ -1876,6 +2103,7 @@ declare class BehioStorefront {
|
|
|
1876
2103
|
readonly shipping: ShippingModule;
|
|
1877
2104
|
readonly newsletter: NewsletterModule;
|
|
1878
2105
|
readonly subscriptions: SubscriptionsModule;
|
|
2106
|
+
readonly certificates: CourseCertificatesModule;
|
|
1879
2107
|
/**
|
|
1880
2108
|
* Called by the analytics tracker when the visitor grants (id) or revokes
|
|
1881
2109
|
* (null) analytics consent. When set, requests carry the X-Behio-Vid header
|
|
@@ -2006,6 +2234,13 @@ declare class BehioStorefront {
|
|
|
2006
2234
|
signal?: AbortSignal;
|
|
2007
2235
|
headers?: Record<string, string>;
|
|
2008
2236
|
}): Promise<SdkResult<T>>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Binary GET (PDF downloads). Same auth headers as `request()`, but the
|
|
2239
|
+
* response is returned as a Blob instead of parsed JSON.
|
|
2240
|
+
*
|
|
2241
|
+
* @internal — use the typed module methods (behio.certificates.downloadPdf).
|
|
2242
|
+
*/
|
|
2243
|
+
requestBlob(path: string): Promise<SdkResult<Blob>>;
|
|
2009
2244
|
/**
|
|
2010
2245
|
* Throws on failure (API error / network / timeout). Kept private so
|
|
2011
2246
|
* internal auth refresh recursion keeps its existing control flow —
|
|
@@ -2298,6 +2533,77 @@ declare class CustomerModule {
|
|
|
2298
2533
|
getCourse(courseId: string): Promise<SdkResult<CourseDetail>>;
|
|
2299
2534
|
/** Mark an unlocked lesson as completed (idempotent). */
|
|
2300
2535
|
completeLesson(courseId: string, lessonId: string): Promise<SdkResult<CourseProgress>>;
|
|
2536
|
+
/**
|
|
2537
|
+
* Quiz for an unlocked lesson. Correct answers are never included — scoring
|
|
2538
|
+
* happens server-side in `submitLessonQuiz`. Locked lessons return 403.
|
|
2539
|
+
*/
|
|
2540
|
+
getLessonQuiz(courseId: string, lessonId: string): Promise<SdkResult<LessonQuiz>>;
|
|
2541
|
+
/**
|
|
2542
|
+
* Submit quiz answers: returns the score, reveals correct answers and, when
|
|
2543
|
+
* the score reaches `passPercent` (70 %), marks the lesson completed
|
|
2544
|
+
* automatically.
|
|
2545
|
+
*/
|
|
2546
|
+
submitLessonQuiz(courseId: string, lessonId: string, answers: QuizAnswerInput[]): Promise<SdkResult<QuizResult>>;
|
|
2547
|
+
/**
|
|
2548
|
+
* Completion certificates of the logged-in customer. Each carries a public
|
|
2549
|
+
* verification code for sharing (LinkedIn, CV).
|
|
2550
|
+
*/
|
|
2551
|
+
getCourseCertificates(): Promise<SdkResult<{
|
|
2552
|
+
items: CourseCertificate[];
|
|
2553
|
+
}>>;
|
|
2554
|
+
/**
|
|
2555
|
+
* AI tutor "Ask about this lesson": the student's private thread for one
|
|
2556
|
+
* lesson (oldest first). `enabled: false` = the merchant turned the tutor
|
|
2557
|
+
* off — hide the widget. Locked lessons return 403.
|
|
2558
|
+
*/
|
|
2559
|
+
getLessonTutorThread(courseId: string, lessonId: string): Promise<SdkResult<CourseTutorThread>>;
|
|
2560
|
+
/**
|
|
2561
|
+
* Ask the AI tutor a question about the lesson. The answer sticks to the
|
|
2562
|
+
* lesson topic and comes back in the language of the question (Czech by
|
|
2563
|
+
* default). Rate limited (20/min); 403 on locked lessons or when the
|
|
2564
|
+
* merchant disabled the tutor.
|
|
2565
|
+
*/
|
|
2566
|
+
askLessonTutor(courseId: string, lessonId: string, question: string): Promise<SdkResult<CourseTutorMessage>>;
|
|
2567
|
+
/**
|
|
2568
|
+
* Lesson discussion: paginated top-level comments (newest first) with one
|
|
2569
|
+
* level of replies. Only enrolled customers with the lesson unlocked; 403
|
|
2570
|
+
* when the merchant disabled the discussion.
|
|
2571
|
+
*/
|
|
2572
|
+
getLessonComments(courseId: string, lessonId: string, page?: number): Promise<SdkResult<CourseCommentsList>>;
|
|
2573
|
+
/**
|
|
2574
|
+
* Post a comment under the lesson, or a reply when `parentId` points to a
|
|
2575
|
+
* top-level comment (replies go one level deep only). Max 5000 characters.
|
|
2576
|
+
*/
|
|
2577
|
+
postLessonComment(courseId: string, lessonId: string, body: string, parentId?: string): Promise<SdkResult<CoursePostedComment>>;
|
|
2578
|
+
/**
|
|
2579
|
+
* Delete the customer's OWN comment (including its replies). Someone
|
|
2580
|
+
* else's comment returns 404.
|
|
2581
|
+
*/
|
|
2582
|
+
deleteLessonComment(courseId: string, lessonId: string, commentId: string): Promise<SdkResult<void>>;
|
|
2583
|
+
/**
|
|
2584
|
+
* The student's private note for one lesson. `body` is an empty string
|
|
2585
|
+
* when no note exists yet. Visible only to the logged-in student.
|
|
2586
|
+
*/
|
|
2587
|
+
getLessonNote(courseId: string, lessonId: string): Promise<SdkResult<LessonNote>>;
|
|
2588
|
+
/**
|
|
2589
|
+
* Save (upsert) the student's private lesson note. Autosave-friendly; an
|
|
2590
|
+
* empty string clears the note. Max 20 000 characters.
|
|
2591
|
+
*/
|
|
2592
|
+
saveLessonNote(courseId: string, lessonId: string, body: string): Promise<SdkResult<LessonNote>>;
|
|
2593
|
+
}
|
|
2594
|
+
declare class CourseCertificatesModule {
|
|
2595
|
+
private client;
|
|
2596
|
+
constructor(client: BehioStorefront);
|
|
2597
|
+
/**
|
|
2598
|
+
* Publicly verify a certificate code (no customer login needed) — build a
|
|
2599
|
+
* `/certifikat/{code}` page with this. Unknown codes return a 404 error.
|
|
2600
|
+
*/
|
|
2601
|
+
verify(code: string): Promise<SdkResult<CertificateVerification>>;
|
|
2602
|
+
/**
|
|
2603
|
+
* Download the certificate as a branded PDF (A5 landscape). Returns a Blob;
|
|
2604
|
+
* trigger a browser download via `URL.createObjectURL(blob)`.
|
|
2605
|
+
*/
|
|
2606
|
+
downloadPdf(code: string): Promise<SdkResult<Blob>>;
|
|
2301
2607
|
}
|
|
2302
2608
|
declare class PagesModule {
|
|
2303
2609
|
private client;
|
|
@@ -2488,4 +2794,4 @@ declare class NewsletterModule {
|
|
|
2488
2794
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
2489
2795
|
}
|
|
2490
2796
|
|
|
2491
|
-
export { type
|
|
2797
|
+
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-B0vlHxB1.mjs';
|
|
2
|
+
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as DataGroupFieldType, _ as DigitalDownload, $ as DownloadUrl, a0 as Facet, a1 as FacetAvailability, a2 as FacetCategory, a3 as FacetLabel, a4 as FacetPriceRange, a5 as FacetRange, a6 as FacetRatingBucket, a7 as FacetValue, a8 as FacetsResponse, a9 as FilterField, aa as FulfillmentStatus, ab as FulfillmentStatuses, ac as GiftCardBalance, ad as GiftCardPurchaseInput, ae as GiftCardPurchaseResult, af as GiftCardSummary, ag as LessonNote, ah as LessonQuiz, ai as LoginInput, aj as LoyaltyBalance, ak as LoyaltyNextTier, al as LoyaltyProgram, am as LoyaltySummary, an as LoyaltyTier, ao as LoyaltyTierPerks, ap as LoyaltyTransaction, aq as Menu, ar as MenuItem, as as MenuItemRef, at as MenuItemType, au as MessageResponse, av as NewsletterOptInDefault, aw as NewsletterSubscribeInput, ax as NewsletterSubscribeResult, ay as NewsletterUnsubscribeResult, az as OrderAccessRequestResponse, aA as OrderAccessVerifyResponse, aB as OrderDetail, aC as OrderItem, aD as OrderListItem, aE as OrderStatus, aF as OrderStatusHistory, aG as OrderStatuses, aH as OrderTracking, aI as Page, aJ as PageAttachment, aK as PageDetail, aL as PaginatedResponse, aM as PaymentStatus, aN as PaymentStatuses, aO as PickupPoint, aP as PickupPointHours, aQ as PickupPointsInput, aR as PriceDisplay, aS as ProductAvailability, aT as ProductCustomField, aU as ProductCustomFieldGroup, aV as ProductDetail, aW as ProductGroup, aX as ProductLabel, aY as ProductListItem, aZ as ProductMedia, a_ as ProductMediaVariant, a$ as ProductPrice, b0 as ProductPromotionSummary, b1 as ProductReview, b2 as ProductReviewsResponse, b3 as ProductSort, b4 as ProductSortValue, b5 as ProductVariant, b6 as ProductVolumePrice, b7 as ProductsQuery, b8 as QuizAnswerInput, b9 as QuizAnswerResult, ba as QuizQuestion, bb as QuizResult, bc as QuoteItem, bd as QuoteRequest, be as RegisterInput, bf as RegisterResult, bg as RequestInterceptor, bh as RequestInterceptorConfig, bi as ResponseInterceptor, bj as ResponseInterceptorData, bk as ReturnRequest, bl as ReturnRequestItem, bm as ReturnStatus, bn as ReturnStatusItem, bo as ReturnableOrder, bp as ReturnableOrderItem, bq as SdkError, br as ShippingMethodSummary, bs as ShippingQuote, bt as ShippingQuoteInput, bu as ShopInfo, bv as ShopScript, bw as ShopScriptPlacement, bx as ShopScriptType, by as ShopScripts, bz as ShopSeo, bA as ShopSeoIdentity, bB as StockBehavior, bC as StockMode, bD as SubmitQuoteInput, bE as SubmitReturnInput, bF as SubmitReviewInput, bG as Subscription, bH as SubscriptionAction, bI as SubscriptionFrequency, bJ as SubscriptionItem, bK as SubscriptionStatus, bL as TaxBreakdownLine, bM as VariantAxis, bN as VariantAxisValue, bO as WishlistItem, bP as err, bQ as ok, bR as toSdkError } from './client-B0vlHxB1.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-B0vlHxB1.js';
|
|
2
|
+
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as DataGroupFieldType, _ as DigitalDownload, $ as DownloadUrl, a0 as Facet, a1 as FacetAvailability, a2 as FacetCategory, a3 as FacetLabel, a4 as FacetPriceRange, a5 as FacetRange, a6 as FacetRatingBucket, a7 as FacetValue, a8 as FacetsResponse, a9 as FilterField, aa as FulfillmentStatus, ab as FulfillmentStatuses, ac as GiftCardBalance, ad as GiftCardPurchaseInput, ae as GiftCardPurchaseResult, af as GiftCardSummary, ag as LessonNote, ah as LessonQuiz, ai as LoginInput, aj as LoyaltyBalance, ak as LoyaltyNextTier, al as LoyaltyProgram, am as LoyaltySummary, an as LoyaltyTier, ao as LoyaltyTierPerks, ap as LoyaltyTransaction, aq as Menu, ar as MenuItem, as as MenuItemRef, at as MenuItemType, au as MessageResponse, av as NewsletterOptInDefault, aw as NewsletterSubscribeInput, ax as NewsletterSubscribeResult, ay as NewsletterUnsubscribeResult, az as OrderAccessRequestResponse, aA as OrderAccessVerifyResponse, aB as OrderDetail, aC as OrderItem, aD as OrderListItem, aE as OrderStatus, aF as OrderStatusHistory, aG as OrderStatuses, aH as OrderTracking, aI as Page, aJ as PageAttachment, aK as PageDetail, aL as PaginatedResponse, aM as PaymentStatus, aN as PaymentStatuses, aO as PickupPoint, aP as PickupPointHours, aQ as PickupPointsInput, aR as PriceDisplay, aS as ProductAvailability, aT as ProductCustomField, aU as ProductCustomFieldGroup, aV as ProductDetail, aW as ProductGroup, aX as ProductLabel, aY as ProductListItem, aZ as ProductMedia, a_ as ProductMediaVariant, a$ as ProductPrice, b0 as ProductPromotionSummary, b1 as ProductReview, b2 as ProductReviewsResponse, b3 as ProductSort, b4 as ProductSortValue, b5 as ProductVariant, b6 as ProductVolumePrice, b7 as ProductsQuery, b8 as QuizAnswerInput, b9 as QuizAnswerResult, ba as QuizQuestion, bb as QuizResult, bc as QuoteItem, bd as QuoteRequest, be as RegisterInput, bf as RegisterResult, bg as RequestInterceptor, bh as RequestInterceptorConfig, bi as ResponseInterceptor, bj as ResponseInterceptorData, bk as ReturnRequest, bl as ReturnRequestItem, bm as ReturnStatus, bn as ReturnStatusItem, bo as ReturnableOrder, bp as ReturnableOrderItem, bq as SdkError, br as ShippingMethodSummary, bs as ShippingQuote, bt as ShippingQuoteInput, bu as ShopInfo, bv as ShopScript, bw as ShopScriptPlacement, bx as ShopScriptType, by as ShopScripts, bz as ShopSeo, bA as ShopSeoIdentity, bB as StockBehavior, bC as StockMode, bD as SubmitQuoteInput, bE as SubmitReturnInput, bF as SubmitReviewInput, bG as Subscription, bH as SubscriptionAction, bI as SubscriptionFrequency, bJ as SubscriptionItem, bK as SubscriptionStatus, bL as TaxBreakdownLine, bM as VariantAxis, bN as VariantAxisValue, bO as WishlistItem, bP as err, bQ as ok, bR as toSdkError } from './client-B0vlHxB1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|