@fleetless/sdk 5.1.0 → 5.2.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/CHANGELOG.md +10 -0
- package/README.md +1 -2
- package/dist/index.cjs +664 -170
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +664 -170
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -449,16 +449,16 @@ function createAssetsApi(http) {
|
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
452
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-restore.js
|
|
453
453
|
var import_zod6 = require("zod");
|
|
454
454
|
|
|
455
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
455
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-intents.js
|
|
456
456
|
var import_zod5 = require("zod");
|
|
457
457
|
|
|
458
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
458
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/app-users.js
|
|
459
459
|
var import_zod4 = require("zod");
|
|
460
460
|
|
|
461
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
461
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/identity.js
|
|
462
462
|
var import_zod = require("zod");
|
|
463
463
|
var password = import_zod.z.string().min(12).max(256);
|
|
464
464
|
var USER_DISPLAY_NAME_MAX = 120;
|
|
@@ -681,7 +681,95 @@ var recoveryCodesResponse = import_zod.z.object({
|
|
|
681
681
|
recovery_codes: recoveryCodesList.meta({ description: "The ten new recovery codes, lowercase, shown once. Every earlier code is void." })
|
|
682
682
|
});
|
|
683
683
|
|
|
684
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
684
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/app-mail-html.js
|
|
685
|
+
var DEFAULT_MAIL_HTML = {
|
|
686
|
+
"invite": `<!doctype html>
|
|
687
|
+
<html lang="en">
|
|
688
|
+
<head>
|
|
689
|
+
<meta charset="utf-8">
|
|
690
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
691
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
692
|
+
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
|
693
|
+
<meta name="color-scheme" content="light only">
|
|
694
|
+
<meta name="supported-color-schemes" content="light only">
|
|
695
|
+
<title>You're invited to {{ app.name }}</title>
|
|
696
|
+
<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>
|
|
697
|
+
</head>
|
|
698
|
+
<body style="margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%"><div style="display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0">{{ org.name }} has invited you as {{ role.name }}.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </div>
|
|
699
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f4f6f5" style="width:100%;background-color:#f4f6f5;border-collapse:collapse"><tr><td align="center" class="canvas-pad" style="padding:24px 16px 22px">
|
|
700
|
+
<!--[if mso]><table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
|
|
701
|
+
<table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;margin:0 auto;border-collapse:separate"><tr><td class="sheet-pad" bgcolor="#ffffff" style="background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td style="padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif">{% if app.logo_src and app.logo_shape == 'wide' %}<img src="{{ app.logo_src }}" width="168" height="32" alt="{{ app.name }}" style="display:block;border:0">{% elsif app.logo_src %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td width="32" style="width:32px"><img src="{{ app.logo_src }}" width="32" height="32" alt="" style="display:block;border:0"></td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% else %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate"><tr><td width="32" height="32" align="center" bgcolor="{{ app.accent }}" style="width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center">{{ app.initials }}</td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><h1 style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance">You're invited to {{ app.name }}</h1></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Hello {{ user.display_name | default: user.email }},</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word"><b style="color:#101614;font-weight:600">{{ org.name }}</b> has invited you to {{ app.name }} as <b style="color:#101614;font-weight:600">{{ role.name }}</b>.</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate;table-layout:fixed"><tr><td align="center" bgcolor="{{ app.accent }}" style="background-color:{{ app.accent }};border-radius:10px"><a href="{{ link }}" style="display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center">Accept the invitation</a></td></tr><tr><td style="padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Or open this link: <span style="font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px">{{ link }}</span></td></tr></table></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail \u2014 no account is created until you accept.</p></td></tr></table></td></tr><tr><td style="padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66">{% if app.operator_info_url and app.privacy_policy_url %}<p style="margin:0 0 3px"><span style="font-size:12px;font-weight:600;color:#33403b">{{ app.name }}</span> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.operator_info_url }}" style="color:#5f6b66;text-decoration:underline">Operator information</a> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.privacy_policy_url }}" style="color:#5f6b66;text-decoration:underline">Privacy policy</a></p>{% endif %}<p style="margin:0">Secured by Fleetless</p></td></tr></table>
|
|
702
|
+
<!--[if mso]></td></tr></table><![endif]-->
|
|
703
|
+
</td></tr></table>
|
|
704
|
+
</body>
|
|
705
|
+
</html>
|
|
706
|
+
`,
|
|
707
|
+
"verify": `<!doctype html>
|
|
708
|
+
<html lang="en">
|
|
709
|
+
<head>
|
|
710
|
+
<meta charset="utf-8">
|
|
711
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
712
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
713
|
+
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
|
714
|
+
<meta name="color-scheme" content="light only">
|
|
715
|
+
<meta name="supported-color-schemes" content="light only">
|
|
716
|
+
<title>Confirm your email for {{ app.name }}</title>
|
|
717
|
+
<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>
|
|
718
|
+
</head>
|
|
719
|
+
<body style="margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%"><div style="display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0">Confirm this address so you can sign in.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </div>
|
|
720
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f4f6f5" style="width:100%;background-color:#f4f6f5;border-collapse:collapse"><tr><td align="center" class="canvas-pad" style="padding:24px 16px 22px">
|
|
721
|
+
<!--[if mso]><table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
|
|
722
|
+
<table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;margin:0 auto;border-collapse:separate"><tr><td class="sheet-pad" bgcolor="#ffffff" style="background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td style="padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif">{% if app.logo_src and app.logo_shape == 'wide' %}<img src="{{ app.logo_src }}" width="168" height="32" alt="{{ app.name }}" style="display:block;border:0">{% elsif app.logo_src %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td width="32" style="width:32px"><img src="{{ app.logo_src }}" width="32" height="32" alt="" style="display:block;border:0"></td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% else %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate"><tr><td width="32" height="32" align="center" bgcolor="{{ app.accent }}" style="width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center">{{ app.initials }}</td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><h1 style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance">Confirm your email for {{ app.name }}</h1></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Hello {{ user.email }},</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Confirm this address so you can sign in to {{ app.name }}.</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate;table-layout:fixed"><tr><td align="center" bgcolor="{{ app.accent }}" style="background-color:{{ app.accent }};border-radius:10px"><a href="{{ link }}" style="display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center">Confirm this address</a></td></tr><tr><td style="padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Or open this link: <span style="font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px">{{ link }}</span></td></tr></table></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail \u2014 the account stays unconfirmed and cannot be used.</p></td></tr></table></td></tr><tr><td style="padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66">{% if app.operator_info_url and app.privacy_policy_url %}<p style="margin:0 0 3px"><span style="font-size:12px;font-weight:600;color:#33403b">{{ app.name }}</span> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.operator_info_url }}" style="color:#5f6b66;text-decoration:underline">Operator information</a> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.privacy_policy_url }}" style="color:#5f6b66;text-decoration:underline">Privacy policy</a></p>{% endif %}<p style="margin:0">Secured by Fleetless</p></td></tr></table>
|
|
723
|
+
<!--[if mso]></td></tr></table><![endif]-->
|
|
724
|
+
</td></tr></table>
|
|
725
|
+
</body>
|
|
726
|
+
</html>
|
|
727
|
+
`,
|
|
728
|
+
"reset": `<!doctype html>
|
|
729
|
+
<html lang="en">
|
|
730
|
+
<head>
|
|
731
|
+
<meta charset="utf-8">
|
|
732
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
733
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
734
|
+
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
|
735
|
+
<meta name="color-scheme" content="light only">
|
|
736
|
+
<meta name="supported-color-schemes" content="light only">
|
|
737
|
+
<title>Reset your {{ app.name }} password</title>
|
|
738
|
+
<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>
|
|
739
|
+
</head>
|
|
740
|
+
<body style="margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%"><div style="display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0">Choose a new password, or ignore this mail.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </div>
|
|
741
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f4f6f5" style="width:100%;background-color:#f4f6f5;border-collapse:collapse"><tr><td align="center" class="canvas-pad" style="padding:24px 16px 22px">
|
|
742
|
+
<!--[if mso]><table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
|
|
743
|
+
<table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;margin:0 auto;border-collapse:separate"><tr><td class="sheet-pad" bgcolor="#ffffff" style="background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td style="padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif">{% if app.logo_src and app.logo_shape == 'wide' %}<img src="{{ app.logo_src }}" width="168" height="32" alt="{{ app.name }}" style="display:block;border:0">{% elsif app.logo_src %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td width="32" style="width:32px"><img src="{{ app.logo_src }}" width="32" height="32" alt="" style="display:block;border:0"></td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% else %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate"><tr><td width="32" height="32" align="center" bgcolor="{{ app.accent }}" style="width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center">{{ app.initials }}</td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><h1 style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance">Reset your {{ app.name }} password</h1></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Hello {{ user.email }},</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Someone asked to reset the password for this address at {{ app.name }}.</p></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate;table-layout:fixed"><tr><td align="center" bgcolor="{{ app.accent }}" style="background-color:{{ app.accent }};border-radius:10px"><a href="{{ link }}" style="display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center">Choose a new password</a></td></tr><tr><td style="padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">Or open this link: <span style="font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px">{{ link }}</span></td></tr></table></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail \u2014 your current password keeps working and nothing changes.</p></td></tr></table></td></tr><tr><td style="padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66">{% if app.operator_info_url and app.privacy_policy_url %}<p style="margin:0 0 3px"><span style="font-size:12px;font-weight:600;color:#33403b">{{ app.name }}</span> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.operator_info_url }}" style="color:#5f6b66;text-decoration:underline">Operator information</a> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.privacy_policy_url }}" style="color:#5f6b66;text-decoration:underline">Privacy policy</a></p>{% endif %}<p style="margin:0">Secured by Fleetless</p></td></tr></table>
|
|
744
|
+
<!--[if mso]></td></tr></table><![endif]-->
|
|
745
|
+
</td></tr></table>
|
|
746
|
+
</body>
|
|
747
|
+
</html>
|
|
748
|
+
`,
|
|
749
|
+
"login_code": `<!doctype html>
|
|
750
|
+
<html lang="en">
|
|
751
|
+
<head>
|
|
752
|
+
<meta charset="utf-8">
|
|
753
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
754
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
755
|
+
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
|
756
|
+
<meta name="color-scheme" content="light only">
|
|
757
|
+
<meta name="supported-color-schemes" content="light only">
|
|
758
|
+
<title>Your {{ app.name }} sign-in code</title>
|
|
759
|
+
<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>
|
|
760
|
+
</head>
|
|
761
|
+
<body style="margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%"><div style="display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0">It works once, for {{ expires_in_minutes }} minutes.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </div>
|
|
762
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f4f6f5" style="width:100%;background-color:#f4f6f5;border-collapse:collapse"><tr><td align="center" class="canvas-pad" style="padding:24px 16px 22px">
|
|
763
|
+
<!--[if mso]><table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]-->
|
|
764
|
+
<table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;margin:0 auto;border-collapse:separate"><tr><td class="sheet-pad" bgcolor="#ffffff" style="background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td style="padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif">{% if app.logo_src and app.logo_shape == 'wide' %}<img src="{{ app.logo_src }}" width="168" height="32" alt="{{ app.name }}" style="display:block;border:0">{% elsif app.logo_src %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"><tr><td width="32" style="width:32px"><img src="{{ app.logo_src }}" width="32" height="32" alt="" style="display:block;border:0"></td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% else %}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate"><tr><td width="32" height="32" align="center" bgcolor="{{ app.accent }}" style="width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center">{{ app.initials }}</td><td style="padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><h1 style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance">Your sign-in code</h1></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:separate"><tr><td align="center" bgcolor="#eef2f0" style="background-color:#eef2f0;border-radius:10px;padding:18px 16px;font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:30px;line-height:30px;font-weight:500;letter-spacing:0.16em;color:#101614;text-align:center;font-variant-numeric:tabular-nums;-webkit-user-select:all;user-select:all">{{ code }}</td></tr></table></td></tr><tr><td style="padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif"><p style="margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word">It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.</p></td></tr></table></td></tr><tr><td style="padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66">{% if app.operator_info_url and app.privacy_policy_url %}<p style="margin:0 0 3px"><span style="font-size:12px;font-weight:600;color:#33403b">{{ app.name }}</span> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.operator_info_url }}" style="color:#5f6b66;text-decoration:underline">Operator information</a> <span style="color:#a2aaa6;padding:0 2px">\xB7</span> <a href="{{ app.privacy_policy_url }}" style="color:#5f6b66;text-decoration:underline">Privacy policy</a></p>{% endif %}<p style="margin:0">Secured by Fleetless</p></td></tr></table>
|
|
765
|
+
<!--[if mso]></td></tr></table><![endif]-->
|
|
766
|
+
</td></tr></table>
|
|
767
|
+
</body>
|
|
768
|
+
</html>
|
|
769
|
+
`
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/legal.js
|
|
685
773
|
var import_zod2 = require("zod");
|
|
686
774
|
var httpsLegalUrl = import_zod2.z.url().max(2048).regex(/^https:\/\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)/).refine((value) => {
|
|
687
775
|
try {
|
|
@@ -701,7 +789,7 @@ var legalTextReferences = import_zod2.z.object({
|
|
|
701
789
|
dpa: legalDocumentReference.nullable()
|
|
702
790
|
}).strict();
|
|
703
791
|
|
|
704
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
792
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/rights.js
|
|
705
793
|
var import_zod3 = require("zod");
|
|
706
794
|
var ROLE_KEY_PATTERN = /^(?!defaults$)[a-z][a-z0-9_]{0,62}$/;
|
|
707
795
|
var ROLE_KEY_RULE = "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all \u2014 `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved.";
|
|
@@ -739,7 +827,7 @@ var ENTRY_KIND_OF = {
|
|
|
739
827
|
};
|
|
740
828
|
var SECTIONS = Object.keys(ENTRY_KIND_OF);
|
|
741
829
|
|
|
742
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
830
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/app-users.js
|
|
743
831
|
var APP_USER_DISPLAY_NAME_MAX = 120;
|
|
744
832
|
var providerSlug = import_zod4.z.string().max(40).regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "must be lowercase and hyphen-separated, starting with a letter");
|
|
745
833
|
var appUserStatus = import_zod4.z.enum(["pending_verification", "active", "blocked"]);
|
|
@@ -1059,7 +1147,7 @@ Accept the invitation:
|
|
|
1059
1147
|
The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail \u2014 no account is created until you accept.
|
|
1060
1148
|
${APP_LEGAL_MAIL_FOOTER}
|
|
1061
1149
|
`,
|
|
1062
|
-
html:
|
|
1150
|
+
html: DEFAULT_MAIL_HTML.invite
|
|
1063
1151
|
},
|
|
1064
1152
|
verify: {
|
|
1065
1153
|
subject: "Confirm your email for {{ app.name }}",
|
|
@@ -1071,7 +1159,7 @@ Confirm this address so you can sign in to {{ app.name }}:
|
|
|
1071
1159
|
The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail \u2014 the account stays unconfirmed and cannot be used.
|
|
1072
1160
|
${APP_LEGAL_MAIL_FOOTER}
|
|
1073
1161
|
`,
|
|
1074
|
-
html:
|
|
1162
|
+
html: DEFAULT_MAIL_HTML.verify
|
|
1075
1163
|
},
|
|
1076
1164
|
reset: {
|
|
1077
1165
|
subject: "Reset your {{ app.name }} password",
|
|
@@ -1085,7 +1173,7 @@ Choose a new password:
|
|
|
1085
1173
|
The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail \u2014 your current password keeps working and nothing changes.
|
|
1086
1174
|
${APP_LEGAL_MAIL_FOOTER}
|
|
1087
1175
|
`,
|
|
1088
|
-
html:
|
|
1176
|
+
html: DEFAULT_MAIL_HTML.reset
|
|
1089
1177
|
},
|
|
1090
1178
|
login_code: {
|
|
1091
1179
|
subject: "Your {{ app.name }} sign-in code",
|
|
@@ -1094,7 +1182,7 @@ ${APP_LEGAL_MAIL_FOOTER}
|
|
|
1094
1182
|
It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.
|
|
1095
1183
|
|
|
1096
1184
|
${APP_LEGAL_MAIL_FOOTER}`,
|
|
1097
|
-
html:
|
|
1185
|
+
html: DEFAULT_MAIL_HTML.login_code
|
|
1098
1186
|
}
|
|
1099
1187
|
};
|
|
1100
1188
|
var appMailTemplate = import_zod4.z.object({
|
|
@@ -1127,7 +1215,7 @@ var mailOutcome = import_zod4.z.object({
|
|
|
1127
1215
|
})
|
|
1128
1216
|
});
|
|
1129
1217
|
|
|
1130
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
1218
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-intents.js
|
|
1131
1219
|
var hash = import_zod5.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1132
1220
|
var uuid = import_zod5.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/);
|
|
1133
1221
|
var opaqueId = import_zod5.z.string().min(1);
|
|
@@ -1199,6 +1287,10 @@ var branches = [
|
|
|
1199
1287
|
captured("ops_event.retention", import_zod5.z.strictObject({ ...org2, ...batch })),
|
|
1200
1288
|
captured("ops_global_event.retention", import_zod5.z.strictObject(batch)),
|
|
1201
1289
|
captured("operator_audit.retention", import_zod5.z.strictObject(batch)),
|
|
1290
|
+
// The waiting list has no organization: entries are deleted when their own period ends
|
|
1291
|
+
// (a sweep), or when the person withdraws (one entry, named by its id, never its address).
|
|
1292
|
+
captured("waitlist.retention", import_zod5.z.strictObject(batch)),
|
|
1293
|
+
captured("waitlist.withdrawal", import_zod5.z.strictObject({ entry_id: uuid })),
|
|
1202
1294
|
plain("org_note_text.remove", import_zod5.z.strictObject({ ...org2, old_note_generation: uuid })),
|
|
1203
1295
|
plain("org_note_text.replace", import_zod5.z.strictObject({ ...org2, old_note_generation: uuid })),
|
|
1204
1296
|
captured("oidc_interaction.expire", import_zod5.z.strictObject({ ...org2, ...batch })),
|
|
@@ -1221,7 +1313,7 @@ var journalIntentV2 = import_zod5.z.discriminatedUnion("kind", [
|
|
|
1221
1313
|
...branches.slice(1).map((branch) => branch.extend(envelope))
|
|
1222
1314
|
]);
|
|
1223
1315
|
|
|
1224
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
1316
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-restore.js
|
|
1225
1317
|
var hash2 = import_zod6.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1226
1318
|
var uuid2 = import_zod6.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/);
|
|
1227
1319
|
var opaqueId2 = import_zod6.z.string().min(1);
|
|
@@ -1641,7 +1733,7 @@ var journalReplayReceiptBody = import_zod6.z.strictObject(receiptFields).superRe
|
|
|
1641
1733
|
}).describe("JSON Schema consumers must also verify counts, exact erase-proof set, reference bindings, kind/registry surface applicability and pass outcomes, signatures and protected-version readbacks.");
|
|
1642
1734
|
var journalReplayReceipt = journalReplayReceiptBody.safeExtend({ receipt_hash: hash2, signature: signature2 });
|
|
1643
1735
|
|
|
1644
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
1736
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-manifests.js
|
|
1645
1737
|
var import_zod7 = require("zod");
|
|
1646
1738
|
var uuid3 = import_zod7.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);
|
|
1647
1739
|
var hash3 = import_zod7.z.string().regex(/^[0-9a-f]{64}$/);
|
|
@@ -1662,6 +1754,7 @@ var journalManifestScope = import_zod7.z.union([
|
|
|
1662
1754
|
import_zod7.z.strictObject({ kind: import_zod7.z.literal("console_oauth") }),
|
|
1663
1755
|
import_zod7.z.strictObject({ kind: import_zod7.z.literal("global_ops_event") }),
|
|
1664
1756
|
import_zod7.z.strictObject({ kind: import_zod7.z.literal("operator_audit") }),
|
|
1757
|
+
import_zod7.z.strictObject({ kind: import_zod7.z.literal("waitlist") }),
|
|
1665
1758
|
import_zod7.z.strictObject({ kind: import_zod7.z.literal("subject"), subject_kind: import_zod7.z.enum(["developer", "app_user"]), subject_id: uuid3 })
|
|
1666
1759
|
]);
|
|
1667
1760
|
var uuidRowTable = import_zod7.z.enum([
|
|
@@ -1671,8 +1764,13 @@ var uuidRowTable = import_zod7.z.enum([
|
|
|
1671
1764
|
"oidc_interactions",
|
|
1672
1765
|
"organization_exports",
|
|
1673
1766
|
"ops_notification_jobs",
|
|
1674
|
-
"console_oauth_codes"
|
|
1767
|
+
"console_oauth_codes",
|
|
1768
|
+
"waitlist",
|
|
1769
|
+
"waitlist_invitations",
|
|
1770
|
+
"waitlist_invitation_proofs",
|
|
1771
|
+
"waitlist_consents"
|
|
1675
1772
|
]);
|
|
1773
|
+
var waitlistMailAction = import_zod7.z.enum(["waitlist_invite", "waitlist_reinvite", "waitlist_decline", "waitlist_confirm"]);
|
|
1676
1774
|
var member = { membership_kind: membership };
|
|
1677
1775
|
var retentionRangeTable = import_zod7.z.enum(["datapoint_series_samples", "bridge_latency_buckets"]);
|
|
1678
1776
|
var journalManifestRow = import_zod7.z.union([
|
|
@@ -1702,6 +1800,20 @@ var journalManifestRow = import_zod7.z.union([
|
|
|
1702
1800
|
import_zod7.z.strictObject({ ...member, type: import_zod7.z.literal("global_ops_event"), event_id: uuid3 }),
|
|
1703
1801
|
import_zod7.z.strictObject({ ...member, type: import_zod7.z.literal("org_operator_audit"), org_id: uuid3, audit_id: uuid3 }),
|
|
1704
1802
|
import_zod7.z.strictObject({ ...member, type: import_zod7.z.literal("global_operator_audit"), audit_id: uuid3 }),
|
|
1803
|
+
import_zod7.z.strictObject({
|
|
1804
|
+
...member,
|
|
1805
|
+
type: import_zod7.z.literal("waitlist_mail_effect"),
|
|
1806
|
+
effect_id: uuid3,
|
|
1807
|
+
source_action: waitlistMailAction.meta({ description: "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them." })
|
|
1808
|
+
}),
|
|
1809
|
+
import_zod7.z.strictObject({
|
|
1810
|
+
...member,
|
|
1811
|
+
type: import_zod7.z.literal("waitlist_mail_delivery"),
|
|
1812
|
+
delivery_id: uuid3,
|
|
1813
|
+
effect_id: uuid3,
|
|
1814
|
+
entry_id: uuid3.meta({ description: "The waiting-list entry the delivery was addressed for (its target); the entry itself may already be gone." }),
|
|
1815
|
+
source_action: waitlistMailAction.meta({ description: "The source action of the delivery's effect when it was frozen; replay deletes the delivery only if its effect still has it." })
|
|
1816
|
+
}),
|
|
1705
1817
|
import_zod7.z.strictObject({
|
|
1706
1818
|
type: import_zod7.z.literal("retention_range"),
|
|
1707
1819
|
membership_kind: import_zod7.z.literal("affected"),
|
|
@@ -1756,7 +1868,8 @@ var sweepKinds = [
|
|
|
1756
1868
|
"mcp_client.expire",
|
|
1757
1869
|
"mcp_central_client.expire",
|
|
1758
1870
|
"console_interaction.expire",
|
|
1759
|
-
"console_code.expire"
|
|
1871
|
+
"console_code.expire",
|
|
1872
|
+
"waitlist.retention"
|
|
1760
1873
|
];
|
|
1761
1874
|
var explicitKinds = ["history.slug_delete", "robot_assets.clear"];
|
|
1762
1875
|
var journalManifestBatch = import_zod7.z.union([
|
|
@@ -1801,6 +1914,10 @@ function rowKey(row) {
|
|
|
1801
1914
|
case "org_operator_audit":
|
|
1802
1915
|
case "global_operator_audit":
|
|
1803
1916
|
return JSON.stringify(["operator_audit", row.audit_id]);
|
|
1917
|
+
case "waitlist_mail_effect":
|
|
1918
|
+
return JSON.stringify(["operator_effect_outbox", row.effect_id]);
|
|
1919
|
+
case "waitlist_mail_delivery":
|
|
1920
|
+
return JSON.stringify(["operator_effect_mail_deliveries", row.delivery_id]);
|
|
1804
1921
|
case "retention_range":
|
|
1805
1922
|
return JSON.stringify([row.table, "range", row.robot_id, row.series_id ?? null, row.from]);
|
|
1806
1923
|
}
|
|
@@ -1838,6 +1955,8 @@ var journalManifestIntentProjection = import_zod7.z.union(backedBranches.map((br
|
|
|
1838
1955
|
kind: branch.shape.kind,
|
|
1839
1956
|
ids: branch.shape.ids
|
|
1840
1957
|
})));
|
|
1958
|
+
var waitlistTables = /* @__PURE__ */ new Set(["waitlist", "waitlist_invitations", "waitlist_invitation_proofs", "waitlist_consents"]);
|
|
1959
|
+
var isWaitlistMember = (row) => row.type === "uuid_row" && waitlistTables.has(row.table) || row.type === "waitlist_mail_effect" || row.type === "waitlist_mail_delivery";
|
|
1841
1960
|
var nonOrganizationScope = {
|
|
1842
1961
|
"mcp_central_client.revoke": "central_mcp",
|
|
1843
1962
|
"mcp_central_interaction.expire": "central_mcp",
|
|
@@ -1846,6 +1965,8 @@ var nonOrganizationScope = {
|
|
|
1846
1965
|
"console_code.expire": "console_oauth",
|
|
1847
1966
|
"ops_global_event.retention": "global_ops_event",
|
|
1848
1967
|
"operator_audit.retention": "operator_audit",
|
|
1968
|
+
"waitlist.retention": "waitlist",
|
|
1969
|
+
"waitlist.withdrawal": "waitlist",
|
|
1849
1970
|
"auth_factor.remove": "subject"
|
|
1850
1971
|
};
|
|
1851
1972
|
var rangeTableOfKind = {
|
|
@@ -1912,11 +2033,38 @@ var journalManifestBinding = import_zod7.z.strictObject({
|
|
|
1912
2033
|
central_mcp: (row) => row.type.startsWith("central_mcp_"),
|
|
1913
2034
|
console_oauth: (row) => row.type === "console_interaction" || row.type === "uuid_row" && row.table === "console_oauth_codes",
|
|
1914
2035
|
global_ops_event: (row) => row.type === "global_ops_event" || row.type === "uuid_row" && row.table === "ops_notification_jobs",
|
|
1915
|
-
operator_audit: (row) => row.type === "global_operator_audit" || row.type === "org_operator_audit"
|
|
2036
|
+
operator_audit: (row) => row.type === "global_operator_audit" || row.type === "org_operator_audit",
|
|
2037
|
+
waitlist: isWaitlistMember
|
|
1916
2038
|
};
|
|
1917
2039
|
const allows = allowedRows[manifest2.scope.kind];
|
|
1918
2040
|
if (allows && !manifest2.rows.every(allows))
|
|
1919
2041
|
problem("Row outside closed source scope", ["manifest", "rows"]);
|
|
2042
|
+
if (manifest2.scope.kind !== "waitlist" && manifest2.rows.some(isWaitlistMember))
|
|
2043
|
+
problem("Waiting-list row outside the waitlist scope", ["manifest", "rows"]);
|
|
2044
|
+
if (manifest2.scope.kind === "waitlist") {
|
|
2045
|
+
if (manifest2.entries.length !== 0)
|
|
2046
|
+
problem("A waitlist manifest has no object entries", ["manifest", "entries"]);
|
|
2047
|
+
const effects = new Map(manifest2.rows.flatMap((row) => row.type === "waitlist_mail_effect" ? [[row.effect_id, row.source_action]] : []));
|
|
2048
|
+
const deliveries = manifest2.rows.filter((row) => row.type === "waitlist_mail_delivery");
|
|
2049
|
+
if (deliveries.some((row) => effects.has(row.effect_id) && effects.get(row.effect_id) !== row.source_action)) {
|
|
2050
|
+
problem("A delivery and its effect disagree on the source action", ["manifest", "rows"]);
|
|
2051
|
+
}
|
|
2052
|
+
if (intent.kind === "waitlist.withdrawal") {
|
|
2053
|
+
const entries = manifest2.rows.filter((row) => row.type === "uuid_row" && row.table === "waitlist");
|
|
2054
|
+
const only = entries[0];
|
|
2055
|
+
if (entries.length !== 1 || only?.type !== "uuid_row" || only.id !== ids.entry_id || only.membership_kind !== "affected") {
|
|
2056
|
+
problem("A withdrawal names exactly its own entry", ["manifest", "rows"]);
|
|
2057
|
+
}
|
|
2058
|
+
if (deliveries.some((row) => row.entry_id !== ids.entry_id)) {
|
|
2059
|
+
problem("A withdrawal deletes only its own entry's deliveries", ["manifest", "rows"]);
|
|
2060
|
+
}
|
|
2061
|
+
for (const [effectId, sourceAction] of effects) {
|
|
2062
|
+
if (!deliveries.some((row) => row.effect_id === effectId && row.source_action === sourceAction)) {
|
|
2063
|
+
problem("A withdrawal deletes only the effects of its own deliveries", ["manifest", "rows"]);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
1920
2068
|
const ranges = manifest2.rows.filter((row) => row.type === "retention_range");
|
|
1921
2069
|
if (ranges.length > 0)
|
|
1922
2070
|
for (const message of new Set(retentionRangeProblems(intent.kind, ids, ranges)))
|
|
@@ -1941,7 +2089,7 @@ var journalManifestBinding = import_zod7.z.strictObject({
|
|
|
1941
2089
|
problem("Unexpected batch", ["manifest", "batches"]);
|
|
1942
2090
|
}).describe("JSON Schema consumers must also verify exact intent/scope/batch binding, sorted physical membership, original bytes and protected readbacks.");
|
|
1943
2091
|
|
|
1944
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2092
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-seals.js
|
|
1945
2093
|
var import_zod8 = require("zod");
|
|
1946
2094
|
var hash4 = import_zod8.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1947
2095
|
var uuid4 = import_zod8.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/);
|
|
@@ -2023,7 +2171,7 @@ var journalFinalSealBody = import_zod8.z.strictObject({
|
|
|
2023
2171
|
}, { path: ["cutoff_utc"], message: "Must equal max(ceil_to_second(T + E_max + W_max), previous C + 1 second)" }).describe("JSON Schema consumers must also verify C = max(ceil_to_second(T + E_max + W_max), previous C + 1 second), original signatures and complete drain/admission evidence.");
|
|
2024
2172
|
var journalFinalSeal = journalFinalSealBody.safeExtend({ seal_hash: hash4, signature: signature3 });
|
|
2025
2173
|
|
|
2026
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2174
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/journal-controls.js
|
|
2027
2175
|
var import_zod9 = require("zod");
|
|
2028
2176
|
var hash5 = import_zod9.z.string().regex(/^[0-9a-f]{64}$/);
|
|
2029
2177
|
var zeroHash = import_zod9.z.literal("0".repeat(64));
|
|
@@ -2126,24 +2274,25 @@ var journalRegistryActivationReceipt = import_zod9.z.union([
|
|
|
2126
2274
|
laterActivationBody.extend({ receipt_hash: hash5, signature: signature4 })
|
|
2127
2275
|
]);
|
|
2128
2276
|
|
|
2129
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2277
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/legal-offers.js
|
|
2130
2278
|
var import_zod13 = require("zod");
|
|
2131
2279
|
|
|
2132
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2280
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/plans.js
|
|
2133
2281
|
var import_zod12 = require("zod");
|
|
2134
2282
|
|
|
2135
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2283
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/purchase-operation-key.js
|
|
2136
2284
|
var import_zod10 = require("zod");
|
|
2137
2285
|
var purchaseOperationKey = import_zod10.z.uuid().meta({ description: "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input." });
|
|
2138
2286
|
|
|
2139
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2287
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/confirmation-proof.js
|
|
2140
2288
|
var import_zod11 = require("zod");
|
|
2141
2289
|
var confirmationProof = import_zod11.z.string().regex(/^[A-Za-z0-9_-]{43}$/).meta({
|
|
2142
2290
|
description: "Opaque 32-byte Cloud proof, unpadded base64url. Syntax alone is not evidence."
|
|
2143
2291
|
});
|
|
2144
2292
|
|
|
2145
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2293
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/plans.js
|
|
2146
2294
|
var planId = import_zod12.z.enum(["basic", "plus", "pro", "enterprise"]);
|
|
2295
|
+
var PLAN_ORDER = ["basic", "plus", "pro", "enterprise"];
|
|
2147
2296
|
var planLimitKey = import_zod12.z.enum([
|
|
2148
2297
|
"seats",
|
|
2149
2298
|
"robots",
|
|
@@ -2237,11 +2386,11 @@ var PLANS = {
|
|
|
2237
2386
|
},
|
|
2238
2387
|
features: {
|
|
2239
2388
|
app_mcp: false,
|
|
2240
|
-
two_factor:
|
|
2389
|
+
two_factor: true,
|
|
2241
2390
|
require_two_factor: false,
|
|
2242
2391
|
app_oidc: false,
|
|
2243
2392
|
hosted_logo: false,
|
|
2244
|
-
audit_export:
|
|
2393
|
+
audit_export: true,
|
|
2245
2394
|
addons: false
|
|
2246
2395
|
},
|
|
2247
2396
|
prices: pricesFromEurMonth(0),
|
|
@@ -2251,12 +2400,12 @@ var PLANS = {
|
|
|
2251
2400
|
id: "plus",
|
|
2252
2401
|
name: "Plus",
|
|
2253
2402
|
limits: {
|
|
2254
|
-
seats:
|
|
2403
|
+
seats: 5,
|
|
2255
2404
|
robots: 3,
|
|
2256
2405
|
apps: 3,
|
|
2257
|
-
app_users:
|
|
2406
|
+
app_users: 100,
|
|
2258
2407
|
live_video_ms_per_month: 36e7,
|
|
2259
|
-
asset_bytes_per_robot:
|
|
2408
|
+
asset_bytes_per_robot: 1e9,
|
|
2260
2409
|
history_days: 30,
|
|
2261
2410
|
audit_days: 30,
|
|
2262
2411
|
collection_records: 25e4,
|
|
@@ -2268,22 +2417,22 @@ var PLANS = {
|
|
|
2268
2417
|
require_two_factor: false,
|
|
2269
2418
|
app_oidc: true,
|
|
2270
2419
|
hosted_logo: true,
|
|
2271
|
-
audit_export:
|
|
2420
|
+
audit_export: true,
|
|
2272
2421
|
addons: false
|
|
2273
2422
|
},
|
|
2274
|
-
prices: pricesFromEurMonth(
|
|
2423
|
+
prices: pricesFromEurMonth(3e3),
|
|
2275
2424
|
support: "email"
|
|
2276
2425
|
},
|
|
2277
2426
|
pro: {
|
|
2278
2427
|
id: "pro",
|
|
2279
2428
|
name: "Pro",
|
|
2280
2429
|
limits: {
|
|
2281
|
-
seats:
|
|
2282
|
-
robots:
|
|
2283
|
-
apps:
|
|
2284
|
-
app_users:
|
|
2285
|
-
live_video_ms_per_month:
|
|
2286
|
-
asset_bytes_per_robot:
|
|
2430
|
+
seats: 15,
|
|
2431
|
+
robots: 10,
|
|
2432
|
+
apps: 10,
|
|
2433
|
+
app_users: 500,
|
|
2434
|
+
live_video_ms_per_month: 18e8,
|
|
2435
|
+
asset_bytes_per_robot: 1e9,
|
|
2287
2436
|
history_days: 90,
|
|
2288
2437
|
audit_days: 90,
|
|
2289
2438
|
collection_records: 1e6,
|
|
@@ -2298,7 +2447,7 @@ var PLANS = {
|
|
|
2298
2447
|
audit_export: true,
|
|
2299
2448
|
addons: true
|
|
2300
2449
|
},
|
|
2301
|
-
prices: pricesFromEurMonth(
|
|
2450
|
+
prices: pricesFromEurMonth(15e3),
|
|
2302
2451
|
support: "priority"
|
|
2303
2452
|
},
|
|
2304
2453
|
enterprise: {
|
|
@@ -2409,7 +2558,10 @@ var orgPlan = import_zod12.z.object({
|
|
|
2409
2558
|
needs_choice: import_zod12.z.boolean().meta({
|
|
2410
2559
|
description: "Whether the org uses more than Basic allows, so an owner has to choose what stays before `at`."
|
|
2411
2560
|
})
|
|
2412
|
-
}).nullable().meta({ description: "Set only while the org is still on the beta; `null` for every other org." })
|
|
2561
|
+
}).nullable().meta({ description: "Set only while the org is still on the beta; `null` for every other org." }),
|
|
2562
|
+
paid_plans: import_zod12.z.enum(["open", "closed"]).meta({
|
|
2563
|
+
description: "Whether this org may buy a paid plan. `open` when this cloud sells paid plans to every org, or Fleetless has unlocked this one; `closed` otherwise, and then starting, displaying or confirming a purchase or a paid change, and a plan change to anything but Basic, answer `403 plan_purchase_closed`. The plans and their prices stay readable either way."
|
|
2564
|
+
})
|
|
2413
2565
|
});
|
|
2414
2566
|
var planChangePrepareRequest = import_zod12.z.object({
|
|
2415
2567
|
operation_key: purchaseOperationKey,
|
|
@@ -2447,7 +2599,7 @@ var adminPlanChangeRequest = import_zod12.z.object({
|
|
|
2447
2599
|
})
|
|
2448
2600
|
}).strict();
|
|
2449
2601
|
|
|
2450
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2602
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/legal-offers.js
|
|
2451
2603
|
var utc = import_zod13.z.iso.datetime().regex(/Z$/);
|
|
2452
2604
|
var text = import_zod13.z.string().min(1).regex(/\S/);
|
|
2453
2605
|
var cents2 = import_zod13.z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
@@ -2583,7 +2735,7 @@ var legalOfferConflictDetails = import_zod13.z.strictObject({
|
|
|
2583
2735
|
rule: import_zod13.z.enum(["withdrawn", "stale", "expired", "reused", "boundary_changed", "deadline_unavailable"])
|
|
2584
2736
|
});
|
|
2585
2737
|
|
|
2586
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2738
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/common.js
|
|
2587
2739
|
var import_zod14 = require("zod");
|
|
2588
2740
|
var SLUG_RULE = "A name is lower-case: it starts with a letter, continues with letters and digits, and joins further words with a single underscore \u2014 `battery_voltage`. Capitals, dashes, dots, spaces, a leading digit and a doubled or trailing underscore are all refused.";
|
|
2589
2741
|
var slug = import_zod14.z.string().min(2).max(63).regex(/^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/, SLUG_RULE);
|
|
@@ -2614,7 +2766,7 @@ var applyError = import_zod14.z.object({
|
|
|
2614
2766
|
details: import_zod14.z.record(import_zod14.z.string(), import_zod14.z.unknown()).optional()
|
|
2615
2767
|
});
|
|
2616
2768
|
|
|
2617
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2769
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/mcp.js
|
|
2618
2770
|
var import_zod15 = require("zod");
|
|
2619
2771
|
function mcpAppEndpointPath(appIdentifier2) {
|
|
2620
2772
|
return `/mcp/${appIdentifier2}`;
|
|
@@ -2659,13 +2811,13 @@ var mcpRobotDatasheet = import_zod15.z.object({
|
|
|
2659
2811
|
});
|
|
2660
2812
|
var MCP_ASSET_LINK_TTL_MS = 15 * 60 * 1e3;
|
|
2661
2813
|
|
|
2662
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2814
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/protocol.js
|
|
2663
2815
|
var import_zod22 = require("zod");
|
|
2664
2816
|
|
|
2665
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2817
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/assets.js
|
|
2666
2818
|
var import_zod17 = require("zod");
|
|
2667
2819
|
|
|
2668
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2820
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/file-too-large-details.js
|
|
2669
2821
|
var import_zod16 = require("zod");
|
|
2670
2822
|
var fileTooLargeDetails = import_zod16.z.object({
|
|
2671
2823
|
max_bytes: import_zod16.z.number().int().positive().meta({
|
|
@@ -2676,7 +2828,7 @@ var fileTooLargeDetails = import_zod16.z.object({
|
|
|
2676
2828
|
})
|
|
2677
2829
|
});
|
|
2678
2830
|
|
|
2679
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
2831
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/assets.js
|
|
2680
2832
|
var assetKind = import_zod17.z.enum(["urdf", "mesh", "texture"]);
|
|
2681
2833
|
var asset = import_zod17.z.object({
|
|
2682
2834
|
id: import_zod17.z.uuid().meta({ description: "The asset's id in the store." }),
|
|
@@ -3016,10 +3168,10 @@ var assetSyncBusyDetails = import_zod17.z.object({
|
|
|
3016
3168
|
started_at_ms: import_zod17.z.number().int().nonnegative()
|
|
3017
3169
|
});
|
|
3018
3170
|
|
|
3019
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
3171
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/config.js
|
|
3020
3172
|
var import_zod19 = require("zod");
|
|
3021
3173
|
|
|
3022
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
3174
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/alerts.js
|
|
3023
3175
|
var import_zod18 = require("zod");
|
|
3024
3176
|
var alertRowCondition = import_zod18.z.discriminatedUnion("kind", [
|
|
3025
3177
|
import_zod18.z.strictObject({
|
|
@@ -3089,7 +3241,7 @@ var putDatapointDisplayRequest = import_zod18.z.object({
|
|
|
3089
3241
|
y_max: import_zod18.z.number().finite().nullable()
|
|
3090
3242
|
}).strict();
|
|
3091
3243
|
|
|
3092
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
3244
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/config.js
|
|
3093
3245
|
var RTSP_URL_RULE = "The URL has to begin with `rtsp://` or `rtsps://` \u2014 `rtsp://cam-1.plant.local/stream1`. No other scheme is accepted: the bridge opens this with a library that would equally honour `file:`.";
|
|
3094
3246
|
var MJPEG_URL_RULE = "The URL has to begin with `http://` or `https://` \u2014 `http://cam-1.plant.local/video.mjpg`. No other scheme is accepted: the bridge opens this with a library that would equally serve `file:`.";
|
|
3095
3247
|
var DEVICE_PATH_RULE = "A capture device is a path under `/dev/`, and the character straight after it is a letter or a digit \u2014 `/dev/video0`, or a stable `/dev/v4l/by-id/...` symlink. Nothing outside `/dev/` is accepted: the string reaches OpenCV, which would as happily open an ordinary file.";
|
|
@@ -3889,7 +4041,7 @@ var cameraSource = import_zod19.z.discriminatedUnion("kind", [
|
|
|
3889
4041
|
examples: ["/camera/image_raw"]
|
|
3890
4042
|
}),
|
|
3891
4043
|
type: rosTypeName.meta({
|
|
3892
|
-
description: "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
|
|
4044
|
+
description: "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
|
|
3893
4045
|
patternErrorMessage: ROS_TYPE_NAME_RULE,
|
|
3894
4046
|
examples: ["sensor_msgs/msg/Image"]
|
|
3895
4047
|
})
|
|
@@ -3901,11 +4053,12 @@ var cameraSource = import_zod19.z.discriminatedUnion("kind", [
|
|
|
3901
4053
|
/**
|
|
3902
4054
|
* `type` is a **choice**, not a literal, and that is a correction: it was
|
|
3903
4055
|
* written out on the rule that a field the format fixes is written out,
|
|
3904
|
-
* and `type` is not such a field. Its own description names
|
|
4056
|
+
* and `type` is not such a field. Its own description names three values
|
|
3905
4057
|
* and says which applies when — `Image` for raw frames,
|
|
3906
|
-
* `CompressedImage` for a camera that encodes itself
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
4058
|
+
* `CompressedImage` for a camera that encodes itself, `CompressedVideo`
|
|
4059
|
+
* for a topic that carries H.264. A snippet that
|
|
4060
|
+
* picks one picks wrong for most cameras, and picks it invisibly:
|
|
4061
|
+
* `rosTypeName` accepts any of them, publish accepts any, no diagnostic
|
|
3909
4062
|
* fires anywhere, and the bridge then subscribes with the wrong type and
|
|
3910
4063
|
* delivers no frames. A snippet supplying a wrong answer where it could
|
|
3911
4064
|
* have supplied a question is a defect arriving through a hint the
|
|
@@ -3916,22 +4069,22 @@ var cameraSource = import_zod19.z.discriminatedUnion("kind", [
|
|
|
3916
4069
|
* Choice syntax is the one construct here that three layers must each
|
|
3917
4070
|
* pass through unharmed: yaml-language-server's `stringifyObject` emits
|
|
3918
4071
|
* the body verbatim, and monaco-editor's `SnippetParser` parses
|
|
3919
|
-
* `${2|a,b|}` into a placeholder carrying
|
|
4072
|
+
* `${2|a,b,c|}` into a placeholder carrying every option whose
|
|
3920
4073
|
* `toString()` — the text on the buffer before anyone chooses — is the
|
|
3921
4074
|
* first one. So a developer who tabs past this gets a document
|
|
3922
4075
|
* byte-identical to the literal it replaced, and one who opens the
|
|
3923
|
-
* picker gets `CompressedImage`;
|
|
4076
|
+
* picker gets `CompressedImage` or `CompressedVideo`; all three parse.
|
|
3924
4077
|
*/
|
|
3925
4078
|
body: {
|
|
3926
4079
|
kind: "ros",
|
|
3927
4080
|
topic: "${1:/camera/image_raw}",
|
|
3928
|
-
type: "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
|
|
4081
|
+
type: "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
|
|
3929
4082
|
}
|
|
3930
4083
|
}]
|
|
3931
4084
|
}),
|
|
3932
4085
|
strictObject({
|
|
3933
4086
|
kind: import_zod19.z.literal("rtsp").meta({
|
|
3934
|
-
description: "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
|
|
4087
|
+
description: "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
|
|
3935
4088
|
}),
|
|
3936
4089
|
/**
|
|
3937
4090
|
* Scheme-constrained deliberately. The bridge opens these with libraries
|
|
@@ -3954,6 +4107,19 @@ var cameraSource = import_zod19.z.discriminatedUnion("kind", [
|
|
|
3954
4107
|
udp: "The frames travel in their own UDP stream: lower latency on a quiet network, and silent frame loss on any other."
|
|
3955
4108
|
})
|
|
3956
4109
|
}),
|
|
4110
|
+
/**
|
|
4111
|
+
* Opt-in, and absent rather than defaulted: an RTSP camera that exists
|
|
4112
|
+
* today is decoded and encoded again after an upgrade exactly as before,
|
|
4113
|
+
* and a parse writes no `false` into a document nobody put one in. The
|
|
4114
|
+
* bridge reads absent as off (fleetless/fleetless#1117).
|
|
4115
|
+
*
|
|
4116
|
+
* RTSP is the one source that carries this switch. A ROS topic is passed
|
|
4117
|
+
* through by what it carries, see `type` on the `ros` member; MJPEG and
|
|
4118
|
+
* V4L2 are never passed through.
|
|
4119
|
+
*/
|
|
4120
|
+
passthrough: import_zod19.z.boolean().optional().meta({
|
|
4121
|
+
description: "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower."
|
|
4122
|
+
}),
|
|
3957
4123
|
credentials: cameraCredentials.optional()
|
|
3958
4124
|
}).meta({
|
|
3959
4125
|
description: "Frames come from an RTSP stream the robot itself can reach \u2014 a network camera on its own LAN. The bridge opens the connection; the cloud never does, and never needs a route to the camera.",
|
|
@@ -4060,19 +4226,19 @@ var cameraConfig = strictObject({
|
|
|
4060
4226
|
description: "Where this camera's frames come from. `kind` picks one of four sources and fixes which other fields the source may carry, so an impossible camera is unrepresentable rather than merely invalid \u2014 there is no way to write an RTSP camera with a ROS topic."
|
|
4061
4227
|
}),
|
|
4062
4228
|
width: import_zod19.z.number().int().positive().max(7680).meta({
|
|
4063
|
-
description: "The width the bridge scales frames to before sending, in pixels \u2014 what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
|
|
4229
|
+
description: "The width the bridge scales frames to before sending, in pixels \u2014 what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
|
|
4064
4230
|
examples: [1280]
|
|
4065
4231
|
}),
|
|
4066
4232
|
height: import_zod19.z.number().int().positive().max(4320).meta({
|
|
4067
|
-
description: "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this \u2014 its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
|
|
4233
|
+
description: "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this \u2014 its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
|
|
4068
4234
|
examples: [720]
|
|
4069
4235
|
}),
|
|
4070
4236
|
fps: import_zod19.z.number().int().positive().max(60).meta({
|
|
4071
|
-
description: "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
|
|
4237
|
+
description: "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
|
|
4072
4238
|
examples: [15]
|
|
4073
4239
|
}),
|
|
4074
4240
|
bitrate_kbps: import_zod19.z.number().int().positive().max(5e4).meta({
|
|
4075
|
-
description: "The ceiling for the **live** encoding, in kilobits per second \u2014 this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
|
|
4241
|
+
description: "The ceiling for the **live** encoding, in kilobits per second \u2014 this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
|
|
4076
4242
|
examples: [2e3]
|
|
4077
4243
|
}),
|
|
4078
4244
|
snapshot_interval_seconds: snapshotIntervalSeconds.meta({
|
|
@@ -4107,15 +4273,65 @@ var lowBandwidthSection = strictObject({
|
|
|
4107
4273
|
camera: lowBandwidthCamera.optional().meta({
|
|
4108
4274
|
description: "What happens to a running stream in the mode. New streams are refused either way.",
|
|
4109
4275
|
enumDescriptions: describeValues(lowBandwidthCamera.options, {
|
|
4110
|
-
reduce: "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.",
|
|
4276
|
+
reduce: "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.",
|
|
4111
4277
|
stop: "A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have."
|
|
4112
4278
|
})
|
|
4113
4279
|
}),
|
|
4114
|
-
camera_bitrate_kbps: import_zod19.z.number().int().min(50).max(2e4).optional().meta({ description: "Bitrate applied to running streams under `reduce`." })
|
|
4280
|
+
camera_bitrate_kbps: import_zod19.z.number().int().min(50).max(2e4).optional().meta({ description: "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends." })
|
|
4115
4281
|
}).superRefine((s, ctx) => {
|
|
4116
4282
|
if (s.enter_lag_ms !== void 0 && s.exit_lag_ms !== void 0 && s.exit_lag_ms > s.enter_lag_ms)
|
|
4117
4283
|
ctx.addIssue({ code: "custom", path: ["exit_lag_ms"], message: "low_bandwidth.exit_lag_ms must be at or below enter_lag_ms" });
|
|
4118
4284
|
});
|
|
4285
|
+
var LIVE_DEFAULTS = {
|
|
4286
|
+
max_packet_bytes: 1200,
|
|
4287
|
+
encoder: "software"
|
|
4288
|
+
};
|
|
4289
|
+
var LIVE_ENCODERS = ["software", "auto", "nvenc", "vaapi", "v4l2"];
|
|
4290
|
+
var liveEncoder = import_zod19.z.enum(LIVE_ENCODERS);
|
|
4291
|
+
var LIVE_BOUNDS = {
|
|
4292
|
+
max_packet_bytes: { min: 576, max: 1350 },
|
|
4293
|
+
encoder: { values: LIVE_ENCODERS }
|
|
4294
|
+
};
|
|
4295
|
+
var liveSection = strictObject({
|
|
4296
|
+
max_packet_bytes: import_zod19.z.number().int().min(LIVE_BOUNDS.max_packet_bytes.min).max(LIVE_BOUNDS.max_packet_bytes.max).optional().meta({
|
|
4297
|
+
description: `The largest RTP packet the bridge sends, in bytes: fixed header, header extensions and payload, before SRTP adds its tag, retransmissions included. It is not an MTU: the MTU belongs to the path to each viewer, which the robot does not know. On the wire a packet is up to about 80 bytes longer. Lower it when a viewer's path carries less, such as a tunnel inside a tunnel. The ceiling sits just under what the bridge's SRTP library protects (1356 bytes); past that, live video stops. Overrides the bridge's ROS parameter \`live.max_packet_bytes\`; without either, the bridge sends ${LIVE_DEFAULTS.max_packet_bytes}. A change holds from the next frame, for running streams too.`,
|
|
4298
|
+
examples: [LIVE_DEFAULTS.max_packet_bytes]
|
|
4299
|
+
}),
|
|
4300
|
+
encoder: liveEncoder.optional().meta({
|
|
4301
|
+
description: `What encodes live video on the robot. \`software\` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but \`software\` every camera's \`width\` and \`height\` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter \`live.encoder\`; without either, the bridge uses \`${LIVE_DEFAULTS.encoder}\`. A change holds from the next live start; a running stream keeps its encoder.`,
|
|
4302
|
+
enumDescriptions: describeValues(liveEncoder.options, {
|
|
4303
|
+
software: "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
|
|
4304
|
+
auto: "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
|
|
4305
|
+
nvenc: "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
|
|
4306
|
+
vaapi: "Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
|
|
4307
|
+
v4l2: "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
|
|
4308
|
+
})
|
|
4309
|
+
})
|
|
4310
|
+
});
|
|
4311
|
+
var H264_ONLY_ENCODERS = new Set(LIVE_ENCODERS.filter((encoder) => encoder !== "software"));
|
|
4312
|
+
var oddSizeMessage = (encoder, key, value) => `With live.encoder: ${encoder} the bridge sends H.264, which takes no odd ${key}: set an even ${key} instead of ${value}, or live.encoder: software.`;
|
|
4313
|
+
var isMapping = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4314
|
+
var samePath = (a, b) => a.length === b.length && a.every((segment, index) => segment === b[index]);
|
|
4315
|
+
function refuseOddSizes(doc, ctx) {
|
|
4316
|
+
if (!isMapping(doc) || !isMapping(doc.live) || !isMapping(doc.cameras))
|
|
4317
|
+
return;
|
|
4318
|
+
const encoder = doc.live.encoder;
|
|
4319
|
+
if (typeof encoder !== "string" || !H264_ONLY_ENCODERS.has(encoder))
|
|
4320
|
+
return;
|
|
4321
|
+
for (const [slug2, camera] of Object.entries(doc.cameras)) {
|
|
4322
|
+
if (!isMapping(camera))
|
|
4323
|
+
continue;
|
|
4324
|
+
for (const key of ["width", "height"]) {
|
|
4325
|
+
const value = camera[key];
|
|
4326
|
+
const path = ["cameras", slug2, key];
|
|
4327
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value % 2 === 0)
|
|
4328
|
+
continue;
|
|
4329
|
+
if (ctx.issues.some((issue) => samePath(issue.path ?? [], path)))
|
|
4330
|
+
continue;
|
|
4331
|
+
ctx.addIssue({ code: "custom", path, message: oddSizeMessage(encoder, key, value) });
|
|
4332
|
+
}
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4119
4335
|
var FLEETLESS_FORMAT_VERSION = 1;
|
|
4120
4336
|
var capped = (entry2, max, what) => slugKeyed(entry2).refine((m) => Object.keys(m).length <= max, { message: `at most ${max} ${what}` });
|
|
4121
4337
|
var ROS_GLOB_RULE = "A match pattern is an absolute ROS graph name in which `*` stands for any characters inside one segment and `**` for any number of whole segments \u2014 `/arm/**`, `/diagnostics/*`, `/joint_*`. It begins with a slash. A relative pattern, a trailing slash, a dash, a dot, or `**` mixed into a longer segment is refused.";
|
|
@@ -4207,8 +4423,22 @@ var robotConfigDoc = strictObject({
|
|
|
4207
4423
|
description: "Enters after ten seconds above two seconds of lag, caps every datapoint to 1 Hz and lets running streams continue at a reduced bitrate.",
|
|
4208
4424
|
body: { enter_lag_ms: 2e3, datapoint_max_hz: 1, camera: "reduce" }
|
|
4209
4425
|
}]
|
|
4426
|
+
}),
|
|
4427
|
+
live: liveSection.optional().meta({
|
|
4428
|
+
description: "How the bridge sends live video, for every camera of the robot. Each key overrides the bridge's ROS parameter of the same name; an absent key leaves the parameter alone.",
|
|
4429
|
+
/**
|
|
4430
|
+
* The default, spelled out. A developer who opens this section came to
|
|
4431
|
+
* lower the number, and the value to start from is the one in force. A
|
|
4432
|
+
* plain number and no tab stop, as in `low_bandwidth`: a placeholder is a
|
|
4433
|
+
* string, and the body has to be a document the format accepts.
|
|
4434
|
+
*/
|
|
4435
|
+
defaultSnippets: [{
|
|
4436
|
+
label: "live video, packet size",
|
|
4437
|
+
description: `Caps every RTP packet the bridge sends. ${LIVE_DEFAULTS.max_packet_bytes} is the default; lower it for viewers behind a tunnel inside a tunnel.`,
|
|
4438
|
+
body: { max_packet_bytes: LIVE_DEFAULTS.max_packet_bytes }
|
|
4439
|
+
}]
|
|
4210
4440
|
})
|
|
4211
|
-
});
|
|
4441
|
+
}).superRefine(refuseOddSizes, { when: (payload) => isMapping(payload.value) });
|
|
4212
4442
|
var validationIssue = import_zod19.z.object({
|
|
4213
4443
|
path: import_zod19.z.string().min(1),
|
|
4214
4444
|
slug: import_zod19.z.string().nullable(),
|
|
@@ -4234,7 +4464,7 @@ var configState = import_zod19.z.object({
|
|
|
4234
4464
|
applied_errors: import_zod19.z.array(applyError).nullable()
|
|
4235
4465
|
});
|
|
4236
4466
|
|
|
4237
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
4467
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/introspection.js
|
|
4238
4468
|
var import_zod20 = require("zod");
|
|
4239
4469
|
var rosGraphEntry = import_zod20.z.object({
|
|
4240
4470
|
name: rosName,
|
|
@@ -4273,7 +4503,7 @@ var typeDefinition = import_zod20.z.discriminatedUnion("kind", [
|
|
|
4273
4503
|
})
|
|
4274
4504
|
]);
|
|
4275
4505
|
|
|
4276
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
4506
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/jobs.js
|
|
4277
4507
|
var import_zod21 = require("zod");
|
|
4278
4508
|
var jobState = import_zod21.z.enum(["running", "unknown", "succeeded", "failed", "cancelled", "lost"]);
|
|
4279
4509
|
var reportedJobState = jobState.exclude(["unknown"]);
|
|
@@ -4510,7 +4740,7 @@ var jobRunSummary = import_zod21.z.object({
|
|
|
4510
4740
|
since_ms: import_zod21.z.number().int().nonnegative()
|
|
4511
4741
|
});
|
|
4512
4742
|
|
|
4513
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
4743
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/protocol.js
|
|
4514
4744
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
4515
4745
|
var MAX_PATIENCE_MS = 12e4;
|
|
4516
4746
|
var MIN_PATIENCE_MS = 1e3;
|
|
@@ -4909,11 +5139,11 @@ var bridgeCameraState = import_zod22.z.object({
|
|
|
4909
5139
|
request_id: import_zod22.z.string().min(1).max(64).nullable()
|
|
4910
5140
|
});
|
|
4911
5141
|
|
|
4912
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
5142
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/config-issues.js
|
|
4913
5143
|
var EXPOSURE_SECTIONS = ["datapoints", "actions", "services", "publishers", "cameras"];
|
|
4914
5144
|
var EXPOSURE_SECTION_NAMES = new Set(EXPOSURE_SECTIONS);
|
|
4915
5145
|
|
|
4916
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
5146
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/org-roles.js
|
|
4917
5147
|
var import_zod23 = require("zod");
|
|
4918
5148
|
var roleName = import_zod23.z.string().trim().min(1).max(ROLE_NAME_MAX);
|
|
4919
5149
|
var referencePlace = import_zod23.z.object({
|
|
@@ -5052,7 +5282,7 @@ var putRoleDefaultsRequest = import_zod23.z.object({
|
|
|
5052
5282
|
})
|
|
5053
5283
|
}).strict();
|
|
5054
5284
|
|
|
5055
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
5285
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/rest.js
|
|
5056
5286
|
var import_zod24 = require("zod");
|
|
5057
5287
|
var robot2 = import_zod24.z.object({
|
|
5058
5288
|
id: import_zod24.z.uuid().meta({
|
|
@@ -5860,19 +6090,19 @@ var slugUsageResponse = import_zod24.z.object({
|
|
|
5860
6090
|
alert_count: import_zod24.z.number().int().nonnegative()
|
|
5861
6091
|
});
|
|
5862
6092
|
|
|
5863
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6093
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/realtime.js
|
|
5864
6094
|
var import_zod30 = require("zod");
|
|
5865
6095
|
|
|
5866
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6096
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/client-auth.js
|
|
5867
6097
|
var import_zod28 = require("zod");
|
|
5868
6098
|
|
|
5869
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6099
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/apps.js
|
|
5870
6100
|
var import_zod27 = require("zod");
|
|
5871
6101
|
|
|
5872
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6102
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-rights.js
|
|
5873
6103
|
var import_zod26 = require("zod");
|
|
5874
6104
|
|
|
5875
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6105
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections.js
|
|
5876
6106
|
var import_zod25 = require("zod");
|
|
5877
6107
|
var COLLECTIONS_FORMAT_VERSION = 1;
|
|
5878
6108
|
var COLLECTION_LIMITS = {
|
|
@@ -6050,7 +6280,7 @@ var collectionsDocument = import_zod25.z.object({
|
|
|
6050
6280
|
collections: import_zod25.z.codec(collectionsMap.nullable(), collectionsMap, { decode: (value) => value ?? {}, encode: (value) => value }).meta({ description: `The collections of the app by key, at most ${COLLECTION_LIMITS.collections}. Nothing under \`collections:\` (null) means none.` })
|
|
6051
6281
|
}).strict().meta({ description: "The data model of an app: its collections, their fields, and who may use them." });
|
|
6052
6282
|
|
|
6053
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6283
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-rights.js
|
|
6054
6284
|
var records = import_zod26.z.union([import_zod26.z.literal("all"), import_zod26.z.literal("own"), import_zod26.z.literal(false)]);
|
|
6055
6285
|
var roleCollectionRights = import_zod26.z.object({
|
|
6056
6286
|
collection: collectionKey.meta({ description: "The collection's key." }),
|
|
@@ -6069,7 +6299,7 @@ var roleCollectionRights = import_zod26.z.object({
|
|
|
6069
6299
|
})
|
|
6070
6300
|
}).meta({ description: "What one role may do with the records of one collection." });
|
|
6071
6301
|
|
|
6072
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6302
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/apps.js
|
|
6073
6303
|
var appIdentifier = slug;
|
|
6074
6304
|
var app2 = import_zod27.z.object({
|
|
6075
6305
|
id: import_zod27.z.uuid().meta({
|
|
@@ -6308,7 +6538,7 @@ var effectiveRightsResponse = import_zod27.z.object({
|
|
|
6308
6538
|
})
|
|
6309
6539
|
});
|
|
6310
6540
|
|
|
6311
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6541
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/client-auth.js
|
|
6312
6542
|
var clientLoginRequest = import_zod28.z.object({
|
|
6313
6543
|
app_identifier: appIdentifier.meta({
|
|
6314
6544
|
description: "The app being logged in to: its globally unique, lowercase, underscore-separated identifier, chosen by the developer at creation. There is no organisation context at login, so this is what decides which app the credentials are checked for."
|
|
@@ -6495,7 +6725,16 @@ var clientMcpInteraction = import_zod28.z.object({
|
|
|
6495
6725
|
app_id: import_zod28.z.uuid().meta({ description: "The app this authorization is for. The approving token's `app_id` must match it \u2014 an interaction of one app cannot be approved with a session from another." }),
|
|
6496
6726
|
client_name: import_zod28.z.string().nullable().meta({ description: "What the MCP client calls itself, or `null` if it named nothing. **Unverified** \u2014 see `client_name_verified`." }),
|
|
6497
6727
|
client_name_verified: import_zod28.z.literal(false).meta({
|
|
6498
|
-
description: "Always `false`. The client
|
|
6728
|
+
description: "Always `false`. The client named itself \u2014 in an unauthenticated dynamic registration or in its own Client ID Metadata Document \u2014 so the name must be rendered as a claim and never as an identity. Only `client_id_host` was checked, by fetching the document from it. There is no verified case, which is why this is a literal and not a boolean: a `true` branch would be dead code that looked like a safeguard."
|
|
6729
|
+
}),
|
|
6730
|
+
client_id_host: import_zod28.z.string().nullable().meta({
|
|
6731
|
+
description: "The hostname of the client's `client_id` when that id is the HTTPS URL of a Client ID Metadata Document, which the authorization server fetched from this host; `null` for a client that registered itself by dynamic registration. Show it beside the name: it is the one part of the client's description somebody checked."
|
|
6732
|
+
}),
|
|
6733
|
+
redirect_uri_host: import_zod28.z.string().meta({
|
|
6734
|
+
description: "The hostname of the redirect URI this authorization will answer to \u2014 where the authorization code is sent. Show it on the consent screen (MCP 2026-07-28 requires it). An IPv6 literal keeps its brackets."
|
|
6735
|
+
}),
|
|
6736
|
+
redirect_uri_loopback: import_zod28.z.boolean().meta({
|
|
6737
|
+
description: '`true` when the redirect URI is `http` on a loopback address (`localhost`, `127.0.0.1`, `[::1]`): the answer goes to a program on the person\'s own computer, on any port it chose. Warn about it, for example: "This client receives the answer on this computer (127.0.0.1). Approve only if you started it here."'
|
|
6499
6738
|
}),
|
|
6500
6739
|
scopes: import_zod28.z.array(import_zod28.z.string()).meta({ description: "The scopes the client asked for, to show the person before they approve." }),
|
|
6501
6740
|
already_granted: import_zod28.z.boolean().meta({ description: "Whether this user has already approved this client. It is a record of what they answered last time, and **this route makes no second use of it**: an app that skips its own consent screen when this is `true` is the only thing deciding that, and approve succeeds identically for a user who holds no grant at all. The standing grant is read elsewhere, on every request to the app's MCP endpoint. Withdrawing it is `DELETE /api/client/mcp/grants/:clientId` for the person themselves and `DELETE /api/apps/:id/users/:userId/mcp-grants/:clientId` for the developer. A withdrawal makes this `false` again at the next authorization **and stops the client at its very next MCP call**, unexpired access token and all \u2014 up to fifteen minutes of it \u2014 because the endpoint keys that check on the `client_id` the token carries." }),
|
|
@@ -6508,13 +6747,16 @@ var clientMcpInteractionDecisionResponse = import_zod28.z.object({
|
|
|
6508
6747
|
});
|
|
6509
6748
|
var mcpConsentGrant = import_zod28.z.object({
|
|
6510
6749
|
client_id: import_zod28.z.string().meta({
|
|
6511
|
-
description: "The MCP client this consent is for
|
|
6750
|
+
description: "The MCP client this consent is for: the id its dynamic registration was issued, or the HTTPS URL of its Client ID Metadata Document. It is the value the withdrawal routes take in their path, percent-encoded, and it is the only stable handle on a client \u2014 the name beside it is not one."
|
|
6751
|
+
}),
|
|
6752
|
+
client_id_host: import_zod28.z.string().nullable().meta({
|
|
6753
|
+
description: "The hostname of `client_id` when it is a Client ID Metadata Document URL; `null` for a self-registered client. The grant is to whoever controls that domain."
|
|
6512
6754
|
}),
|
|
6513
6755
|
client_name: import_zod28.z.string().nullable().meta({
|
|
6514
|
-
description: "What the client calls itself, or `null` once its registration is gone. **Unverified** \u2014 see `client_name_verified`."
|
|
6756
|
+
description: "What the client calls itself, or `null` once its registration or cached metadata document is gone. **Unverified** \u2014 see `client_name_verified`."
|
|
6515
6757
|
}),
|
|
6516
6758
|
client_name_verified: import_zod28.z.literal(false).meta({
|
|
6517
|
-
description: "Always `false`. The client
|
|
6759
|
+
description: "Always `false`. The client named itself \u2014 in an unauthenticated dynamic registration or in its own Client ID Metadata Document \u2014 so the name must be rendered as a claim and never as an identity. Only `client_id_host` was checked, by fetching the document from it. There is no verified case, which is why this is a literal and not a boolean: a `true` branch would be dead code that looked like a safeguard."
|
|
6518
6760
|
}),
|
|
6519
6761
|
granted_at: import_zod28.z.iso.datetime().meta({
|
|
6520
6762
|
description: "When the consent was last given. A withdrawal followed by a fresh approval moves it, because the second approval is the agreement that stands \u2014 it is not a record of the first time anybody ever said yes."
|
|
@@ -6559,7 +6801,7 @@ var clientIdentity = import_zod28.z.object({
|
|
|
6559
6801
|
})
|
|
6560
6802
|
});
|
|
6561
6803
|
|
|
6562
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6804
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-records.js
|
|
6563
6805
|
var import_zod29 = require("zod");
|
|
6564
6806
|
var timestamp = import_zod29.z.iso.datetime();
|
|
6565
6807
|
var count3 = import_zod29.z.number().int().min(0);
|
|
@@ -6706,7 +6948,7 @@ var collectionDefinitionsResponse = import_zod29.z.object({
|
|
|
6706
6948
|
}))
|
|
6707
6949
|
}).meta({ description: "The collections the caller may read, with their field definitions and the caller's rights." });
|
|
6708
6950
|
|
|
6709
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
6951
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/realtime.js
|
|
6710
6952
|
var clientAuth = import_zod30.z.object({
|
|
6711
6953
|
type: import_zod30.z.literal("auth"),
|
|
6712
6954
|
token: import_zod30.z.string().min(1)
|
|
@@ -7036,7 +7278,7 @@ var collectionsSchemaPublished = import_zod30.z.object({
|
|
|
7036
7278
|
version: import_zod30.z.number().int().min(1).meta({ description: "The version that is in force now." })
|
|
7037
7279
|
}).strict().meta({ description: "A new schema version is in force for the app." });
|
|
7038
7280
|
|
|
7039
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7281
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/feedback.js
|
|
7040
7282
|
var import_zod31 = require("zod");
|
|
7041
7283
|
var FEEDBACK_KINDS = ["idea", "problem", "question", "other"];
|
|
7042
7284
|
var feedbackKind = import_zod31.z.enum(FEEDBACK_KINDS);
|
|
@@ -7061,7 +7303,7 @@ var feedbackResponse = import_zod31.z.object({
|
|
|
7061
7303
|
})
|
|
7062
7304
|
}).strict();
|
|
7063
7305
|
|
|
7064
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7306
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/support.js
|
|
7065
7307
|
var import_zod32 = require("zod");
|
|
7066
7308
|
var supportSessionInfo = import_zod32.z.object({
|
|
7067
7309
|
session_id: import_zod32.z.uuid().meta({
|
|
@@ -7117,7 +7359,7 @@ var supportRenewFailRefusal = import_zod32.z.union([
|
|
|
7117
7359
|
]);
|
|
7118
7360
|
var authMeSupportResponse = authMeResponse.extend({ support: supportSessionInfo.optional() });
|
|
7119
7361
|
|
|
7120
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7362
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/client-robots.js
|
|
7121
7363
|
var import_zod33 = require("zod");
|
|
7122
7364
|
var clientRobotListItem = import_zod33.z.object({
|
|
7123
7365
|
...robot2.shape,
|
|
@@ -7134,7 +7376,7 @@ var clientRobotListResponse = import_zod33.z.object({
|
|
|
7134
7376
|
})
|
|
7135
7377
|
});
|
|
7136
7378
|
|
|
7137
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7379
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/legal-acceptances.js
|
|
7138
7380
|
var import_zod34 = require("zod");
|
|
7139
7381
|
var legalAcceptanceCursor = import_zod34.z.string().min(1).max(512).regex(/^[A-Za-z0-9_-]+$/);
|
|
7140
7382
|
var legalAcceptanceListQuery = import_zod34.z.object({
|
|
@@ -7161,7 +7403,7 @@ var legalAcceptanceListResponse = import_zod34.z.object({
|
|
|
7161
7403
|
next_cursor: legalAcceptanceCursor.nullable()
|
|
7162
7404
|
}).strict();
|
|
7163
7405
|
|
|
7164
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7406
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/audit.js
|
|
7165
7407
|
var import_zod35 = require("zod");
|
|
7166
7408
|
var auditActor = import_zod35.z.object({
|
|
7167
7409
|
kind: import_zod35.z.enum(["developer", "end_user", "app_user", "server_key", "bridge", "fleetless"]),
|
|
@@ -7303,7 +7545,7 @@ var auditListResponse = import_zod35.z.object({
|
|
|
7303
7545
|
next_cursor: import_zod35.z.number().int().positive().nullable()
|
|
7304
7546
|
});
|
|
7305
7547
|
|
|
7306
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7548
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/errors.js
|
|
7307
7549
|
var import_zod36 = require("zod");
|
|
7308
7550
|
var apiError = import_zod36.z.object({
|
|
7309
7551
|
code: import_zod36.z.string().min(1),
|
|
@@ -7400,7 +7642,7 @@ var roleCycleDetails = import_zod36.z.object({
|
|
|
7400
7642
|
})
|
|
7401
7643
|
});
|
|
7402
7644
|
|
|
7403
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7645
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/oauth.js
|
|
7404
7646
|
var import_zod37 = require("zod");
|
|
7405
7647
|
var oauthErrorCode = import_zod37.z.enum([
|
|
7406
7648
|
"invalid_request",
|
|
@@ -7575,6 +7817,9 @@ var authorizationServerMetadata = import_zod37.z.object({
|
|
|
7575
7817
|
registration_endpoint: import_zod37.z.url().optional().meta({
|
|
7576
7818
|
description: "The URL where a client may register itself, per RFC 7591. Absent when the app does not accept dynamic clients."
|
|
7577
7819
|
}),
|
|
7820
|
+
client_id_metadata_document_supported: import_zod37.z.boolean().optional().meta({
|
|
7821
|
+
description: "`true` when a client may use the HTTPS URL of its Client ID Metadata Document as `client_id` (draft-ietf-oauth-client-id-metadata-document) instead of registering. Both MCP authorization servers answer `true` and keep `registration_endpoint` beside it."
|
|
7822
|
+
}),
|
|
7578
7823
|
response_types_supported: import_zod37.z.array(import_zod37.z.literal("code")).meta({
|
|
7579
7824
|
description: "The response types this server offers: `code` only, the implicit grant being gone with OAuth 2.1."
|
|
7580
7825
|
}),
|
|
@@ -7640,13 +7885,13 @@ var oauthAuthorizeQuery = import_zod37.z.object({
|
|
|
7640
7885
|
description: "The authorization request an MCP client sends, per RFC 6749 \xA74.1.1 with mandatory PKCE. The handler reads it parameter by parameter rather than through one parse, because the answers differ: `client_id` and `redirect_uri` are refused flat, with no redirect, since until both are confirmed there is no trusted target to bounce a browser to, and everything after them is reported to the client's own callback as query parameters."
|
|
7641
7886
|
});
|
|
7642
7887
|
|
|
7643
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7888
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-schema.js
|
|
7644
7889
|
var import_zod40 = require("zod");
|
|
7645
7890
|
|
|
7646
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7891
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-issues.js
|
|
7647
7892
|
var import_zod39 = require("zod");
|
|
7648
7893
|
|
|
7649
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7894
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-templates.js
|
|
7650
7895
|
var import_zod38 = require("zod");
|
|
7651
7896
|
var collectionJsonTemplateName = import_zod38.z.enum(["pose2d", "point2d", "polygon2d", "range1d"]).meta({ description: "The name of a built-in JSON template: `pose2d`, `point2d`, `polygon2d` or `range1d`." });
|
|
7652
7897
|
function deepFreeze(value) {
|
|
@@ -7704,10 +7949,10 @@ var COLLECTION_JSON_TEMPLATES = deepFreeze({
|
|
|
7704
7949
|
}
|
|
7705
7950
|
});
|
|
7706
7951
|
|
|
7707
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7952
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-values.js
|
|
7708
7953
|
var TOO_DEEP_JSON = `The value nests arrays and objects more than ${COLLECTION_LIMITS.jsonDepth} levels deep.`;
|
|
7709
7954
|
|
|
7710
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7955
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-issues.js
|
|
7711
7956
|
var collectionsIssue = import_zod39.z.object({
|
|
7712
7957
|
path: import_zod39.z.string().min(1).meta({ description: "Where in the document, with dots between the keys: `collections.chargers.fields.location.to`." }),
|
|
7713
7958
|
code: import_zod39.z.string().meta({ description: "A stable name for the kind of finding, for code to branch on." }),
|
|
@@ -7717,7 +7962,7 @@ var collectionsIssue = import_zod39.z.object({
|
|
|
7717
7962
|
})
|
|
7718
7963
|
}).meta({ description: "One finding about a collections document." });
|
|
7719
7964
|
|
|
7720
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
7965
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-schema.js
|
|
7721
7966
|
var timestamp2 = import_zod40.z.iso.datetime();
|
|
7722
7967
|
var count4 = import_zod40.z.number().int().min(0);
|
|
7723
7968
|
var schemaVersion2 = import_zod40.z.number().int().min(1);
|
|
@@ -7960,7 +8205,7 @@ var collectionsPurgeResponse = import_zod40.z.object({
|
|
|
7960
8205
|
purged_at: timestamp2
|
|
7961
8206
|
}).meta({ description: "What a purge removed." });
|
|
7962
8207
|
|
|
7963
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
8208
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/collections-transfer.js
|
|
7964
8209
|
var import_zod41 = require("zod");
|
|
7965
8210
|
var IMPORT_ERRORS_LISTED = 1e3;
|
|
7966
8211
|
var count5 = import_zod41.z.number().int().min(0);
|
|
@@ -8056,7 +8301,7 @@ var collectionExportQuery = import_zod41.z.object({
|
|
|
8056
8301
|
}).optional()
|
|
8057
8302
|
}).strict();
|
|
8058
8303
|
|
|
8059
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
8304
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/controller-register.js
|
|
8060
8305
|
var import_zod42 = require("zod");
|
|
8061
8306
|
var text2 = (max) => import_zod42.z.string().regex(/^\P{Cc}*$/u).trim().min(1).max(max);
|
|
8062
8307
|
var email = import_zod42.z.string().regex(/^\P{Cc}*$/u).trim().email().max(320);
|
|
@@ -8096,10 +8341,10 @@ var controllerRegisterOrgResponse = import_zod42.z.object({
|
|
|
8096
8341
|
details: controllerRegisterOrgRecord.nullable()
|
|
8097
8342
|
}).strict();
|
|
8098
8343
|
|
|
8099
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
8344
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/billing.js
|
|
8100
8345
|
var import_zod43 = require("zod");
|
|
8101
8346
|
|
|
8102
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
8347
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/iana-time-zones.js
|
|
8103
8348
|
var ianaTimeZones = [
|
|
8104
8349
|
"UTC",
|
|
8105
8350
|
"Etc/UTC",
|
|
@@ -8524,7 +8769,7 @@ var ianaTimeZones = [
|
|
|
8524
8769
|
"Pacific/Wallis"
|
|
8525
8770
|
];
|
|
8526
8771
|
|
|
8527
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
8772
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/billing.js
|
|
8528
8773
|
var countryCode = import_zod43.z.string().regex(/^[A-Z]{2}$/);
|
|
8529
8774
|
var EU_COUNTRIES = [
|
|
8530
8775
|
"AT",
|
|
@@ -8564,9 +8809,21 @@ var billingCycle = import_zod43.z.enum(["monthly", "yearly"]);
|
|
|
8564
8809
|
var vatTreatment = import_zod43.z.enum(["de_standard", "reverse_charge", "outside_eu"]);
|
|
8565
8810
|
var payerRefusalRule = import_zod43.z.enum(["company_required", "vat_id_required", "vat_id_invalid"]);
|
|
8566
8811
|
var viesPendingReason = import_zod43.z.enum(["vies_unavailable", "vies_unverified", "vies_identifier_missing"]);
|
|
8812
|
+
var viesOutage = import_zod43.z.object({
|
|
8813
|
+
scope: import_zod43.z.enum(["member_state", "vies"]).meta({
|
|
8814
|
+
description: "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
|
|
8815
|
+
}),
|
|
8816
|
+
country: countryCode.meta({ description: "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`." })
|
|
8817
|
+
}).strict();
|
|
8818
|
+
function viesPending(shape) {
|
|
8819
|
+
return import_zod43.z.discriminatedUnion("reason", [
|
|
8820
|
+
import_zod43.z.object({ ...shape, reason: import_zod43.z.literal("vies_unavailable"), vies_outage: viesOutage }).strict(),
|
|
8821
|
+
import_zod43.z.object({ ...shape, reason: viesPendingReason.exclude(["vies_unavailable"]) }).strict()
|
|
8822
|
+
]);
|
|
8823
|
+
}
|
|
8567
8824
|
var vatDecision = import_zod43.z.discriminatedUnion("state", [
|
|
8568
8825
|
import_zod43.z.object({ state: import_zod43.z.literal("eligible"), treatment: vatTreatment, rate_percent: import_zod43.z.number().int().min(0).max(100) }).strict(),
|
|
8569
|
-
|
|
8826
|
+
viesPending({ state: import_zod43.z.literal("pending") }),
|
|
8570
8827
|
import_zod43.z.object({ state: import_zod43.z.literal("refused"), rule: payerRefusalRule }).strict()
|
|
8571
8828
|
]);
|
|
8572
8829
|
var billingAddress = import_zod43.z.object({
|
|
@@ -8721,15 +8978,113 @@ var firstPaymentPeriod = import_zod43.z.discriminatedUnion("cycle", [
|
|
|
8721
8978
|
})
|
|
8722
8979
|
]);
|
|
8723
8980
|
var billingDecisionPeriod = import_zod43.z.union([existingBillingPeriod, firstPaymentPeriod]);
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8981
|
+
function formatEur(cents3) {
|
|
8982
|
+
if (!Number.isSafeInteger(cents3))
|
|
8983
|
+
throw new Error(`formatEur: ${cents3} is not a whole number of cents`);
|
|
8984
|
+
const abs = Math.abs(cents3);
|
|
8985
|
+
const euros = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
8986
|
+
const rest = abs % 100;
|
|
8987
|
+
return `${cents3 < 0 ? "-" : ""}${euros}${rest === 0 ? "" : `,${String(rest).padStart(2, "0")}`} \u20AC`;
|
|
8988
|
+
}
|
|
8989
|
+
var C4_ACTIONS = ["checkout", "pay_and_switch", "switch", "schedule_switch", "schedule_downgrade", "cancel", "keep_basic"];
|
|
8990
|
+
var C4_TEXT_IDS = [
|
|
8991
|
+
"C4-1168-checkout",
|
|
8992
|
+
"C4-1168-pay-and-switch",
|
|
8993
|
+
"C4-1168-switch",
|
|
8994
|
+
"C4-1168-schedule-switch",
|
|
8995
|
+
"C4-1168-schedule-downgrade",
|
|
8996
|
+
"C4-1168-cancel",
|
|
8997
|
+
"C4-1168-keep-basic"
|
|
8998
|
+
];
|
|
8999
|
+
var LEGACY_C4_TEXT_ID = "DR-1374-draft-3-C.4";
|
|
9000
|
+
var legacyC4Text = (org3) => `By selecting \u201COrder and pay\u201D, you agree to the Terms of Service and the Data Processing Agreement for ${org3}.`;
|
|
9001
|
+
function c4Declaration(action, v) {
|
|
9002
|
+
const plan = PLANS[v.plan].name;
|
|
9003
|
+
const due = formatEur(v.dueCents);
|
|
9004
|
+
const gross = formatEur(v.periodGrossCents);
|
|
9005
|
+
const period = v.cycle === "monthly" ? "month" : "year";
|
|
9006
|
+
const legal = "agree to the Terms of Service and the Data Processing Agreement";
|
|
9007
|
+
const [label2, rest] = (() => {
|
|
9008
|
+
switch (action) {
|
|
9009
|
+
case "checkout":
|
|
9010
|
+
return [`Pay ${due} with Mollie`, `you order ${plan} for ${v.org} as a business, ${legal}, and authorise Fleetless to charge ${gross} every ${period} until you cancel.`];
|
|
9011
|
+
case "pay_and_switch":
|
|
9012
|
+
return [`Pay ${due} and switch`, `you order ${plan} for ${v.org} as a business from today, ${legal}, and authorise Fleetless to charge ${due} now and ${gross} every ${period} after that until you cancel.`];
|
|
9013
|
+
case "switch":
|
|
9014
|
+
return [`Switch to ${plan}`, `you order ${plan} for ${v.org} as a business from today, ${legal}, and authorise Fleetless to charge ${gross} every ${period} from the next renewal until you cancel.`];
|
|
9015
|
+
case "schedule_switch":
|
|
9016
|
+
return ["Switch to monthly at period end", `you order ${plan} monthly for ${v.org} as a business from the end of the current period, ${legal}, and authorise Fleetless to charge ${gross} every month from then until you cancel.`];
|
|
9017
|
+
case "schedule_downgrade":
|
|
9018
|
+
return [`Schedule downgrade to ${plan}`, `you order ${plan} for ${v.org} as a business from the end of the current period, ${legal}, and authorise Fleetless to charge ${gross} every ${period} from then until you cancel.`];
|
|
9019
|
+
case "cancel":
|
|
9020
|
+
return ["Cancel at period end", `you cancel ${plan} for ${v.org} at the end of the current period; ${v.org} then stays on Basic under the Terms of Service and the Data Processing Agreement, and nothing more is charged.`];
|
|
9021
|
+
case "keep_basic":
|
|
9022
|
+
return ["Delete the rest and stay on Basic", `${v.org} stays on Basic under the Terms of Service and the Data Processing Agreement; what you did not keep is deleted, and nothing is charged.`];
|
|
9023
|
+
}
|
|
9024
|
+
})();
|
|
9025
|
+
return { text_id: C4_TEXT_IDS[C4_ACTIONS.indexOf(action)], text: `By selecting \u201C${label2}\u201D, ${rest}`, action_label: label2 };
|
|
9026
|
+
}
|
|
9027
|
+
function c4ActionOf(s, from) {
|
|
9028
|
+
if (s.decision_kind === "checkout")
|
|
9029
|
+
return "checkout";
|
|
9030
|
+
if (s.decision_kind === "plan_change") {
|
|
9031
|
+
if (s.selection.plan !== "basic")
|
|
9032
|
+
return "schedule_downgrade";
|
|
9033
|
+
if (from === void 0)
|
|
9034
|
+
throw new Error("c4ActionOf: a plan change to Basic needs the current plan to tell a cancellation from keeping Basic");
|
|
9035
|
+
const current2 = typeof from === "string" ? from : from.plan;
|
|
9036
|
+
return current2 === "plus" || current2 === "pro" ? "cancel" : "keep_basic";
|
|
9037
|
+
}
|
|
9038
|
+
if (s.amounts.due_today_gross_cents > 0)
|
|
9039
|
+
return "pay_and_switch";
|
|
9040
|
+
if (s.period.anchor !== "existing_period" || s.period.effective.mode === "on_confirmation")
|
|
9041
|
+
return "switch";
|
|
9042
|
+
if (s.selection.cycle === "yearly")
|
|
9043
|
+
return "schedule_downgrade";
|
|
9044
|
+
if (from === void 0)
|
|
9045
|
+
throw new Error("c4ActionOf: a scheduled monthly paid change needs the current plan to tell a downgrade from a cycle switch");
|
|
9046
|
+
const current = typeof from === "string" ? { plan: from } : from;
|
|
9047
|
+
if (PLAN_ORDER.indexOf(s.selection.plan) < PLAN_ORDER.indexOf(current.plan))
|
|
9048
|
+
return "schedule_downgrade";
|
|
9049
|
+
return current.cycle === "monthly" ? "schedule_downgrade" : "schedule_switch";
|
|
9050
|
+
}
|
|
9051
|
+
function c4ActionsOf(s) {
|
|
9052
|
+
if (s.decision_kind === "plan_change" && s.selection.plan === "basic")
|
|
9053
|
+
return ["cancel", "keep_basic"];
|
|
9054
|
+
if (s.decision_kind !== "paid_change" || s.amounts.due_today_gross_cents > 0 || s.period.anchor !== "existing_period" || s.period.effective.mode === "on_confirmation")
|
|
9055
|
+
return [c4ActionOf(s)];
|
|
9056
|
+
return s.selection.cycle === "monthly" ? ["schedule_switch", "schedule_downgrade"] : ["schedule_downgrade"];
|
|
9057
|
+
}
|
|
9058
|
+
var separateLegalLinks = (value, ctx) => {
|
|
8730
9059
|
if (value.terms.url === value.dpa.url)
|
|
8731
9060
|
ctx.addIssue({ code: "custom", path: ["dpa"], message: "Terms and DPA require separate version URLs." });
|
|
9061
|
+
};
|
|
9062
|
+
var legalLinks = { terms: legalDocumentReference, dpa: legalDocumentReference };
|
|
9063
|
+
var labelRules = {
|
|
9064
|
+
"C4-1168-checkout": { pattern: "^Pay \\S.* with Mollie$" },
|
|
9065
|
+
"C4-1168-pay-and-switch": { pattern: "^Pay \\S.* and switch$" },
|
|
9066
|
+
"C4-1168-switch": { pattern: "^Switch to \\S.*$" },
|
|
9067
|
+
"C4-1168-schedule-switch": { const: "Switch to monthly at period end" },
|
|
9068
|
+
"C4-1168-schedule-downgrade": { pattern: "^Schedule downgrade to \\S.*$" },
|
|
9069
|
+
"C4-1168-cancel": { const: "Cancel at period end" },
|
|
9070
|
+
"C4-1168-keep-basic": { const: "Delete the rest and stay on Basic" }
|
|
9071
|
+
};
|
|
9072
|
+
var declaration = import_zod43.z.object({
|
|
9073
|
+
text_id: import_zod43.z.enum(C4_TEXT_IDS).meta({ description: "The approved sentence this display shows, one per action." }),
|
|
9074
|
+
text: import_zod43.z.string().min(1).regex(/^By selecting “/).meta({ description: "The consent sentence shown directly above the button, naming the button." }),
|
|
9075
|
+
action_label: import_zod43.z.string().min(1).meta({ description: "The label of the one button that confirms this decision." }),
|
|
9076
|
+
...legalLinks
|
|
9077
|
+
}).strict().superRefine(separateLegalLinks).meta({
|
|
9078
|
+
allOf: C4_TEXT_IDS.map((textId) => ({
|
|
9079
|
+
if: { properties: { text_id: { const: textId } }, required: ["text_id"] },
|
|
9080
|
+
then: { properties: { action_label: labelRules[textId] } }
|
|
9081
|
+
}))
|
|
8732
9082
|
});
|
|
9083
|
+
var legacyDeclaration = import_zod43.z.object({
|
|
9084
|
+
text_id: import_zod43.z.literal(LEGACY_C4_TEXT_ID),
|
|
9085
|
+
text: import_zod43.z.string().min(1),
|
|
9086
|
+
...legalLinks
|
|
9087
|
+
}).strict().superRefine(separateLegalLinks);
|
|
8733
9088
|
var snapshotBase = import_zod43.z.object({
|
|
8734
9089
|
snapshot_id: import_zod43.z.uuid(),
|
|
8735
9090
|
decision_id: import_zod43.z.uuid(),
|
|
@@ -8744,17 +9099,48 @@ var snapshotBase = import_zod43.z.object({
|
|
|
8744
9099
|
declaration,
|
|
8745
9100
|
expires_at: utcInstant
|
|
8746
9101
|
}).strict();
|
|
8747
|
-
var
|
|
9102
|
+
var snapshotVariants = [
|
|
8748
9103
|
snapshotBase.extend({ decision_kind: import_zod43.z.literal("checkout"), selection: purchaseSelection }).strict(),
|
|
8749
9104
|
snapshotBase.extend({ decision_kind: import_zod43.z.literal("paid_change"), selection: purchaseSelection, period: existingBillingPeriod }).strict(),
|
|
8750
9105
|
snapshotBase.extend({ decision_kind: import_zod43.z.literal("plan_change"), selection: planChangeSelection, period: existingBillingPeriod }).strict()
|
|
8751
|
-
]
|
|
9106
|
+
];
|
|
9107
|
+
var storedDeclaration = import_zod43.z.union([declaration, legacyDeclaration]);
|
|
9108
|
+
var storedSnapshotVariants = import_zod43.z.discriminatedUnion("decision_kind", [
|
|
9109
|
+
snapshotVariants[0].extend({ declaration: storedDeclaration }).strict(),
|
|
9110
|
+
snapshotVariants[1].extend({ declaration: storedDeclaration }).strict(),
|
|
9111
|
+
snapshotVariants[2].extend({ declaration: storedDeclaration }).strict()
|
|
9112
|
+
]);
|
|
9113
|
+
function checkDeclaration(value, ctx) {
|
|
9114
|
+
const declared = value.declaration;
|
|
9115
|
+
if (declared.text_id === LEGACY_C4_TEXT_ID) {
|
|
9116
|
+
if (declared.text !== legacyC4Text(value.organization_name))
|
|
9117
|
+
ctx.addIssue({ code: "custom", path: ["declaration", "text"], message: "Declaration must match the approved C.4 sentence and organization." });
|
|
9118
|
+
return;
|
|
9119
|
+
}
|
|
9120
|
+
const action = C4_ACTIONS[C4_TEXT_IDS.indexOf(declared.text_id)];
|
|
9121
|
+
if (!c4ActionsOf(value).includes(action)) {
|
|
9122
|
+
ctx.addIssue({ code: "custom", path: ["declaration", "text_id"], message: "Declaration must be the sentence of the action this decision is." });
|
|
9123
|
+
return;
|
|
9124
|
+
}
|
|
9125
|
+
const plans = action === "cancel" ? ["plus", "pro"] : [value.selection.plan];
|
|
9126
|
+
const matches = plans.some((plan) => {
|
|
9127
|
+
const expected = c4Declaration(action, {
|
|
9128
|
+
org: value.organization_name,
|
|
9129
|
+
plan,
|
|
9130
|
+
cycle: value.selection.cycle,
|
|
9131
|
+
dueCents: value.amounts.due_today_gross_cents,
|
|
9132
|
+
periodGrossCents: value.amounts.period_gross_cents
|
|
9133
|
+
});
|
|
9134
|
+
return expected.text === declared.text && expected.action_label === declared.action_label;
|
|
9135
|
+
});
|
|
9136
|
+
if (!matches)
|
|
9137
|
+
ctx.addIssue({ code: "custom", path: ["declaration", "text"], message: "Declaration must match the approved sentence and button of its action, amounts, plan and organization." });
|
|
9138
|
+
}
|
|
9139
|
+
function refineSnapshot(value, ctx) {
|
|
8752
9140
|
if (value.period.anchor === "on_first_successful_payment" && value.period.cycle !== value.selection.cycle) {
|
|
8753
9141
|
ctx.addIssue({ code: "custom", path: ["period", "cycle"], message: "First-payment period must match the selected cycle." });
|
|
8754
9142
|
}
|
|
8755
|
-
|
|
8756
|
-
if (value.declaration.text !== expected)
|
|
8757
|
-
ctx.addIssue({ code: "custom", path: ["declaration", "text"], message: "Declaration must match the approved C.4 sentence and organization." });
|
|
9143
|
+
checkDeclaration(value, ctx);
|
|
8758
9144
|
if (value.amounts.vat_treatment === "de_standard") {
|
|
8759
9145
|
const euro = (cents3) => new Intl.NumberFormat("en-US", { style: "currency", currency: "EUR" }).format(cents3 / 100);
|
|
8760
9146
|
const period = value.selection.cycle === "monthly" ? "month" : "year";
|
|
@@ -8766,10 +9152,13 @@ var billingDecisionSnapshot = import_zod43.z.discriminatedUnion("decision_kind",
|
|
|
8766
9152
|
const expectedAddons = addonKey.options.filter((key) => value.selection.addons[key] > 0);
|
|
8767
9153
|
if (lines.length !== expectedAddons.length || lines.some((line, i) => line.addon !== expectedAddons[i] || line.quantity !== value.selection.addons[line.addon]))
|
|
8768
9154
|
ctx.addIssue({ code: "custom", path: ["amounts", "addon_lines"], message: "Add-on lines must match absolute selection in catalogue order." });
|
|
8769
|
-
}
|
|
9155
|
+
}
|
|
9156
|
+
var snapshotRules = { allOf: ["monthly", "yearly"].map((cycle) => ({
|
|
8770
9157
|
if: { properties: { period: { properties: { anchor: { const: "on_first_successful_payment" }, cycle: { const: cycle } }, required: ["anchor", "cycle"] } }, required: ["period"] },
|
|
8771
9158
|
then: { properties: { selection: { properties: { cycle: { const: cycle } }, required: ["cycle"] } }, required: ["selection"] }
|
|
8772
|
-
})) }
|
|
9159
|
+
})) };
|
|
9160
|
+
var billingDecisionSnapshot = import_zod43.z.discriminatedUnion("decision_kind", snapshotVariants).superRefine(refineSnapshot).meta(snapshotRules);
|
|
9161
|
+
var storedBillingDecisionSnapshot = storedSnapshotVariants.superRefine(refineSnapshot).meta(snapshotRules);
|
|
8773
9162
|
var billingDecisionDisplayResponse = import_zod43.z.object({
|
|
8774
9163
|
confirmation_proof: confirmationProof,
|
|
8775
9164
|
expires_at: utcInstant,
|
|
@@ -8791,24 +9180,21 @@ var intentIdentity = {
|
|
|
8791
9180
|
intent_id: import_zod43.z.uuid().meta({ description: "Opaque persisted purchase intent identity." }),
|
|
8792
9181
|
operation_key: purchaseOperationKey,
|
|
8793
9182
|
operation: chargeOperation,
|
|
8794
|
-
invoice_id: import_zod43.z.uuid().optional().meta({
|
|
9183
|
+
invoice_id: import_zod43.z.uuid().optional().meta({
|
|
9184
|
+
description: "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state."
|
|
9185
|
+
})
|
|
8795
9186
|
};
|
|
8796
9187
|
var purchaseHoldReason = import_zod43.z.enum([
|
|
8797
9188
|
"legacy_usd_invoice",
|
|
8798
9189
|
"legacy_payer_unresolved",
|
|
8799
9190
|
"mandate_policy_unresolved",
|
|
8800
|
-
|
|
8801
|
-
// during and after the move from Cloud-issued invoices to charges billed
|
|
8802
|
-
// through Lexware.
|
|
8803
|
-
"lexware_contact_pending",
|
|
8804
|
-
"lexware_contact_changed",
|
|
8805
|
-
"issuer_cutover_in_progress",
|
|
8806
|
-
"lexware_issuance_paused"
|
|
9191
|
+
"issuer_cutover_in_progress"
|
|
8807
9192
|
]);
|
|
8808
9193
|
var purchaseRefusalRule = import_zod43.z.enum(["company_required", "vat_id_required", "vat_id_invalid", "tax_id_required", "us_state_required", "public_email_domain", "invoice_not_open"]);
|
|
8809
9194
|
var intentRules = [
|
|
8810
9195
|
{ if: { properties: { operation: { enum: ["invoice_payment", "payment_method_invoice"] } }, required: ["operation"] }, then: { required: ["invoice_id"] } },
|
|
8811
|
-
{ if: { properties: { operation: { const: "mandate_setup" } }, required: ["operation"] }, then: { properties: { state: {
|
|
9196
|
+
{ if: { properties: { operation: { const: "mandate_setup" } }, required: ["operation"] }, then: { properties: { state: { enum: ["held", "payment_started"] } } } },
|
|
9197
|
+
{ if: { properties: { operation: { const: "mandate_setup" }, state: { const: "held" } }, required: ["operation", "state"] }, then: { properties: { reason: { const: "mandate_policy_unresolved" } }, required: ["reason"] } },
|
|
8812
9198
|
{ if: { properties: { reason: { const: "mandate_policy_unresolved" } }, required: ["reason"] }, then: { properties: { operation: { const: "mandate_setup" } } } },
|
|
8813
9199
|
{ if: { properties: { payment: { properties: { kind: { const: "mandate" } }, required: ["kind"] } }, required: ["payment"] }, then: { properties: { operation: { const: "paid_change" } } } }
|
|
8814
9200
|
];
|
|
@@ -8816,15 +9202,22 @@ function validateIntent(intent, ctx) {
|
|
|
8816
9202
|
if (["invoice_payment", "payment_method_invoice"].includes(intent.operation) && !intent.invoice_id) {
|
|
8817
9203
|
ctx.addIssue({ code: "custom", path: ["invoice_id"], message: "An invoice-paying intent must name the invoice or due charge." });
|
|
8818
9204
|
}
|
|
8819
|
-
if (intent.operation === "mandate_setup" !==
|
|
8820
|
-
ctx.addIssue({ code: "custom", path: ["
|
|
9205
|
+
if (intent.operation === "mandate_setup" && intent.state !== "held" && intent.state !== "payment_started") {
|
|
9206
|
+
ctx.addIssue({ code: "custom", path: ["state"], message: "A mandate setup is a started hosted payment, or a stored hold." });
|
|
9207
|
+
}
|
|
9208
|
+
if (intent.operation === "mandate_setup" && intent.state === "held" && intent.reason !== "mandate_policy_unresolved") {
|
|
9209
|
+
ctx.addIssue({ code: "custom", path: ["reason"], message: "A held mandate setup is the stored mandate_policy_unresolved hold." });
|
|
9210
|
+
}
|
|
9211
|
+
if (intent.reason === "mandate_policy_unresolved" && intent.operation !== "mandate_setup") {
|
|
9212
|
+
ctx.addIssue({ code: "custom", path: ["reason"], message: "Only a mandate setup was held as mandate_policy_unresolved." });
|
|
8821
9213
|
}
|
|
8822
9214
|
if (intent.payment?.kind === "mandate" && intent.operation !== "paid_change") {
|
|
8823
|
-
ctx.addIssue({ code: "custom", path: ["payment"], message: "Owner checkout
|
|
9215
|
+
ctx.addIssue({ code: "custom", path: ["payment"], message: "Owner checkout, invoice payment and mandate setup require a hosted payment." });
|
|
8824
9216
|
}
|
|
8825
9217
|
}
|
|
9218
|
+
var awaitingVies = { ...intentIdentity, state: import_zod43.z.literal("awaiting_vies"), next_attempt_at: import_zod43.z.iso.datetime() };
|
|
8826
9219
|
var draftVariants = [
|
|
8827
|
-
|
|
9220
|
+
viesPending(awaitingVies),
|
|
8828
9221
|
import_zod43.z.object({ ...intentIdentity, ...quoteIdentity, state: import_zod43.z.literal("eligible"), quote: purchaseQuote }).strict(),
|
|
8829
9222
|
import_zod43.z.object({
|
|
8830
9223
|
...intentIdentity,
|
|
@@ -8839,6 +9232,7 @@ var draftVariants = [
|
|
|
8839
9232
|
var purchaseIntentDraft = import_zod43.z.discriminatedUnion("state", draftVariants).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
8840
9233
|
var paymentStartedVariant = import_zod43.z.object({
|
|
8841
9234
|
...intentIdentity,
|
|
9235
|
+
operation: purchaseOperation,
|
|
8842
9236
|
state: import_zod43.z.literal("payment_started"),
|
|
8843
9237
|
payment_id: import_zod43.z.uuid(),
|
|
8844
9238
|
payment: import_zod43.z.discriminatedUnion("kind", [
|
|
@@ -8864,22 +9258,87 @@ var purchaseIntent = import_zod43.z.discriminatedUnion("state", [
|
|
|
8864
9258
|
var nonChangeOperation = purchaseOperation.exclude(["paid_change"]);
|
|
8865
9259
|
var nonChangeChargeOperation = chargeOperation.exclude(["paid_change"]);
|
|
8866
9260
|
var nonChangeDraft = import_zod43.z.discriminatedUnion("state", [
|
|
8867
|
-
|
|
9261
|
+
viesPending({ ...awaitingVies, operation: nonChangeChargeOperation }),
|
|
8868
9262
|
draftVariants[1].safeExtend({ operation: nonChangeChargeOperation }),
|
|
8869
9263
|
draftVariants[2].safeExtend({ operation: nonChangeOperation }),
|
|
8870
9264
|
draftVariants[3].safeExtend({ operation: nonChangeChargeOperation }),
|
|
8871
9265
|
draftVariants[4].safeExtend({ operation: nonChangeChargeOperation })
|
|
8872
9266
|
]).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
8873
|
-
var nonChangePaymentStarted = paymentStartedVariant.safeExtend({ operation:
|
|
9267
|
+
var nonChangePaymentStarted = paymentStartedVariant.safeExtend({ operation: nonChangeOperation }).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
8874
9268
|
var paidChangeOperation = import_zod43.z.literal("paid_change");
|
|
8875
9269
|
var paidChangeDraft = import_zod43.z.discriminatedUnion("state", [
|
|
8876
|
-
draftVariants[0].safeExtend({ operation: paidChangeOperation }),
|
|
8877
9270
|
draftVariants[1].safeExtend({ operation: paidChangeOperation }),
|
|
8878
9271
|
draftVariants[2].safeExtend({ operation: paidChangeOperation }),
|
|
8879
9272
|
draftVariants[3].safeExtend({ operation: paidChangeOperation }),
|
|
8880
9273
|
draftVariants[4].safeExtend({ operation: paidChangeOperation })
|
|
8881
9274
|
]).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
8882
9275
|
var checkoutResponse = import_zod43.z.union([nonChangeDraft, nonChangePaymentStarted]);
|
|
9276
|
+
var checkoutIntentIdentity = {
|
|
9277
|
+
intent_id: import_zod43.z.uuid().meta({ description: "The persisted checkout intent; confirm it with `POST /api/billing/intents/:id/confirm`." }),
|
|
9278
|
+
operation_key: purchaseOperationKey,
|
|
9279
|
+
operation: import_zod43.z.literal("checkout")
|
|
9280
|
+
};
|
|
9281
|
+
var vatIdField = import_zod43.z.literal("billing.vat_id");
|
|
9282
|
+
var checkoutStartResponse = import_zod43.z.discriminatedUnion("state", [
|
|
9283
|
+
import_zod43.z.object({
|
|
9284
|
+
...checkoutIntentIdentity,
|
|
9285
|
+
state: import_zod43.z.literal("eligible"),
|
|
9286
|
+
...quoteIdentity,
|
|
9287
|
+
quote: purchaseQuote,
|
|
9288
|
+
display: billingDecisionDisplayResponse
|
|
9289
|
+
}).strict().meta({ description: "Eligible: the price is frozen and the display shown; one click on its button confirms." }),
|
|
9290
|
+
viesPending({ state: import_zod43.z.literal("vies_unavailable"), field: vatIdField }).meta({ description: "VIES did not confirm the VAT ID within its retries; with `vies_unavailable`, `vies_outage` says which side was down. Nothing is stored; check again." }),
|
|
9291
|
+
import_zod43.z.object({ state: import_zod43.z.literal("invalid_vat_id"), field: vatIdField, rule: import_zod43.z.literal("vat_id_invalid") }).strict().meta({ description: "VIES says the VAT ID is invalid. Nothing is stored." }),
|
|
9292
|
+
import_zod43.z.object({ state: import_zod43.z.literal("refused"), field: import_zod43.z.string().min(1), rule: purchaseRefusalRule }).strict().meta({ description: "A field the purchase cannot accept. Nothing is stored." }),
|
|
9293
|
+
import_zod43.z.object({ ...checkoutIntentIdentity, state: import_zod43.z.literal("held"), reason: import_zod43.z.literal("issuer_cutover_in_progress") }).strict().meta({ description: "An issuer cutover is running; try again in a few minutes." }),
|
|
9294
|
+
import_zod43.z.object({
|
|
9295
|
+
...checkoutIntentIdentity,
|
|
9296
|
+
state: import_zod43.z.literal("payment_started"),
|
|
9297
|
+
payment_id: import_zod43.z.uuid(),
|
|
9298
|
+
payment: import_zod43.z.object({ kind: import_zod43.z.literal("hosted"), checkout_id: import_zod43.z.uuid(), checkout_url: import_zod43.z.url() }).strict()
|
|
9299
|
+
}).strict().meta({ description: "The key was already confirmed: the hosted payment it started." })
|
|
9300
|
+
]).superRefine((value, ctx) => {
|
|
9301
|
+
if (value.state !== "eligible")
|
|
9302
|
+
return;
|
|
9303
|
+
const snapshot2 = value.display.snapshot;
|
|
9304
|
+
const invalid = (path, message) => ctx.addIssue({ code: "custom", path, message });
|
|
9305
|
+
if (snapshot2.decision_kind !== "checkout")
|
|
9306
|
+
invalid(["display", "snapshot", "decision_kind"], "A checkout start displays a checkout decision.");
|
|
9307
|
+
if (snapshot2.decision_id !== value.intent_id)
|
|
9308
|
+
invalid(["display", "snapshot", "decision_id"], "The display must refer to this intent.");
|
|
9309
|
+
if (snapshot2.operation_key !== value.operation_key)
|
|
9310
|
+
invalid(["display", "snapshot", "operation_key"], "The display must carry this operation key.");
|
|
9311
|
+
if (snapshot2.quote_revision !== value.quote_revision || snapshot2.buyer_fingerprint !== value.buyer_fingerprint) {
|
|
9312
|
+
invalid(["display", "snapshot", "quote_revision"], "The display must show this quote revision and buyer.");
|
|
9313
|
+
}
|
|
9314
|
+
const quote = snapshot2.amounts.quote;
|
|
9315
|
+
if (Object.keys(value.quote).some((key) => quote[key] !== value.quote[key])) {
|
|
9316
|
+
invalid(["quote"], "The quote must be the one the display shows.");
|
|
9317
|
+
}
|
|
9318
|
+
}).meta({ allOf: [{
|
|
9319
|
+
if: { properties: { state: { const: "eligible" } }, required: ["state"] },
|
|
9320
|
+
then: { properties: { display: { properties: { snapshot: { properties: { decision_kind: { const: "checkout" } } } } } } }
|
|
9321
|
+
}] });
|
|
9322
|
+
var checkoutDraft = import_zod43.z.object({
|
|
9323
|
+
plan: import_zod43.z.enum(["plus", "pro"]).meta({ description: "The plan last chosen on the checkout page." }),
|
|
9324
|
+
cycle: billingCycle.meta({ description: "The cycle last chosen." }),
|
|
9325
|
+
billing: purchaseBillingDetails.meta({ description: "The company details last sent to the checkout start." }),
|
|
9326
|
+
updated_at: import_zod43.z.iso.datetime().meta({ description: "When the draft was last saved." })
|
|
9327
|
+
}).strict();
|
|
9328
|
+
var checkoutDraftResponse = import_zod43.z.object({
|
|
9329
|
+
draft: checkoutDraft.nullable().meta({ description: "The saved checkout draft, or `null`. Deleted once the checkout is paid." }),
|
|
9330
|
+
prefill: billingDetails.nullable().meta({ description: "The org's earlier billing details when there is no draft, else `null`." })
|
|
9331
|
+
}).strict().superRefine((value, ctx) => {
|
|
9332
|
+
if (value.draft !== null && value.prefill !== null)
|
|
9333
|
+
ctx.addIssue({ code: "custom", path: ["prefill"], message: "A draft answers alone; prefill is null beside it." });
|
|
9334
|
+
}).meta({ not: { properties: { draft: { type: "object" }, prefill: { type: "object" } }, required: ["draft", "prefill"] } });
|
|
9335
|
+
var checkoutOpenDetails = import_zod43.z.object({
|
|
9336
|
+
field: import_zod43.z.literal("billing"),
|
|
9337
|
+
rule: import_zod43.z.literal("checkout_open"),
|
|
9338
|
+
expires_at: import_zod43.z.iso.datetime().nullable().meta({ description: "When the open payment expires at the provider, or `null` when unknown." }),
|
|
9339
|
+
checkout_url: import_zod43.z.url().nullable().meta({ description: "Where the open payment continues, or `null` when the provider no longer offers it." })
|
|
9340
|
+
}).strict();
|
|
9341
|
+
var viesUnavailableDetails = viesPending({ field: vatIdField, rule: import_zod43.z.literal("vies_unavailable") });
|
|
8883
9342
|
var purchaseIntentLookupQuery = import_zod43.z.object({
|
|
8884
9343
|
operation_key: purchaseOperationKey.optional().meta({ description: "The client operation key; supply this or intent_id, never both." }),
|
|
8885
9344
|
intent_id: import_zod43.z.uuid().optional().meta({ description: "The persisted intent ID; supply this or operation_key, never both." }),
|
|
@@ -8903,6 +9362,7 @@ var purchaseIntentConfirmRequest = import_zod43.z.discriminatedUnion("operation"
|
|
|
8903
9362
|
]);
|
|
8904
9363
|
var purchaseConflictDetails = import_zod43.z.discriminatedUnion("rule", [
|
|
8905
9364
|
import_zod43.z.object({ field: import_zod43.z.literal("operation_key"), rule: import_zod43.z.literal("operation_key_reused") }).strict(),
|
|
9365
|
+
import_zod43.z.object({ field: import_zod43.z.literal("confirmation_proof"), rule: import_zod43.z.literal("display_stale") }).strict().meta({ description: "The display was spent, expired or no longer matches: fetch a fresh one and press again." }),
|
|
8906
9366
|
import_zod43.z.object({ field: import_zod43.z.literal("intent"), rule: import_zod43.z.enum(["stale_quote", "buyer_changed", "not_eligible", "invoice_not_open"]), current_intent: purchaseIntent }).strict()
|
|
8907
9367
|
]);
|
|
8908
9368
|
var invoicePayRequest = import_zod43.z.object({ operation_key: purchaseOperationKey }).strict();
|
|
@@ -8925,7 +9385,7 @@ var vatCheckIdentity = { vat_id: import_zod43.z.string(), name: import_zod43.z.s
|
|
|
8925
9385
|
var vatIdCheckResponse = import_zod43.z.discriminatedUnion("state", [
|
|
8926
9386
|
import_zod43.z.object({ ...vatCheckIdentity, state: import_zod43.z.literal("eligible"), status: import_zod43.z.literal("valid") }).strict(),
|
|
8927
9387
|
import_zod43.z.object({ ...vatCheckIdentity, state: import_zod43.z.literal("refused"), status: import_zod43.z.literal("invalid"), rule: import_zod43.z.literal("vat_id_invalid") }).strict(),
|
|
8928
|
-
|
|
9388
|
+
viesPending({ ...vatCheckIdentity, state: import_zod43.z.literal("pending"), status: import_zod43.z.enum(["valid", "unverified", "unavailable"]) })
|
|
8929
9389
|
]);
|
|
8930
9390
|
var billingChangeRequest = import_zod43.z.object({
|
|
8931
9391
|
operation_key: purchaseOperationKey,
|
|
@@ -8947,6 +9407,11 @@ var billingDetailsUpdate = import_zod43.z.object({
|
|
|
8947
9407
|
description: "Replaces the VAT ID; `null` clears it. Omitted leaves it as it is. A new ID is re-checked through VIES."
|
|
8948
9408
|
})
|
|
8949
9409
|
}).strict();
|
|
9410
|
+
var billingDetailsConflictDetails = import_zod43.z.union([
|
|
9411
|
+
import_zod43.z.object({ field: import_zod43.z.string().min(1), rule: purchaseRefusalRule }).strict().meta({ description: "A field a purchase would refuse. Nothing is saved." }),
|
|
9412
|
+
viesUnavailableDetails,
|
|
9413
|
+
import_zod43.z.object({ field: import_zod43.z.literal("billing"), rule: import_zod43.z.literal("buyer_changed") }).strict().meta({ description: "The billing details changed meanwhile. Nothing is saved." })
|
|
9414
|
+
]);
|
|
8950
9415
|
var paymentMethodKind = import_zod43.z.enum(["card", "paypal", "applepay"]);
|
|
8951
9416
|
var paymentMethodChangeRequest = import_zod43.z.object({
|
|
8952
9417
|
operation_key: purchaseOperationKey,
|
|
@@ -9011,6 +9476,13 @@ var billingAccount = import_zod43.z.object({
|
|
|
9011
9476
|
vat_cents: import_zod43.z.number().int().meta({ description: "VAT on the next charge, in integer cents." }),
|
|
9012
9477
|
gross_cents: import_zod43.z.number().int().meta({ description: "The next charge including VAT, in integer cents." })
|
|
9013
9478
|
}).nullable().meta({ description: "`null` while a cancel is pending or nothing else renews." }),
|
|
9479
|
+
current_price: import_zod43.z.object({
|
|
9480
|
+
net_cents: import_zod43.z.number().int().meta({
|
|
9481
|
+
description: "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
|
|
9482
|
+
})
|
|
9483
|
+
}).nullable().meta({
|
|
9484
|
+
description: "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
|
|
9485
|
+
}),
|
|
9014
9486
|
scheduled: import_zod43.z.object({
|
|
9015
9487
|
cycle: billingCycle.nullable().meta({ description: "A cycle change queued for the period's end, or `null`." }),
|
|
9016
9488
|
addons: orgAddons.nullable().meta({ description: "Add-on counts queued for the period's end, or `null`." })
|
|
@@ -9146,7 +9618,9 @@ var billingDocumentFileQuery = import_zod43.z.object({
|
|
|
9146
9618
|
}).strict();
|
|
9147
9619
|
var acceptedBillingFields = {
|
|
9148
9620
|
billing: billingView.meta({ description: "The billing view after the change." }),
|
|
9149
|
-
charged: billingInvoice.nullable().meta({
|
|
9621
|
+
charged: billingInvoice.nullable().meta({
|
|
9622
|
+
description: "The Fleetless invoice charged now, or `null` when nothing was charged now (a change scheduled for the period end, or an increase that cost nothing) or the change was charged through Lexware (then the charge is in `billing.charges`)."
|
|
9623
|
+
})
|
|
9150
9624
|
};
|
|
9151
9625
|
var acceptedPaidChange = import_zod43.z.object({
|
|
9152
9626
|
...acceptedBillingFields,
|
|
@@ -9154,7 +9628,9 @@ var acceptedPaidChange = import_zod43.z.object({
|
|
|
9154
9628
|
}).strict();
|
|
9155
9629
|
var acceptedNoPaymentChange = import_zod43.z.object({
|
|
9156
9630
|
billing: billingView,
|
|
9157
|
-
charged: import_zod43.z.null()
|
|
9631
|
+
charged: import_zod43.z.null().meta({
|
|
9632
|
+
description: "Always `null`: nothing was charged now (a scheduled change or an increase that cost nothing)."
|
|
9633
|
+
}),
|
|
9158
9634
|
intent: purchaseIntentAcceptedWithoutPayment
|
|
9159
9635
|
}).strict();
|
|
9160
9636
|
var billingChangeResponse = import_zod43.z.union([
|
|
@@ -9169,7 +9645,7 @@ var purchaseIntentResponse = import_zod43.z.union([
|
|
|
9169
9645
|
acceptedNoPaymentChange
|
|
9170
9646
|
]);
|
|
9171
9647
|
|
|
9172
|
-
// node_modules/.pnpm/@fleetless+contracts@
|
|
9648
|
+
// node_modules/.pnpm/@fleetless+contracts@18.1.0/node_modules/@fleetless/contracts/dist/routes.js
|
|
9173
9649
|
var MCP_APP = MCP_APP_PATHS(":appIdentifier");
|
|
9174
9650
|
var APP_IDENTIFIER = {
|
|
9175
9651
|
name: "appIdentifier",
|
|
@@ -10320,7 +10796,7 @@ var ROUTES = [
|
|
|
10320
10796
|
params: [
|
|
10321
10797
|
{ name: "id", description: "The app's uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`." },
|
|
10322
10798
|
{ name: "userId", description: "The app user's uuid, from `GET /api/apps/:id/users`; a user of another app answers `404`." },
|
|
10323
|
-
{ name: "clientId", description: "The MCP client, as `GET /api/apps/:id/users/:userId/mcp-grants` reports its `client_id`. Not a uuid
|
|
10799
|
+
{ name: "clientId", description: "The MCP client, as `GET /api/apps/:id/users/:userId/mcp-grants` reports its `client_id`. Not a uuid: the identifier dynamic registration issued, or the HTTPS URL of a Client ID Metadata Document, percent-encoded as one path segment (`encodeURIComponent`); the server decodes it once." }
|
|
10324
10800
|
],
|
|
10325
10801
|
query: null,
|
|
10326
10802
|
request: null,
|
|
@@ -10608,16 +11084,16 @@ var ROUTES = [
|
|
|
10608
11084
|
summary: "Stores the logo the hosted pages show above the app's name.",
|
|
10609
11085
|
audience: "developer",
|
|
10610
11086
|
auth: "developer",
|
|
10611
|
-
rateLimited:
|
|
11087
|
+
rateLimited: true,
|
|
10612
11088
|
ownerTier: false,
|
|
10613
11089
|
status: 200,
|
|
10614
11090
|
params: [{ name: "id", description: "The app's uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`." }],
|
|
10615
11091
|
query: null,
|
|
10616
11092
|
request: null,
|
|
10617
11093
|
response: appAuthConfig,
|
|
10618
|
-
errors: [...DEVELOPER_GUARD, "invalid_uuid", "validation_error", "not_found", "unsupported_media_type"],
|
|
11094
|
+
errors: [...DEVELOPER_GUARD, "invalid_uuid", "validation_error", "not_found", "unsupported_media_type", "rate_limited", "logo_draw_unavailable"],
|
|
10619
11095
|
transport: "http",
|
|
10620
|
-
notes: "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs."
|
|
11096
|
+
notes: "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs. \n\n**Each upload is also drawn once**, into the small picture the app's mails show, and a logo that cannot be drawn is `400 validation_error`. Drawing costs the server, so uploads are limited per organization: five at once, then one a minute, answering `429 rate_limited` with `retry_after_ms`. When too many logos already wait to be drawn on the server, or the drawing itself fails, the answer is `503 logo_draw_unavailable`: nothing was stored, the logo in place stays, and retrying shortly may work."
|
|
10621
11097
|
},
|
|
10622
11098
|
{
|
|
10623
11099
|
method: "DELETE",
|
|
@@ -11014,7 +11490,7 @@ var ROUTES = [
|
|
|
11014
11490
|
response: authorizationServerMetadata,
|
|
11015
11491
|
errors: [],
|
|
11016
11492
|
transport: "http",
|
|
11017
|
-
notes: "`registration_endpoint` being present is the whole point of the dynamic-registration work: a client that finds it registers itself and never asks a person for a `client_id`. `authorization_endpoint` is the only field that moves to the auth-portal origin when one is configured \u2014 `issuer`, `token_endpoint` and the resource identifier stay canonical, because a client checks a token's `iss` and `aud` against those strings and moving them would invalidate every token ever minted."
|
|
11493
|
+
notes: "`registration_endpoint` being present is the whole point of the dynamic-registration work: a client that finds it registers itself and never asks a person for a `client_id`. `client_id_metadata_document_supported: true` says the other way in: a client that publishes a Client ID Metadata Document uses its HTTPS URL as `client_id`, and the server fetches it at authorize. Both are offered; MCP 2026-07-28 prefers the document. `authorization_endpoint` is the only field that moves to the auth-portal origin when one is configured \u2014 `issuer`, `token_endpoint` and the resource identifier stay canonical, because a client checks a token's `iss` and `aud` against those strings and moving them would invalidate every token ever minted."
|
|
11018
11494
|
},
|
|
11019
11495
|
{
|
|
11020
11496
|
method: "POST",
|
|
@@ -11050,7 +11526,7 @@ var ROUTES = [
|
|
|
11050
11526
|
response: null,
|
|
11051
11527
|
errors: [],
|
|
11052
11528
|
transport: "http",
|
|
11053
|
-
notes: "**The query schema is what this endpoint accepts, not what it parses**: the handler reads it parameter by parameter because the answers differ, and one parse would collapse them. Client and `redirect_uri` are validated first and a failure there never redirects, the same open-redirect discipline the app flow applies; those refusals are `oauthError`.
|
|
11529
|
+
notes: "**The query schema is what this endpoint accepts, not what it parses**: the handler reads it parameter by parameter because the answers differ, and one parse would collapse them. Client and `redirect_uri` are validated first and a failure there never redirects, the same open-redirect discipline the app flow applies; those refusals are `oauthError`. \n\n**Three client kinds.** The one central client; a client that registered itself at `POST /mcp/oauth/register`; and a client whose `client_id` is the HTTPS URL of its Client ID Metadata Document (draft-ietf-oauth-client-id-metadata-document). The last is recognised by its `https://` prefix, which no issued id carries. Its URL must have a host and a path other than `/`, no dot segment, query, fragment or userinfo, and at most 512 characters, and it must be spelled the way a URL parser writes it back (`new URL(id).href === id`: a lower-case host, no `:443`, no escape the parser rewrites), so the id a grant is stored under is the only spelling of it. On a cache miss the server fetches the document: `GET`, no redirects followed, 5 s, at most 5,120 bytes, `200` with a JSON content type, from a public address only, connecting to the exact address it checked. The document must name this URL as its `client_id`, list its `redirect_uris` and be a public client (`token_endpoint_auth_method` absent or `none`). A valid document is cached for its `Cache-Control: max-age`, clamped to 5 min \u2026 24 h (1 h without one); a failed fetch caches nothing and aborts with `invalid_client` and the cause. The fetches of one address share a bucket of 5 and one more a minute \u2014 a cache hit spends nothing \u2014 and a refused fetch is `invalid_client` too, answered in the handler rather than by a preHandler, which is why `rateLimited` is `false`. \n\n`redirect_uri` is matched exactly. The loopback-port wildcard of RFC 8252 \xA77.3 applies to the central client, whose URIs are configured ahead of time, and to a metadata-document client, whose static document cannot name the port a native client binds: a loopback `http` URI there may differ from a listed one in its port only. A client that registered itself seconds ago can name the port it bound, so it gets no wildcard. Nothing about the person is decided here \u2014 the next card asks for an email address, or a passkey, and the steps after it resolve the account; this route knows only the client."
|
|
11054
11530
|
},
|
|
11055
11531
|
{
|
|
11056
11532
|
method: "GET",
|
|
@@ -11417,7 +11893,7 @@ var ROUTES = [
|
|
|
11417
11893
|
response: authorizationServerMetadata,
|
|
11418
11894
|
errors: ["not_found"],
|
|
11419
11895
|
transport: "http",
|
|
11420
|
-
notes: "RFC 8414, for the issuer `<PUBLIC_API_BASE_URL>/mcp/<identifier>` \u2014 the same path rule as the document above, and the same `404` for a switched-off app. `registration_endpoint` is present for the reason the central document states: a client that finds it registers itself and never asks a person for a `client_id
|
|
11896
|
+
notes: "RFC 8414, for the issuer `<PUBLIC_API_BASE_URL>/mcp/<identifier>` \u2014 the same path rule as the document above, and the same `404` for a switched-off app. `registration_endpoint` is present for the reason the central document states: a client that finds it registers itself and never asks a person for a `client_id`, and `client_id_metadata_document_supported` is `true` as there. \n\n**`issuer`, `token_endpoint` and the resource identifier are minted from the canonical public base, never from the friendly `mcp.fleetless.dev` alias or the request's `Host`**, because a client checks a minted token's `iss` and `aud` against these exact strings. \n\n**Unlike the central document, `authorization_endpoint` does not move to an auth-portal origin**: the authorization step renders no page itself. It redirects to the app's own `mcp_login_url`, or to the hosted MCP sign-in on the auth portal when the app has configured none."
|
|
11421
11897
|
},
|
|
11422
11898
|
{
|
|
11423
11899
|
method: "POST",
|
|
@@ -11453,7 +11929,7 @@ var ROUTES = [
|
|
|
11453
11929
|
response: null,
|
|
11454
11930
|
errors: ["not_found"],
|
|
11455
11931
|
transport: "http",
|
|
11456
|
-
notes: 'The same query as `GET /mcp/oauth/authorize`, read the same way \u2014 parameter by parameter, because the answers differ and one parse would collapse them. \n\n**This route renders no page.** It writes an interaction \u2014 ten minutes, as the OIDC ones live \u2014 and redirects to `appAuthConfig.mcp_login_url` with `{interaction}` filled in. The app then authenticates the person with its own UI, reads `GET /api/client/mcp/interactions/:id` to show the client\'s claimed name and the
|
|
11932
|
+
notes: 'The same query as `GET /mcp/oauth/authorize`, read the same way \u2014 parameter by parameter, because the answers differ and one parse would collapse them. \n\n**This route renders no page.** It writes an interaction \u2014 ten minutes, as the OIDC ones live \u2014 and redirects to `appAuthConfig.mcp_login_url` with `{interaction}` filled in. The app then authenticates the person with its own UI, reads `GET /api/client/mcp/interactions/:id` to show the client\'s claimed name, its domain and where the answer goes, and calls approve or deny. **An app with no `mcp_login_url` is redirected to the hosted MCP sign-in** (`GET /app/:appIdentifier/mcp/:interaction`), which runs the same steps on the auth portal; nothing is refused for a missing URL. \n\nClient and `redirect_uri` are validated first and a failure there never redirects \u2014 the open-redirect discipline `GET /mcp/oauth/authorize` and `GET /api/client/oidc/:slug/start` both keep \u2014 and those refusals are RFC 6749\'s flat `oauthError`, which is why none of them appear above. A client is one that registered itself at this app, or a Client ID Metadata Document client, fetched, cached and rate limited exactly as at `GET /mcp/oauth/authorize`; one document serves every app. `redirect_uri` is matched **exactly** against the registration or the document, with a loopback-port wildcard for a document\'s loopback URIs only: a self-registered client named the port it bound minutes ago, so a wildcard there would only widen where a stolen `client_id` may send a browser. \n\nThe code above is the `apiError` envelope because it is a refusal about the **app**, decided before an OAuth parameter is looked at. **`404 not_found` covers an identifier no app carries AND an app with MCP switched off** \u2014 the same single answer the two metadata documents, `register` and the transport give. An earlier draft answered `403 mcp_disabled` here, on the argument that a client which registered while the switch was on is owed the difference between "turned off" and "mistyped"; that argument does not survive the caller being anonymous. This route takes no credential, so the extra code was readable by anyone who could type an identifier, and it handed back precisely the existence distinction every neighbouring route collapses. `mcp_disabled` survives only where the caller has already proved they belong to the app \u2014 the two decision routes under `/api/client/mcp/interactions/:id`.'
|
|
11457
11933
|
},
|
|
11458
11934
|
{
|
|
11459
11935
|
method: "POST",
|
|
@@ -11939,7 +12415,7 @@ var ROUTES = [
|
|
|
11939
12415
|
rateLimited: false,
|
|
11940
12416
|
ownerTier: false,
|
|
11941
12417
|
status: 204,
|
|
11942
|
-
params: [{ name: "clientId", description: "The MCP client, as `GET /api/client/mcp/grants` reports its `client_id`. Not a uuid
|
|
12418
|
+
params: [{ name: "clientId", description: "The MCP client, as `GET /api/client/mcp/grants` reports its `client_id`. Not a uuid: the identifier dynamic registration issued, or the HTTPS URL of a Client ID Metadata Document, percent-encoded as one path segment (`encodeURIComponent`); the server decodes it once." }],
|
|
11943
12419
|
query: null,
|
|
11944
12420
|
request: null,
|
|
11945
12421
|
response: null,
|
|
@@ -13083,9 +13559,9 @@ var ROUTES = [
|
|
|
13083
13559
|
query: null,
|
|
13084
13560
|
request: planChangePrepareRequest,
|
|
13085
13561
|
response: planChangePrepareResponse,
|
|
13086
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict"],
|
|
13562
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", "plan_purchase_closed"],
|
|
13087
13563
|
transport: "http",
|
|
13088
|
-
notes: "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT."
|
|
13564
|
+
notes: "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT. A cancellation to Basic never waits for the VAT treatment; a lower paid plan names its gross, so while the account's VAT treatment is unresolved this route and the PUT answer 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`."
|
|
13089
13565
|
},
|
|
13090
13566
|
{
|
|
13091
13567
|
method: "PUT",
|
|
@@ -13101,7 +13577,7 @@ var ROUTES = [
|
|
|
13101
13577
|
query: null,
|
|
13102
13578
|
request: planChangeRequest,
|
|
13103
13579
|
response: orgPlan,
|
|
13104
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict"],
|
|
13580
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", "plan_purchase_closed"],
|
|
13105
13581
|
transport: "http",
|
|
13106
13582
|
notes: "Owner tier, and **downward only**: a prior prepare returns change_id and a displayed snapshot; this final PUT requires its confirmation_proof and the same operation_key, target_plan and keep. Only Basic permits cancellation_reason (at most 500 input characters). The reason is final idempotency metadata, not price or legal evidence. An exact replay returns the original result; a changed reason with the same key conflicts before effect. The decision and legal acceptance commit together. This route moves the org to a lower plan or cancels it outright to Basic. It never moves the org up \u2014 an upgrade or an add-on goes through the billing routes instead (`POST /api/billing/checkout`, `POST /api/billing/change`). `409 target_state_conflict` names `target_plan` with rule `not_lower` when the chosen plan is not below the org's current one; with rule `locked_basic_only` when the org is locked (`orgLock`) and the chosen plan is anything but Basic; and with rule `migration_basic_only` when the org is still on the beta, awaiting the switch to priced plans, and the chosen plan is anything but Basic \u2014 that choice is exactly what the org lands on at the switch. An owner is never named in `keep` and always stays, but still counts against the target plan's `seats`; `409 plan_limit` names `seats` when the owners alone already exceed it, and names whichever other limit `keep` still exceeds otherwise. `keep` is `null` when the org's current usage already fits the target plan outright and nothing is deleted; named, it lists exactly the robots, apps, app users and developers that stay. The choice is stored as `pending_change` and takes effect at `period_ends_at` \u2014 **everything of the chosen kind not named in `keep` is deleted at that instant, never before** \u2014 except a choice made while the org is locked, which takes effect at once, and a beta org's choice, which takes effect at the switch date instead. Anything created while the choice is pending is checked against the target plan too and, when it passes, is folded into `keep`, so exactly what the confirmation counted is what is actually deleted. Replacing a still-pending choice requires a new prepare and proof-bound final PUT."
|
|
13107
13583
|
},
|
|
@@ -13185,13 +13661,13 @@ var ROUTES = [
|
|
|
13185
13661
|
response: billingView,
|
|
13186
13662
|
errors: [...DEVELOPER_GUARD, "tier_required"],
|
|
13187
13663
|
transport: "http",
|
|
13188
|
-
notes: "`available: false` when `MOLLIE_API_KEY` is not configured \u2014 this cloud takes no payments, and every billing route that charges or opens a Mollie checkout answers `503 billing_unavailable` instead of acting; plan-change prepare, resume, the details and the VAT-ID check need no Mollie and answer normally. `account` is `null` before the org has ever checked out; the plan and its limits still come from `GET /api/org/plan` (fleetless/fleetless issue 103) and are not repeated here."
|
|
13664
|
+
notes: "`available: false` when `MOLLIE_API_KEY` is not configured \u2014 this cloud takes no payments, and every billing route that charges or opens a Mollie checkout answers `503 billing_unavailable` instead of acting; plan-change prepare, resume, the details and the VAT-ID check need no Mollie and answer normally. `account` is `null` before the org has ever checked out; the plan and its limits still come from `GET /api/org/plan` (fleetless/fleetless issue 103) and are not repeated here. Where this cloud sells paid plans only to organizations Fleetless has unlocked, an org that is not unlocked reads `paid_plans: closed` there, and checkout, the decision display, the confirm of a checkout or paid change, `POST /api/billing/change`, and a plan-change prepare or final PUT whose target is not Basic answer `403 plan_purchase_closed`; this read, the checkout poll, cancel, resume, the details, the payment method, invoices and charges (their confirm included), the documents and a Basic target are never refused by it."
|
|
13189
13665
|
},
|
|
13190
13666
|
{
|
|
13191
13667
|
method: "POST",
|
|
13192
13668
|
path: "/api/billing/checkout",
|
|
13193
13669
|
section: "billing",
|
|
13194
|
-
summary: "
|
|
13670
|
+
summary: "Decides a company's first paid plan and returns its order summary to confirm.",
|
|
13195
13671
|
audience: "developer",
|
|
13196
13672
|
auth: "developer",
|
|
13197
13673
|
rateLimited: true,
|
|
@@ -13200,10 +13676,28 @@ var ROUTES = [
|
|
|
13200
13676
|
params: [],
|
|
13201
13677
|
query: null,
|
|
13202
13678
|
request: checkoutRequest,
|
|
13203
|
-
response:
|
|
13204
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", "rate_limited", ...BILLING_OFF, ...MOLLIE],
|
|
13679
|
+
response: checkoutStartResponse,
|
|
13680
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", "rate_limited", "plan_purchase_closed", ...BILLING_OFF, ...MOLLIE],
|
|
13205
13681
|
transport: "http",
|
|
13206
|
-
notes: "Basic stays free for every payer.
|
|
13682
|
+
notes: "Basic stays free for every payer. The start decides in this request, VIES included: a busy VIES is retried for up to 15 seconds before the answer. The body is first saved as the org's checkout draft (`GET /api/billing/checkout-draft`), whatever the answer. `eligible` (201) records the pending billing account and a checkout intent, freezes the EUR quote and carries its C.4 display, Cache-Control: no-store: show `display.snapshot.declaration.text` directly above one button labelled `action_label`; that one click is `POST /api/billing/intents/:id/confirm` with the display's `confirmation_proof`. `vies_unavailable`, `invalid_vat_id` and `refused` answer 200 and nothing is stored but the draft: no intent, no account, no retry in the background; check again. `vies_unavailable` with `reason: vies_unavailable` carries `vies_outage`: `scope: member_state` when the VAT register of `country` does not answer VIES (a register VIES reports as down answers at once, not after the 15 seconds), `scope: vies` when VIES itself does not. `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs, for minutes; try again. Lexware never holds a checkout: its contact and invoice follow the payment. Use a fresh operation_key per press; the same key and input answer 200 with the same intent (`payment_started` with its hosted checkout once confirmed), without another Mollie payment; changed input conflicts. While another first payment of the org is open, 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. No payment or acceptance occurs at start, and the deprecated `accept_terms` confirms nothing. Hosted payment offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. Rate limited on billing.checkout_start. An active/past_due account uses billing/change."
|
|
13683
|
+
},
|
|
13684
|
+
{
|
|
13685
|
+
method: "GET",
|
|
13686
|
+
path: "/api/billing/checkout-draft",
|
|
13687
|
+
section: "billing",
|
|
13688
|
+
summary: "Reads the checkout draft, or the org's earlier billing details, to fill the checkout page.",
|
|
13689
|
+
audience: "developer",
|
|
13690
|
+
auth: "developer",
|
|
13691
|
+
rateLimited: false,
|
|
13692
|
+
ownerTier: true,
|
|
13693
|
+
status: 200,
|
|
13694
|
+
params: [],
|
|
13695
|
+
query: null,
|
|
13696
|
+
request: null,
|
|
13697
|
+
response: checkoutDraftResponse,
|
|
13698
|
+
errors: [...DEVELOPER_GUARD, "tier_required"],
|
|
13699
|
+
transport: "http",
|
|
13700
|
+
notes: "`draft` is what the last `POST /api/billing/checkout` received, saved whatever it decided, and deleted once the checkout is paid. Without one, `prefill` carries the org's earlier billing details; both are `null` for a first purchase, never both set. A reload, a new tab or a return from Mollie fills the form from here. Reading changes nothing."
|
|
13207
13701
|
},
|
|
13208
13702
|
{
|
|
13209
13703
|
method: "GET",
|
|
@@ -13219,9 +13713,9 @@ var ROUTES = [
|
|
|
13219
13713
|
query: purchaseIntentLookupQuery,
|
|
13220
13714
|
request: null,
|
|
13221
13715
|
response: purchaseIntentResponse,
|
|
13222
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found"],
|
|
13716
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict", ...MOLLIE],
|
|
13223
13717
|
transport: "http",
|
|
13224
|
-
notes: "Supply exactly one of operation_key or intent_id and the expected operation. Scope lookup to the authenticated owner and org; unknown, foreign-org or mismatched-operation intents return 404 without disclosure. Repeating a lookup after restart or lost response returns the same intent/payment identity and, for a paid change, its billing result. A proof is never returned here; a still-eligible decision needs a fresh C.4 display and explicit Owner click."
|
|
13718
|
+
notes: "Supply exactly one of operation_key or intent_id and the expected operation. Scope lookup to the authenticated owner and org; unknown, foreign-org or mismatched-operation intents return 404 without disclosure. Repeating a lookup after restart or lost response returns the same intent/payment identity and, for a paid change, its billing result. A proof is never returned here; a still-eligible decision needs a fresh C.4 display and explicit Owner click. A started hosted payment is read at the provider first: 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when it is no longer open there (paid, canceled, expired or failed), and 502 payment_provider_unavailable when the provider does not answer. A `mandate_setup` whose payment the provider never answered also answers that 502: send its `POST /api/billing/payment-method` again with the same key. An `awaiting_vies` intent with `reason: vies_unavailable` carries `vies_outage` as the hourly retry last found it: `scope: member_state` for the VAT register of `country`, `scope: vies` for VIES itself."
|
|
13225
13719
|
},
|
|
13226
13720
|
{
|
|
13227
13721
|
method: "POST",
|
|
@@ -13237,9 +13731,9 @@ var ROUTES = [
|
|
|
13237
13731
|
query: null,
|
|
13238
13732
|
request: billingDecisionDisplayRequest,
|
|
13239
13733
|
response: billingDecisionDisplayResponse,
|
|
13240
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict"],
|
|
13734
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict", "plan_purchase_closed"],
|
|
13241
13735
|
transport: "http",
|
|
13242
|
-
notes: "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
|
|
13736
|
+
notes: "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 \u20AC with Mollie`, `Pay 95 \u20AC and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus`, `Cancel at period end` or `Delete the rest and stay on Basic`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
|
|
13243
13737
|
},
|
|
13244
13738
|
{
|
|
13245
13739
|
method: "POST",
|
|
@@ -13255,9 +13749,9 @@ var ROUTES = [
|
|
|
13255
13749
|
query: null,
|
|
13256
13750
|
request: purchaseIntentConfirmRequest,
|
|
13257
13751
|
response: purchaseIntentResponse,
|
|
13258
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict", "plan_limit", "rate_limited", ...BILLING_OFF, ...MOLLIE],
|
|
13752
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict", "plan_limit", "rate_limited", "plan_purchase_closed", ...BILLING_OFF, ...MOLLIE],
|
|
13259
13753
|
transport: "http",
|
|
13260
|
-
notes: "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock
|
|
13754
|
+
notes: "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. For a checkout, after 502 payment_provider_unavailable the same key and proof may be sent again within 50 minutes: the payment is created with the same idempotency key, so at most one exists. A paid change after a 502 answers charge_in_progress until the earlier charge is settled (within about an hour), then the same key and proof charge once more. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. After the Lexware issuer cutover, a paid change that charges something while the billing details lack a company name or a full address answers 409 target_state_conflict with `{ field: billing, rule: purchase_eligibility_pending }` before the proof is consumed: nothing is charged until they are complete. Foreign ownership answers 404 without disclosure; held cannot charge."
|
|
13261
13755
|
},
|
|
13262
13756
|
{
|
|
13263
13757
|
method: "GET",
|
|
@@ -13269,7 +13763,7 @@ var ROUTES = [
|
|
|
13269
13763
|
rateLimited: false,
|
|
13270
13764
|
ownerTier: true,
|
|
13271
13765
|
status: 200,
|
|
13272
|
-
params: [{ name: "id", description: "The checkout id from `
|
|
13766
|
+
params: [{ name: "id", description: "The checkout id from a started payment's `payment.checkout_id`, carried on the return URL." }],
|
|
13273
13767
|
query: null,
|
|
13274
13768
|
request: null,
|
|
13275
13769
|
response: checkoutStatus,
|
|
@@ -13293,13 +13787,13 @@ var ROUTES = [
|
|
|
13293
13787
|
response: vatIdCheckResponse,
|
|
13294
13788
|
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "rate_limited"],
|
|
13295
13789
|
transport: "http",
|
|
13296
|
-
notes: "Reports status and optional display name only; full evidence stays in protected Finance storage. valid with a missing identifier remains pending/vies_identifier_missing. unverified or unavailable remains pending without zero rating or payment. A form check never authorizes a later charge; Cloud binds current evidence to the buyer and quote at confirmation. Rate limited on billing.vat_check."
|
|
13790
|
+
notes: "Reports status and optional display name only; full evidence stays in protected Finance storage. valid with a missing identifier remains pending/vies_identifier_missing. unverified or unavailable remains pending without zero rating or payment. pending/vies_unavailable carries `vies_outage`: `scope: member_state` when the VAT register of `country` does not answer VIES, which answers at once when VIES reports the register as down, and `scope: vies` when VIES itself does not answer within the 15 seconds. A form check never authorizes a later charge; Cloud binds current evidence to the buyer and quote at confirmation. Rate limited on billing.vat_check."
|
|
13297
13791
|
},
|
|
13298
13792
|
{
|
|
13299
13793
|
method: "PATCH",
|
|
13300
13794
|
path: "/api/billing/details",
|
|
13301
13795
|
section: "billing",
|
|
13302
|
-
summary: "Edits company billing details
|
|
13796
|
+
summary: "Edits the company's billing details; details a purchase would refuse are not saved.",
|
|
13303
13797
|
audience: "developer",
|
|
13304
13798
|
auth: "developer",
|
|
13305
13799
|
rateLimited: false,
|
|
@@ -13309,9 +13803,9 @@ var ROUTES = [
|
|
|
13309
13803
|
query: null,
|
|
13310
13804
|
request: billingDetailsUpdate,
|
|
13311
13805
|
response: billingView,
|
|
13312
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found"],
|
|
13806
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "target_state_conflict"],
|
|
13313
13807
|
transport: "http",
|
|
13314
|
-
notes: "404 not_found when no billing account exists.
|
|
13808
|
+
notes: "404 not_found when no billing account exists. Send only the fields that change: company name, full address with state, Tax ID, VAT ID, invoice email. The merged company is decided as a checkout decides its buyer, and saved only when a purchase would accept it. Every refusal is 409 target_state_conflict with `billingDetailsConflictDetails` and saves nothing: `{ field, rule }` for a field a purchase refuses (`rule` a `purchaseRefusalRule`; `field` one of `billing.kind`, `billing.vat_id`, `billing.tax_id`, `billing.address.state`, `billing.invoice_email`), `vat_id_invalid` at `billing.vat_id` when VIES does not know the VAT ID; `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`) when VIES did not answer within its 15 seconds: send the same edit again (with `reason: vies_unavailable` it carries `vies_outage`: `scope: member_state` for the VAT register of `country`, `scope: vies` for VIES itself); `{ field: billing, rule: buyer_changed }` when the details changed while the edit was decided: read `GET /api/billing` and send it again. VIES is asked when the country or the VAT ID changes, in another EU country; any other edit keeps a valid recorded VIES answer and needs none. While the VAT ID on file has no valid VIES answer (`account.vat` is null), every edit asks VIES about it again, also with the VAT ID unchanged: a valid answer is recorded and lifts the hold, any other answer saves the edit and leaves the hold as it is. A saved edit re-prices open due charges, updates the invoicing contact and invalidates quotes made for the old details. An issued invoice keeps the details it was issued with. An edit creates no payment, activates no plan, pays no invoice, clears no dunning and lifts no lock. A person account from before company-only purchases is saved without these checks; it cannot buy."
|
|
13315
13809
|
},
|
|
13316
13810
|
{
|
|
13317
13811
|
method: "POST",
|
|
@@ -13327,15 +13821,15 @@ var ROUTES = [
|
|
|
13327
13821
|
query: null,
|
|
13328
13822
|
request: billingChangeRequest,
|
|
13329
13823
|
response: billingChangeResponse,
|
|
13330
|
-
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", ...BILLING_OFF, ...MOLLIE],
|
|
13824
|
+
errors: [...DEVELOPER_GUARD, "tier_required", "validation_error", "plan_limit", "target_state_conflict", "plan_purchase_closed", ...BILLING_OFF, ...MOLLIE],
|
|
13331
13825
|
transport: "http",
|
|
13332
|
-
notes: "The request names an absolute plan/cycle/add-on target and a
|
|
13826
|
+
notes: "The request names an absolute plan/cycle/add-on target and a fresh operation_key per selection. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. The change is decided in the request and never waits: no `awaiting_vies`, and Lexware never holds it; `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs. VIES runs only when the billing details changed since the last decision or the recorded VAT treatment is blocked, and a change that charges nothing never calls it. When VIES does not answer: 409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored; with `reason: vies_unavailable` it carries `vies_outage` (`scope: member_state` for the VAT register of `country`, `scope: vies` for VIES itself). A change charging nothing while the recorded VAT treatment is unresolved: 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`. An eligible Owner obtains a C.4 display (`POST /api/billing/intents/:id/display`) and confirms with one click on its `action_label`. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts."
|
|
13333
13827
|
},
|
|
13334
13828
|
{
|
|
13335
13829
|
method: "POST",
|
|
13336
13830
|
path: "/api/billing/payment-method",
|
|
13337
13831
|
section: "billing",
|
|
13338
|
-
summary: "
|
|
13832
|
+
summary: "Starts a payment-method change: a hosted payment of 0.00 for a new mandate.",
|
|
13339
13833
|
audience: "developer",
|
|
13340
13834
|
auth: "developer",
|
|
13341
13835
|
rateLimited: true,
|
|
@@ -13345,9 +13839,9 @@ var ROUTES = [
|
|
|
13345
13839
|
query: null,
|
|
13346
13840
|
request: paymentMethodChangeRequest,
|
|
13347
13841
|
response: checkoutResponse,
|
|
13348
|
-
errors: ["target_state_conflict", ...DEVELOPER_GUARD, "tier_required", "validation_error", "not_found", "rate_limited", ...BILLING_OFF, ...MOLLIE],
|
|
13842
|
+
errors: ["target_state_conflict", ...DEVELOPER_GUARD, "tier_required", "support_forbidden", "validation_error", "not_found", "rate_limited", ...BILLING_OFF, ...MOLLIE],
|
|
13349
13843
|
transport: "http",
|
|
13350
|
-
notes: "
|
|
13844
|
+
notes: "Offer `payment_method_options`. A change is a 0.00 `first` payment on the provider's hosted page, restricted to the chosen method: the answer is operation `mandate_setup` in `payment_started` with `payment.kind` hosted at once; redirect to its `checkout_url`. Nothing is quoted, so there is no `eligible` step, no confirmation and no VIES. It pays no invoice and clears no dunning or lock: open invoices stay open. When the provider reports it paid, the new mandate is the account's and every other valid mandate of the customer is revoked; canceled, expired or failed, nothing changes. `GET /api/billing/checkout/:id` with the `checkout_id` reads the outcome (`purpose: payment_method`). Use one operation_key per method until its payment is finished. The same key again answers 200 with the same `payment_started` while the payment is open. 502 payment_provider_unavailable when the provider did not answer: the same key again resumes, and sends the same payment again under the same idempotency key. 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when the key's payment is finished or can no longer be sent: start again with a new key. Same key with another method is a typed operation_key_reused conflict. A change stored while changes were on hold reads `held` with `mandate_policy_unresolved`; start again with a new key. Apple Pay with zero-amount changes disabled pays an open invoice through operation payment_method_invoice, with the buyer/VIES gate, current-amount reconfirmation and USD legacy hold of invoices/:id/pay; without an open invoice, 400 validation_error has field method and rule applepay_needs_open_invoice. An invoice charged back is never retried automatically. 404 not_found when no billing account is active or past due. Owner only: a support session is answered 403 support_forbidden."
|
|
13351
13845
|
},
|
|
13352
13846
|
{
|
|
13353
13847
|
method: "POST",
|