@cosmicdrift/kumiko-bundled-features 0.415.0 → 0.417.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/agent-tools/tool-catalog.js +20 -1
- package/dist/agent-tools/tool-dispatch.js +14 -5
- package/dist/channel-whatsapp/constants.d.ts +1 -0
- package/dist/channel-whatsapp/constants.js +1 -0
- package/dist/channel-whatsapp/graph-client.d.ts +2 -0
- package/dist/channel-whatsapp/graph-client.js +29 -2
- package/dist/handbook-knowledge/constants.d.ts +6 -0
- package/dist/handbook-knowledge/constants.js +6 -0
- package/dist/handbook-knowledge/feature.d.ts +9 -0
- package/dist/handbook-knowledge/feature.js +17 -0
- package/dist/handbook-knowledge/handbook-index.d.ts +26 -0
- package/dist/handbook-knowledge/handbook-index.js +51 -0
- package/dist/handbook-knowledge/handlers.d.ts +28 -0
- package/dist/handbook-knowledge/handlers.js +67 -0
- package/dist/handbook-knowledge/index.d.ts +3 -0
- package/dist/handbook-knowledge/index.js +2 -0
- package/dist/helpdesk/screens.js +5 -1
- package/dist/signature/entity.d.ts +552 -0
- package/dist/signature/entity.js +156 -0
- package/dist/signature/feature.d.ts +3 -0
- package/dist/signature/feature.js +97 -0
- package/dist/signature/files.d.ts +23 -0
- package/dist/signature/files.js +64 -0
- package/dist/signature/grant.d.ts +32 -0
- package/dist/signature/grant.js +44 -0
- package/dist/signature/handlers/anonymous.write.d.ts +14 -0
- package/dist/signature/handlers/anonymous.write.js +52 -0
- package/dist/signature/handlers/cancel.write.d.ts +7 -0
- package/dist/signature/handlers/cancel.write.js +37 -0
- package/dist/signature/handlers/issue-link.write.d.ts +10 -0
- package/dist/signature/handlers/issue-link.write.js +60 -0
- package/dist/signature/handlers/lifecycle.write.d.ts +16 -0
- package/dist/signature/handlers/lifecycle.write.js +70 -0
- package/dist/signature/handlers/link-internal.write.d.ts +23 -0
- package/dist/signature/handlers/link-internal.write.js +186 -0
- package/dist/signature/handlers/request.write.d.ts +20 -0
- package/dist/signature/handlers/request.write.js +86 -0
- package/dist/signature/handlers/revoke-link.write.d.ts +7 -0
- package/dist/signature/handlers/revoke-link.write.js +27 -0
- package/dist/signature/handlers/sign-in-person.write.d.ts +9 -0
- package/dist/signature/handlers/sign-in-person.write.js +55 -0
- package/dist/signature/i18n.d.ts +6 -0
- package/dist/signature/i18n.js +49 -0
- package/dist/signature/index.d.ts +5 -0
- package/dist/signature/index.js +2 -0
- package/dist/signature/lib.d.ts +54 -0
- package/dist/signature/lib.js +68 -0
- package/dist/signature/options.d.ts +40 -0
- package/dist/signature/options.js +5 -0
- package/dist/signature/payloads.d.ts +60 -0
- package/dist/signature/payloads.js +53 -0
- package/dist/signature/png.d.ts +11 -0
- package/dist/signature/png.js +159 -0
- package/dist/signature/screens.d.ts +3 -0
- package/dist/signature/screens.js +97 -0
- package/dist/signature/signature-page.d.ts +25 -0
- package/dist/signature/signature-page.js +62 -0
- package/dist/signature/signing.d.ts +19 -0
- package/dist/signature/signing.js +46 -0
- package/dist/signature/static-sign.d.ts +19 -0
- package/dist/signature/static-sign.js +45 -0
- package/dist/signature/subject-queries.d.ts +5 -0
- package/dist/signature/subject-queries.js +113 -0
- package/dist/signature/subject-scope.d.ts +11 -0
- package/dist/signature/subject-scope.js +20 -0
- package/dist/signature/sweep.d.ts +3 -0
- package/dist/signature/sweep.js +113 -0
- package/dist/signature/user-data.d.ts +3 -0
- package/dist/signature/user-data.js +135 -0
- package/dist/signature/web/constants.d.ts +69 -0
- package/dist/signature/web/constants.js +68 -0
- package/dist/signature/web/index.d.ts +3 -0
- package/dist/signature/web/index.js +2 -0
- package/dist/signature/web/pad.d.ts +20 -0
- package/dist/signature/web/pad.js +104 -0
- package/dist/signature/web/signature-pad.d.ts +19 -0
- package/dist/signature/web/signature-pad.js +36 -0
- package/dist/subscription-stripe/feature.d.ts +6 -0
- package/dist/subscription-stripe/feature.js +3 -0
- package/dist/subscription-stripe/plugin-methods.d.ts +3 -1
- package/dist/subscription-stripe/plugin-methods.js +2 -1
- package/package.json +43 -11
- package/src/agent-tools/changes.json +6 -0
- package/src/channel-whatsapp/changes.json +6 -0
- package/src/handbook-knowledge/changes.json +8 -0
- package/src/signature/changes.json +22 -0
- package/src/subscription-stripe/changes.json +6 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Framework-free signature field: Pointer Events (finger, pen, mouse) on a canvas. Imports nothing,
|
|
2
|
+
// so the static-sign entry stays free of React and of any runtime dependency.
|
|
3
|
+
const DEFAULT_LINE_WIDTH = 3;
|
|
4
|
+
const DEFAULT_STROKE_STYLE = "#111111";
|
|
5
|
+
const BASE64_CHUNK_SIZE = 0x8000;
|
|
6
|
+
export function bytesToBase64(bytes) {
|
|
7
|
+
let binary = "";
|
|
8
|
+
for (let offset = 0; offset < bytes.length; offset += BASE64_CHUNK_SIZE) {
|
|
9
|
+
binary += String.fromCharCode(...bytes.subarray(offset, offset + BASE64_CHUNK_SIZE));
|
|
10
|
+
}
|
|
11
|
+
return btoa(binary);
|
|
12
|
+
}
|
|
13
|
+
// Closures of the pad need the non-null context; narrowing a const does not carry into them.
|
|
14
|
+
function requireContext(canvas) {
|
|
15
|
+
const context = canvas.getContext("2d");
|
|
16
|
+
if (context === null)
|
|
17
|
+
throw new Error("createSignaturePad: the canvas has no 2d context");
|
|
18
|
+
return context;
|
|
19
|
+
}
|
|
20
|
+
export function createSignaturePad(canvas, options = {}) {
|
|
21
|
+
const context = requireContext(canvas);
|
|
22
|
+
const lineWidth = options.lineWidth ?? DEFAULT_LINE_WIDTH;
|
|
23
|
+
context.lineWidth = lineWidth;
|
|
24
|
+
context.lineCap = "round";
|
|
25
|
+
context.lineJoin = "round";
|
|
26
|
+
context.strokeStyle = options.strokeStyle ?? DEFAULT_STROKE_STYLE;
|
|
27
|
+
context.fillStyle = options.strokeStyle ?? DEFAULT_STROKE_STYLE;
|
|
28
|
+
canvas.style.touchAction = "none";
|
|
29
|
+
let drawnAny = false;
|
|
30
|
+
let activePointerId = null;
|
|
31
|
+
let lastPoint = null;
|
|
32
|
+
function setDrawn(next) {
|
|
33
|
+
if (drawnAny === next)
|
|
34
|
+
return;
|
|
35
|
+
drawnAny = next;
|
|
36
|
+
options.onChange?.(!next);
|
|
37
|
+
}
|
|
38
|
+
// The canvas may be displayed at another size than its pixel size (CSS scaling).
|
|
39
|
+
function pointOf(event) {
|
|
40
|
+
const rect = canvas.getBoundingClientRect();
|
|
41
|
+
const scaleX = rect.width > 0 ? canvas.width / rect.width : 1;
|
|
42
|
+
const scaleY = rect.height > 0 ? canvas.height / rect.height : 1;
|
|
43
|
+
return { x: (event.clientX - rect.left) * scaleX, y: (event.clientY - rect.top) * scaleY };
|
|
44
|
+
}
|
|
45
|
+
function onPointerDown(event) {
|
|
46
|
+
if (activePointerId !== null)
|
|
47
|
+
return;
|
|
48
|
+
activePointerId = event.pointerId;
|
|
49
|
+
canvas.setPointerCapture(event.pointerId);
|
|
50
|
+
const point = pointOf(event);
|
|
51
|
+
lastPoint = point;
|
|
52
|
+
context.beginPath();
|
|
53
|
+
context.arc(point.x, point.y, lineWidth / 2, 0, Math.PI * 2);
|
|
54
|
+
context.fill();
|
|
55
|
+
setDrawn(true);
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
}
|
|
58
|
+
function onPointerMove(event) {
|
|
59
|
+
if (event.pointerId !== activePointerId || lastPoint === null)
|
|
60
|
+
return;
|
|
61
|
+
const point = pointOf(event);
|
|
62
|
+
context.beginPath();
|
|
63
|
+
context.moveTo(lastPoint.x, lastPoint.y);
|
|
64
|
+
context.lineTo(point.x, point.y);
|
|
65
|
+
context.stroke();
|
|
66
|
+
lastPoint = point;
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
}
|
|
69
|
+
function onPointerEnd(event) {
|
|
70
|
+
if (event.pointerId !== activePointerId)
|
|
71
|
+
return;
|
|
72
|
+
canvas.releasePointerCapture(event.pointerId);
|
|
73
|
+
activePointerId = null;
|
|
74
|
+
lastPoint = null;
|
|
75
|
+
}
|
|
76
|
+
canvas.addEventListener("pointerdown", onPointerDown);
|
|
77
|
+
canvas.addEventListener("pointermove", onPointerMove);
|
|
78
|
+
canvas.addEventListener("pointerup", onPointerEnd);
|
|
79
|
+
canvas.addEventListener("pointercancel", onPointerEnd);
|
|
80
|
+
return {
|
|
81
|
+
clear: () => {
|
|
82
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
83
|
+
setDrawn(false);
|
|
84
|
+
},
|
|
85
|
+
isEmpty: () => !drawnAny,
|
|
86
|
+
toPngBase64: () => new Promise((resolve, reject) => {
|
|
87
|
+
canvas.toBlob((blob) => {
|
|
88
|
+
if (blob === null) {
|
|
89
|
+
reject(new Error("createSignaturePad: the canvas could not be exported as PNG"));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
blob
|
|
93
|
+
.arrayBuffer()
|
|
94
|
+
.then((buffer) => resolve(bytesToBase64(new Uint8Array(buffer))), reject);
|
|
95
|
+
}, "image/png");
|
|
96
|
+
}),
|
|
97
|
+
destroy: () => {
|
|
98
|
+
canvas.removeEventListener("pointerdown", onPointerDown);
|
|
99
|
+
canvas.removeEventListener("pointermove", onPointerMove);
|
|
100
|
+
canvas.removeEventListener("pointerup", onPointerEnd);
|
|
101
|
+
canvas.removeEventListener("pointercancel", onPointerEnd);
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SignaturePad as SignaturePadController } from "./pad.ts";
|
|
2
|
+
export type SignaturePadLabels = {
|
|
3
|
+
readonly fieldLabel: string;
|
|
4
|
+
readonly clear: string;
|
|
5
|
+
readonly signOnPaper: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const DEFAULT_SIGNATURE_PAD_LABELS: SignaturePadLabels;
|
|
8
|
+
export type SignaturePadProps = {
|
|
9
|
+
/** Gets the controller once the canvas is mounted and null on unmount; read `toPngBase64()` from it on submit. Keep it referentially stable, a new function recreates the field. */
|
|
10
|
+
readonly onPadReady: (pad: SignaturePadController | null) => void;
|
|
11
|
+
/** Same stability requirement as `onPadReady`. */
|
|
12
|
+
readonly onChange?: (isEmpty: boolean) => void;
|
|
13
|
+
/** Shows the "sign on paper" exit; the signer who cannot draw must always have a way out. */
|
|
14
|
+
readonly onSignOnPaper?: () => void;
|
|
15
|
+
readonly labels?: Partial<SignaturePadLabels>;
|
|
16
|
+
readonly width?: number;
|
|
17
|
+
readonly height?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare function SignaturePad(props: SignaturePadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { usePrimitives } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
+
import { useCallback, useRef, useState } from "react";
|
|
4
|
+
import { createSignaturePad } from "./pad.js";
|
|
5
|
+
export const DEFAULT_SIGNATURE_PAD_LABELS = {
|
|
6
|
+
fieldLabel: "Signature field: draw your signature with finger, pen or mouse",
|
|
7
|
+
clear: "Clear",
|
|
8
|
+
signOnPaper: "Sign on paper instead",
|
|
9
|
+
};
|
|
10
|
+
const DEFAULT_WIDTH = 600;
|
|
11
|
+
const DEFAULT_HEIGHT = 240;
|
|
12
|
+
// Drawing needs a pointer; everything else (clear, the paper exit) is a plain focusable button.
|
|
13
|
+
// The pad lives in a callback ref instead of an effect: it follows the canvas element's mount and unmount.
|
|
14
|
+
export function SignaturePad(props) {
|
|
15
|
+
const { Button } = usePrimitives();
|
|
16
|
+
const labels = { ...DEFAULT_SIGNATURE_PAD_LABELS, ...props.labels };
|
|
17
|
+
const padRef = useRef(null);
|
|
18
|
+
const [isEmpty, setIsEmpty] = useState(true);
|
|
19
|
+
const { onPadReady, onChange } = props;
|
|
20
|
+
const mountPad = useCallback((canvas) => {
|
|
21
|
+
const pad = createSignaturePad(canvas, {
|
|
22
|
+
onChange: (empty) => {
|
|
23
|
+
setIsEmpty(empty);
|
|
24
|
+
onChange?.(empty);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
padRef.current = pad;
|
|
28
|
+
onPadReady(pad);
|
|
29
|
+
return () => {
|
|
30
|
+
pad.destroy();
|
|
31
|
+
padRef.current = null;
|
|
32
|
+
onPadReady(null);
|
|
33
|
+
};
|
|
34
|
+
}, [onPadReady, onChange]);
|
|
35
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("canvas", { ref: mountPad, width: props.width ?? DEFAULT_WIDTH, height: props.height ?? DEFAULT_HEIGHT, role: "img", "aria-label": labels.fieldLabel, className: "w-full rounded border border-input bg-white" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { variant: "secondary", disabled: isEmpty, onClick: () => padRef.current?.clear(), children: labels.clear }), props.onSignOnPaper === undefined ? null : (_jsx(Button, { variant: "ghost", onClick: props.onSignOnPaper, children: labels.signOnPaper }))] })] }));
|
|
36
|
+
}
|
|
@@ -46,6 +46,12 @@ export type SubscriptionStripeOptions = {
|
|
|
46
46
|
* mode:"subscription" — Stripe rejects invoice_creation there; the
|
|
47
47
|
* subscription's own invoicing covers it. */
|
|
48
48
|
readonly paymentInvoiceCreation?: boolean;
|
|
49
|
+
/** Shows Stripe's promotion-code field in every checkout of this app.
|
|
50
|
+
* Default false, because the field shows even when no code exists. Codes
|
|
51
|
+
* and coupons are created in the Stripe dashboard, not in the app. The
|
|
52
|
+
* consumer-protection confirmation mail shows the catalog price captured
|
|
53
|
+
* at consent, not the discounted amount. */
|
|
54
|
+
readonly allowPromotionCodes?: boolean;
|
|
49
55
|
/** Allowlist of Stripe price-ids a mode:"payment" (one-off) checkout may
|
|
50
56
|
* target — checkout-core's `openCheckout` rejects any other priceId as
|
|
51
57
|
* `unknown_price`. App-specific and empty by default: without an
|
|
@@ -164,6 +164,9 @@ export function createSubscriptionStripeFeature(options = {}) {
|
|
|
164
164
|
...(options.paymentInvoiceCreation !== undefined && {
|
|
165
165
|
paymentInvoiceCreation: options.paymentInvoiceCreation,
|
|
166
166
|
}),
|
|
167
|
+
...(options.allowPromotionCodes !== undefined && {
|
|
168
|
+
allowPromotionCodes: options.allowPromotionCodes,
|
|
169
|
+
}),
|
|
167
170
|
}),
|
|
168
171
|
createPortalSession: createStripePortalSession(runtimes.ctx),
|
|
169
172
|
cancelSubscription: createStripeCancelSubscription(runtimes.ctx),
|
|
@@ -7,9 +7,11 @@ export type StripeCheckoutSessionRuntimeOptions = {
|
|
|
7
7
|
/** Whether a mode:"payment" checkout gets a Stripe invoice. Default true.
|
|
8
8
|
* Never applied in mode:"subscription" — Stripe rejects invoice_creation there. */
|
|
9
9
|
readonly paymentInvoiceCreation?: boolean;
|
|
10
|
+
/** Shows Stripe's promotion-code field in checkout. Default false. */
|
|
11
|
+
readonly allowPromotionCodes?: boolean;
|
|
10
12
|
};
|
|
11
13
|
export declare function mapAppLocaleToStripeLocale(locale: string): Stripe.Checkout.SessionCreateParams.Locale;
|
|
12
|
-
export declare function createStripeCheckoutSession(runtime: StripeCtxRuntime, { paymentInvoiceCreation }?: StripeCheckoutSessionRuntimeOptions): (ctx: HandlerContext, options: StripeCheckoutOptions) => Promise<{
|
|
14
|
+
export declare function createStripeCheckoutSession(runtime: StripeCtxRuntime, { paymentInvoiceCreation, allowPromotionCodes, }?: StripeCheckoutSessionRuntimeOptions): (ctx: HandlerContext, options: StripeCheckoutOptions) => Promise<{
|
|
13
15
|
url: string;
|
|
14
16
|
providerCheckoutId: string;
|
|
15
17
|
}>;
|
|
@@ -77,7 +77,7 @@ export function mapAppLocaleToStripeLocale(locale) {
|
|
|
77
77
|
function isUnknownCustomerStripeError(error) {
|
|
78
78
|
return isResourceMissingStripeError(error) && error.param === "customer";
|
|
79
79
|
}
|
|
80
|
-
export function createStripeCheckoutSession(runtime, { paymentInvoiceCreation = true } = {}) {
|
|
80
|
+
export function createStripeCheckoutSession(runtime, { paymentInvoiceCreation = true, allowPromotionCodes = false, } = {}) {
|
|
81
81
|
return async (ctx, options) => {
|
|
82
82
|
// Invariant: without billing-live, no Stripe session may be created
|
|
83
83
|
// (sk_test_-keys in production would otherwise create a test-mode checkout).
|
|
@@ -94,6 +94,7 @@ export function createStripeCheckoutSession(runtime, { paymentInvoiceCreation =
|
|
|
94
94
|
success_url: options.successUrl,
|
|
95
95
|
cancel_url: options.cancelUrl,
|
|
96
96
|
submit_type: "pay",
|
|
97
|
+
...(allowPromotionCodes && { allow_promotion_codes: true }),
|
|
97
98
|
...(options.locale && { locale: mapAppLocaleToStripeLocale(options.locale) }),
|
|
98
99
|
...(options.submitMessage && {
|
|
99
100
|
custom_text: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.417.0",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -592,6 +592,22 @@
|
|
|
592
592
|
"types": "./dist/waitlist/static-submit.d.ts",
|
|
593
593
|
"default": "./dist/waitlist/static-submit.js"
|
|
594
594
|
},
|
|
595
|
+
"./signature": {
|
|
596
|
+
"types": "./dist/signature/index.d.ts",
|
|
597
|
+
"default": "./dist/signature/index.js"
|
|
598
|
+
},
|
|
599
|
+
"./signature/web": {
|
|
600
|
+
"types": "./dist/signature/web/index.d.ts",
|
|
601
|
+
"default": "./dist/signature/web/index.js"
|
|
602
|
+
},
|
|
603
|
+
"./signature/static-sign": {
|
|
604
|
+
"types": "./dist/signature/static-sign.d.ts",
|
|
605
|
+
"default": "./dist/signature/static-sign.js"
|
|
606
|
+
},
|
|
607
|
+
"./handbook-knowledge": {
|
|
608
|
+
"types": "./dist/handbook-knowledge/index.d.ts",
|
|
609
|
+
"default": "./dist/handbook-knowledge/index.js"
|
|
610
|
+
},
|
|
595
611
|
"./page-render": {
|
|
596
612
|
"types": "./dist/page-render/index.d.ts",
|
|
597
613
|
"default": "./dist/page-render/index.js"
|
|
@@ -626,9 +642,9 @@
|
|
|
626
642
|
}
|
|
627
643
|
},
|
|
628
644
|
"dependencies": {
|
|
629
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
630
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
631
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
645
|
+
"@cosmicdrift/kumiko-framework": "0.417.0",
|
|
646
|
+
"@cosmicdrift/kumiko-renderer": "0.417.0",
|
|
647
|
+
"@cosmicdrift/kumiko-types": "0.417.0",
|
|
632
648
|
"@mollie/api-client": "^4.6.0",
|
|
633
649
|
"@node-rs/argon2": "^2.2.2",
|
|
634
650
|
"@tiptap/core": "^3.32.2",
|
|
@@ -1236,6 +1252,22 @@
|
|
|
1236
1252
|
"types": "./dist/waitlist/static-submit.d.ts",
|
|
1237
1253
|
"default": "./dist/waitlist/static-submit.js"
|
|
1238
1254
|
},
|
|
1255
|
+
"./signature": {
|
|
1256
|
+
"types": "./dist/signature/index.d.ts",
|
|
1257
|
+
"default": "./dist/signature/index.js"
|
|
1258
|
+
},
|
|
1259
|
+
"./signature/web": {
|
|
1260
|
+
"types": "./dist/signature/web/index.d.ts",
|
|
1261
|
+
"default": "./dist/signature/web/index.js"
|
|
1262
|
+
},
|
|
1263
|
+
"./signature/static-sign": {
|
|
1264
|
+
"types": "./dist/signature/static-sign.d.ts",
|
|
1265
|
+
"default": "./dist/signature/static-sign.js"
|
|
1266
|
+
},
|
|
1267
|
+
"./handbook-knowledge": {
|
|
1268
|
+
"types": "./dist/handbook-knowledge/index.d.ts",
|
|
1269
|
+
"default": "./dist/handbook-knowledge/index.js"
|
|
1270
|
+
},
|
|
1239
1271
|
"./page-render": {
|
|
1240
1272
|
"types": "./dist/page-render/index.d.ts",
|
|
1241
1273
|
"default": "./dist/page-render/index.js"
|
|
@@ -1278,19 +1310,19 @@
|
|
|
1278
1310
|
"LICENSE"
|
|
1279
1311
|
],
|
|
1280
1312
|
"devDependencies": {
|
|
1281
|
-
"@cosmicdrift/kumiko-locale-de": "0.
|
|
1282
|
-
"@cosmicdrift/kumiko-locale-es": "0.
|
|
1283
|
-
"@cosmicdrift/kumiko-locale-fr": "0.
|
|
1284
|
-
"@cosmicdrift/kumiko-locale-it": "0.
|
|
1285
|
-
"@cosmicdrift/kumiko-renderer-mail-html": "0.
|
|
1286
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
1313
|
+
"@cosmicdrift/kumiko-locale-de": "0.417.0",
|
|
1314
|
+
"@cosmicdrift/kumiko-locale-es": "0.417.0",
|
|
1315
|
+
"@cosmicdrift/kumiko-locale-fr": "0.417.0",
|
|
1316
|
+
"@cosmicdrift/kumiko-locale-it": "0.417.0",
|
|
1317
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.417.0",
|
|
1318
|
+
"@cosmicdrift/kumiko-testing": "0.417.0",
|
|
1287
1319
|
"@testing-library/user-event": "^14.6.8",
|
|
1288
1320
|
"@types/sanitize-html": "^2.16.2",
|
|
1289
1321
|
"jsqr": "^1.4.0",
|
|
1290
1322
|
"unpdf": "^1.9.1"
|
|
1291
1323
|
},
|
|
1292
1324
|
"peerDependencies": {
|
|
1293
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
1325
|
+
"@cosmicdrift/kumiko-testing": "0.417.0"
|
|
1294
1326
|
},
|
|
1295
1327
|
"peerDependenciesMeta": {
|
|
1296
1328
|
"@cosmicdrift/kumiko-testing": {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.416.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "ask_user options can carry a preview",
|
|
6
|
+
"detail": "Each option of the `ask_user` agent tool is a string or `{ label, preview? }`, where `preview` is the text the agent writes if the option is chosen. Plain string options keep working."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.414.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.416.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "WhatsApp sendTemplate takes quickReplyPayloads and headerImageLink",
|
|
6
|
+
"detail": "quickReplyPayloads (1 to 10 entries, each non-empty and at most 256 characters) adds one quick-reply button component per entry, so a tap comes back with that payload. headerImageLink (https only) adds an image header. Components are sent as header, body, buttons; without the new fields the request is unchanged."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.415.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.416.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "Handbook pages for the AI assistant, with a process axis in the handbuch CLI",
|
|
6
|
+
"detail": "`createHandbookKnowledgeFeature({ pages, access })` mounts the query handlers `list-pages` (catalog of id, kind, title and questions) and `read-page` (one page in the caller's language, falling back to the default language, cut at 12000 characters with a notice; with `publicPath` it links the page as `<publicPath>/<id>`). Both appear in the agent tool catalog for the roles in `access`; no entity, no migration. The handbuch config takes an optional `processTextsDir` (with `{locale}`): its pages show as an own group in the HTML, and the new command `kumiko handbuch knowledge <config> --out <file>` writes the pages per locale as deterministic JSON without images. A process page may carry `start` (qualified name of a write handler); `list-pages` and `read-page` return it, and their descriptions tell the assistant to answer with the page's steps, link the page and offer to start the task as a plan through exactly that handler. Without `processTextsDir` the built handbook stays byte-identical."
|
|
7
|
+
}
|
|
8
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.417.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "Subject check for the signature feature and a readable-file check on requests",
|
|
6
|
+
"detail": "`createSignatureFeature({ ..., authorizeSubject, unscopedRoles })`: `authorizeSubject(ctx, user, { subjectType, subjectId })` runs for `request`, `cancel`, `issue-link`, `revoke-link`, `sign-in-person` and the queries, except for users holding a role of `unscopedRoles`; `false` answers like a missing record (not found, `null` or an empty page). `signatureRequest:list` keeps only the rows of allowed subjects for a scoped user and reads up to ten base pages to fill one answer (no 403; an answer can still hold fewer rows than `limit`, and it has no `total`); screens and nav stay at `access`. A scoped user must pass a `requestId` eq filter to `signatureSigner:list`, otherwise the query answers 403. `request` now also checks that the caller may read the document through the same decision as GET /files/:id; a file that is unknown or not readable answers `document_not_a_pdf`. `SIGNATURE_INVALID_LINK_REASON` is exported from `signature/static-sign`.",
|
|
7
|
+
"migration": "Apps that request a signature on a file the caller cannot open through GET /files/:id bind it to a record the caller can read first. Apps with authorizeSubject pass a requestId eq filter to signatureSigner:list and do not rely on `total` of signatureRequest:list for scoped users."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"version": "0.416.0",
|
|
11
|
+
"type": "improvement",
|
|
12
|
+
"title": "Signature requests with in-person and link signing",
|
|
13
|
+
"detail": "`createSignatureFeature({ retention, linkSecret, renderHtmlToPdf, deliverLink, signaturePageUrl })` adds the entities `signatureRequest` and `signatureSigner`, the handlers `request`, `sign-in-person`, `issue-link` (sends the link through `deliverLink(ctx, { signerId, url, ..., issuedBy })` inside its own transaction, so the app can dispatch its mail write and pick the issuer's mailbox; it never returns the token), `revoke-link`, `cancel` and the anonymous, rate-limited `open-by-link`, `sign-by-link`, `decline-by-link`. Links carry a row-bound grant in the URL fragment (14 days, 20 opens, single-use signing, one answer for every rejection). The last signature sets the request to `all-signed`; the `signature:job:sweep` cron renders the signature page through the injected print function, appends it with pdf-lib and completes the request; the events `completed`, `declined` and `expired` report the outcome. The subpaths `./signature/web` (`SignaturePad`) and `./signature/static-sign` (no React) ship the signature field.",
|
|
14
|
+
"migration": "The feature adds the tables `read_signature_requests` and `read_signature_signers`; apps that mount it run the schema pipeline migration."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.416.0",
|
|
18
|
+
"type": "improvement",
|
|
19
|
+
"title": "Access rule option for the signature feature",
|
|
20
|
+
"detail": "`createSignatureFeature({ ..., access })` replaces the default `{ roles: [\"TenantAdmin\", \"TenantMember\"] }` on the signed-in handlers, queries, screens and nav, like `createLedgerFeature({ access })`. Without it, nested `ctx.dispatch` calls fail for users that only hold an app-specific role."
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.416.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "Stripe checkout can accept promotion codes",
|
|
6
|
+
"detail": "The new option `allowPromotionCodes` sets `allow_promotion_codes` on every Checkout Session of the app, in subscription and payment mode. Coupons and promotion codes are created in the Stripe dashboard. Default false, so existing checkouts show no code field. The consumer-protection confirmation mail still shows the catalog price captured at consent, not the discounted amount."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.415.0",
|
|
4
10
|
"type": "fix",
|