@vimine/sdk 0.3.2 → 0.3.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,gHAAgH;AAChH,mGAAmG;AACnG,EAAE;AACF,iEAAiE;AACjE,kGAAkG;AAClG,EAAE;AACF,+FAA+F;AAC/F,uGAAuG;AACvG,qHAAqH;AACrH,oHAAoH;AACpH,yHAAyH;AACzH,wGAAwG;AACxG,0GAA0G;AAC1G,uHAAuH;AACvH,iGAAiG;AACjG,EAAE;AACF,sGAAsG;AACtG,6EAA6E;AAC7E,OAAO,EAAE,MAAM,EAAsB,MAAM,YAAY,CAAC;AAGxD,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,MAAM,OAAO,GAAG;IACd,EAAE,EAAE;QACF,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,yCAAyC;QACvD,SAAS,EACP,sEAAsE;QACxE,KAAK,EAAE,4BAA4B;QACnC,QAAQ,EAAE,6BAA6B;QACvC,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,WAAW;QACrB,gBAAgB,EAAE,uBAAuB;QACzC,WAAW,EAAE,sCAAsC;QACnD,aAAa,EAAE,wBAAwB;QACvC,UAAU,EAAE,uBAAuB;QACnC,QAAQ,EAAE,2CAA2C;QACrD,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE;YACN,QAAQ,EAAE,UAAU;YACpB,UAAU,EAAE,aAAa;YACzB,qBAAqB,EAAE,8BAA8B;YACrD,mBAAmB,EAAE,mBAAmB;YACxC,mBAAmB,EAAE,mBAAmB;YACxC,qBAAqB,EAAE,oBAAoB;YAC3C,wBAAwB,EACtB,oDAAo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ACF,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACrB,MAAM,OAAO,GAAG,CACb,GAAwC,EAAE,MAAM,IAAI,EAAE,CACxD;qBACE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;qBAC5C,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnB,CAAC,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC9D,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// @vimine/sdk/elements — the low-code tier: three custom elements over the browser client, Shadow DOM,\n// styled through `--vimine-*` CSS custom properties, Italian by default (`lang=\"en\"` on the element or the page\n// switches the strings). Register them once, then use the tags anywhere (CMS pages, static sites):\n//\n// import { defineVimineElements } from '@vimine/sdk/elements';\n// defineVimineElements({ clientId: 'vmc_…', redirectUri: 'https://www.example.org/callback' });\n//\n// <vimine-sign-in scope=\"membership:read\"></vimine-sign-in> a \"Sign in with Vimine\" button\n// <vimine-card></vimine-card> the signed-in member's card (SVG + QR)\n// <vimine-enroll slug=\"your-slug\"></vimine-enroll> the hosted enrolment form (iframe, Embed v0), in the\n// element's language; someone who already has a\n// Vimine account is offered a hand-off to the hosted\n// page, where they join in one step\n// <vimine-events slug=\"your-slug\"></vimine-events> the association's events (public ones for\n// visitors, every one for a signed-in member) with\n// a register button per type\n//\n// The callback page still calls `client.handleRedirect()` (or `<vimine-sign-in>` does it for you when\n// `handle-redirect` is set on the element and the page is the redirect URI).\nimport { Vimine, type VimineOptions } from \"./index.js\";\nimport type { Event, Registration, RegistrationType, Scope } from \"./types.js\";\n\nlet shared: Vimine | null = null;\n\nconst STRINGS = {\n it: {\n signIn: \"Accedi con Vimine\",\n signOut: \"Esci\",\n loading: \"Caricamento…\",\n notSignedIn: \"Accedi per vedere la tua tessera.\",\n noMembership: \"Nessuna tessera in questa associazione.\",\n notActive:\n \"La tessera non è ancora attiva: il codice compare quando lo diventa.\",\n error: \"Si è verificato un errore.\",\n noEvents: \"Nessun evento in programma.\",\n free: \"gratuita\",\n places: \"posti\",\n register: \"Iscriviti\",\n signInToRegister: \"Accedi per iscriverti\",\n joinAndBook: \"Iscriviti all’associazione e prenota\",\n alreadyMember: \"Sono già socio: accedi\",\n registered: \"Iscrizione confermata\",\n reserved: \"Posto riservato: in attesa del contributo\",\n details: \"Dettagli\",\n reason: {\n sold_out: \"esaurito\",\n event_full: \"al completo\",\n registration_not_open: \"iscrizioni non ancora aperte\",\n registration_closed: \"iscrizioni chiuse\",\n membership_required: \"riservato ai soci\",\n membership_not_active: \"tessera non valida\",\n membership_not_yet_valid:\n \"la tessera non è ancora utilizzabile a quella data\",\n membership_type_not_allowed: \"tipo di tessera non ammesso\",\n max_per_user: \"già iscritto\",\n event_past: \"evento concluso\",\n event_cancelled: \"evento annullato\",\n event_not_published: \"non pubblicato\",\n plan_limit: \"non disponibile\",\n invalid_type: \"tipo non valido\",\n } as Record<string, string>,\n },\n en: {\n signIn: \"Sign in with Vimine\",\n signOut: \"Sign out\",\n loading: \"Loading…\",\n notSignedIn: \"Sign in to see your card.\",\n noMembership: \"No membership in this association.\",\n notActive: \"The card is not active yet: its code appears once it is.\",\n error: \"Something went wrong.\",\n noEvents: \"No upcoming events.\",\n free: \"free\",\n places: \"places\",\n register: \"Register\",\n signInToRegister: \"Sign in to register\",\n joinAndBook: \"Join the association and book\",\n alreadyMember: \"Already a member? Sign in\",\n registered: \"Registration confirmed\",\n reserved: \"Place reserved: awaiting the contribution\",\n details: \"Details\",\n reason: {\n sold_out: \"sold out\",\n event_full: \"full\",\n registration_not_open: \"registrations not open yet\",\n registration_closed: \"registrations closed\",\n membership_required: \"members only\",\n membership_not_active: \"membership not valid\",\n membership_not_yet_valid: \"your card is not usable yet on that date\",\n membership_type_not_allowed: \"membership type not admitted\",\n max_per_user: \"already registered\",\n event_past: \"event over\",\n event_cancelled: \"event cancelled\",\n event_not_published: \"not published\",\n plan_limit: \"not available\",\n invalid_type: \"invalid type\",\n } as Record<string, string>,\n },\n};\ntype Lang = keyof typeof STRINGS;\nconst langOf = (el: HTMLElement): Lang => {\n const l = (\n el.getAttribute(\"lang\") ||\n el.closest(\"[lang]\")?.getAttribute(\"lang\") ||\n document.documentElement.lang ||\n \"it\"\n )\n .slice(0, 2)\n .toLowerCase();\n return l === \"en\" ? \"en\" : \"it\";\n};\n\nconst BASE_CSS = /* CSS */ `\n:host { display: inline-block; font-family: var(--vimine-font, system-ui, sans-serif); color: var(--vimine-color, #111); }\nbutton { cursor: pointer; border: 0; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font: inherit; font-weight: 600; }\nbutton:disabled { opacity: .6; cursor: default; }\n.muted { color: var(--vimine-muted, #666); font-size: .9em; }\n.error { color: var(--vimine-error, #a33); font-size: .9em; }\n`;\n\nconst shadow = (el: HTMLElement, css: string): ShadowRoot => {\n const root = el.shadowRoot || el.attachShadow({ mode: \"open\" });\n root.innerHTML = `<style>${BASE_CSS}${css}</style>`;\n return root;\n};\n\n/** The client the elements use. Call once; pass your own instance to share it with the rest of the page. */\nexport function defineVimineElements(options: VimineOptions | Vimine): Vimine {\n shared = options instanceof Vimine ? options : new Vimine(options);\n if (typeof customElements !== \"undefined\") {\n if (!customElements.get(\"vimine-sign-in\"))\n customElements.define(\"vimine-sign-in\", VimineSignIn);\n if (!customElements.get(\"vimine-card\"))\n customElements.define(\"vimine-card\", VimineCard);\n if (!customElements.get(\"vimine-enroll\"))\n customElements.define(\"vimine-enroll\", VimineEnroll);\n if (!customElements.get(\"vimine-events\"))\n customElements.define(\"vimine-events\", VimineEvents);\n }\n return shared;\n}\n\nconst client = (): Vimine => {\n if (!shared)\n throw new Error(\n \"Vimine elements: call defineVimineElements({ clientId, redirectUri }) first\",\n );\n return shared;\n};\n\n/** `<vimine-sign-in scope=\"…\" return-to=\"/area\" label=\"…\" handle-redirect>` — a sign-in / sign-out button. */\nexport class VimineSignIn extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.boot();\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async boot(): Promise<void> {\n const mp = client();\n if (this.hasAttribute(\"handle-redirect\")) {\n try {\n await mp.handleRedirect();\n } catch (err) {\n this.render(err instanceof Error ? err.message : String(err));\n return;\n }\n }\n this.render();\n this.unsubscribe = mp.onChange(() => this.render());\n }\n private render(error?: string): void {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(this, \"\");\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n if (mp.isSignedIn()) {\n btn.textContent = this.getAttribute(\"label-signed-in\") || t.signOut;\n btn.addEventListener(\n \"click\",\n () => void mp.signOut({ everywhere: this.hasAttribute(\"everywhere\") }),\n );\n } else {\n btn.textContent = this.getAttribute(\"label\") || t.signIn;\n btn.addEventListener(\"click\", () => {\n const scopes = (this.getAttribute(\"scope\") || \"\")\n .split(/[\\s,]+/)\n .filter(Boolean) as Scope[];\n void mp.signIn({\n ...(scopes.length ? { scopes } : {}),\n ...(this.getAttribute(\"return-to\")\n ? { returnTo: this.getAttribute(\"return-to\")! }\n : {}),\n });\n });\n }\n root.appendChild(btn);\n if (error) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = error;\n root.appendChild(e);\n }\n this.dispatchEvent(\n new CustomEvent(\"vimine-change\", {\n detail: { signedIn: mp.isSignedIn() },\n bubbles: true,\n }),\n );\n }\n}\n\n/** `<vimine-card>` — the signed-in member's card as SVG (with the live QR); refreshes when the session changes. */\nexport class VimineCard extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(\n this,\n \":host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }\",\n );\n const note = (cls: string, text: string) => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n if (!mp.isSignedIn()) return note(\"muted\", t.notSignedIn);\n note(\"muted\", t.loading);\n try {\n const svg = await mp.membership.cardSvg();\n root.innerHTML = `<style>${BASE_CSS}:host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }</style>${svg}`;\n this.dispatchEvent(\n new CustomEvent(\"vimine-card\", {\n detail: { loaded: true },\n bubbles: true,\n }),\n );\n } catch (err) {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n const code = (err as { code?: string })?.code;\n // `not_active`: the membership exists but has no card (pending, suspended, revoked) — a state, not a failure.\n const quiet = code === \"not_found\" || code === \"not_active\";\n note(\n quiet ? \"muted\" : \"error\",\n code === \"not_found\"\n ? t.noMembership\n : code === \"not_active\"\n ? t.notActive\n : t.error,\n );\n }\n }\n}\n\n/** The hosted enrolment page of an association, in a language: the frame's address, and where a hand-off lands. */\n/**\n * How the hosted enrolment page looks inside the host site: its scheme, the accent of its buttons, links and the\n * association's name, and the ground behind its cards (`transparent`: the host page shows through). The page reads them\n * from its address — a framed page cannot see the host's CSS — and ignores anything that is not a colour or a keyword.\n */\nexport type EnrollAppearance = { scheme?: \"light\" | \"dark\"; accent?: string; background?: string; font?: Typeface };\n\n/** The faces the hosted page offers — served by Vimine itself — or `system`, the device's own. They set everything. */\nexport const TYPEFACES = [\n \"system\",\n \"inter\",\n \"roboto\",\n \"open-sans\",\n \"montserrat\",\n \"nunito\",\n \"lora\",\n \"merriweather\",\n \"roboto-slab\",\n] as const;\nexport type Typeface = (typeof TYPEFACES)[number];\n\nconst HEX = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;\nconst appearanceQuery = (a?: EnrollAppearance): string => {\n if (!a) return \"\";\n const out: string[] = [];\n if (a.scheme === \"light\" || a.scheme === \"dark\") out.push(`scheme=${a.scheme}`);\n if (a.accent && HEX.test(a.accent)) out.push(`accent=${encodeURIComponent(a.accent.replace(/^#/, \"\"))}`);\n if (a.background === \"transparent\") out.push(\"background=transparent\");\n else if (a.background && HEX.test(a.background))\n out.push(`background=${encodeURIComponent(a.background.replace(/^#/, \"\"))}`);\n if (a.font && (TYPEFACES as readonly string[]).includes(a.font)) out.push(`font=${a.font}`);\n return out.length ? `&${out.join(\"&\")}` : \"\";\n};\n\nexport const enrollUrl = (appUrl: string, slug: string, lang: string, appearance?: EnrollAppearance): string =>\n `${appUrl.replace(/\\/+$/, \"\")}/enroll/${encodeURIComponent(slug)}?locale=${encodeURIComponent(lang)}${appearanceQuery(appearance)}`;\n\n/**\n * The same page, opened FROM an event: the person joins the association and asks for a place at the event in one go.\n * The request carries the event; the place is confirmed, or held until the membership is active.\n */\nexport const eventEnrollUrl = (\n appUrl: string,\n slug: string,\n event: string,\n lang: string,\n): string =>\n `${enrollUrl(appUrl, slug, lang)}&event=${encodeURIComponent(event)}`;\n\n/** Any CSS colour (a name, `rgb()`, `hsl()`, a hex) as `#rrggbb`, resolved by the browser; null when it is none. */\nconst hexColour = (root: ShadowRoot, value: string): string | null => {\n const v = value.trim();\n if (!v) return null;\n const probe = document.createElement(\"span\");\n probe.style.color = v;\n if (!probe.style.color) return null;\n root.appendChild(probe);\n const m = /rgba?\\(([^)]+)\\)/.exec(getComputedStyle(probe).color);\n probe.remove();\n const parts = (m?.[1] ?? \"\").split(/[\\s,/]+/).filter(Boolean).map(Number);\n if (parts.length < 3) return null;\n const [r = 0, g = 0, b = 0, alpha] = parts;\n if (alpha === 0) return null;\n return `#${[r, g, b].map((n) => Math.round(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n};\n\n/**\n * The page's look from the host's CSS: `--vimine-scheme` (light | dark), `--vimine-accent` and `--vimine-background` (a\n * colour, or `transparent`), `--vimine-typeface` (one of TYPEFACES) — custom properties inherit, so one rule on `:root`\n * styles every Vimine element at once.\n */\nconst appearanceOf = (el: HTMLElement, root: ShadowRoot): EnrollAppearance => {\n const css = getComputedStyle(el);\n const read = (name: string) => css.getPropertyValue(name).trim();\n const out: EnrollAppearance = {};\n const scheme = read(\"--vimine-scheme\");\n if (scheme === \"light\" || scheme === \"dark\") out.scheme = scheme;\n const accent = hexColour(root, read(\"--vimine-accent\"));\n if (accent) out.accent = accent;\n const background = read(\"--vimine-background\");\n if (background === \"transparent\") out.background = \"transparent\";\n else {\n const bg = hexColour(root, background);\n if (bg) out.background = bg;\n }\n const typeface = read(\"--vimine-typeface\");\n if ((TYPEFACES as readonly string[]).includes(typeface)) out.font = typeface as Typeface;\n return out;\n};\n\n/**\n * `<vimine-enroll slug=\"…\" app-url=\"https://app.vimine.network\" height=\"900\" lang=\"en\">` — the hosted enrolment form.\n *\n * Styled like the other elements, through CSS custom properties on the element or any ancestor:\n *\n * vimine-enroll { --vimine-scheme: light; --vimine-accent: #1e3a5f; --vimine-background: transparent; }\n *\n * `--vimine-scheme` the page's scheme; `--vimine-accent` its buttons, links and the association's name (moved towards\n * the page's ink when it would not read on its cards); `--vimine-background` the ground behind the cards;\n * `--vimine-typeface` the face of the whole page, fields included — one of TYPEFACES, served by Vimine (a framed page\n * cannot use the host's fonts). The frame is styled once, when the element connects.\n *\n * The form opens in the element's language (`lang` on the element or the page; Italian by default). Someone who already\n * has a Vimine account need not fill it: the form offers *Continua su Vimine*, which opens the hosted page in a new\n * tab — there their session is recognised and they join in one step (the association's statuto and privacy notice, and\n * nothing they have already told Vimine). It is a hand-off and not a sign-in inside the frame because a browser keeps a\n * framed page's session apart from the same site opened directly; the frame's sandbox lets that tab open as an ordinary\n * page (`allow-popups-to-escape-sandbox`).\n */\nexport class VimineEnroll extends HTMLElement {\n connectedCallback(): void {\n const slug = this.getAttribute(\"slug\");\n const root = shadow(\n this,\n \":host { display: block; } iframe { width: 100%; border: 0; border-radius: var(--vimine-radius, 16px); background: transparent; }\",\n );\n if (!slug) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = \"vimine-enroll: missing slug\";\n root.appendChild(e);\n return;\n }\n const appUrl = (\n this.getAttribute(\"app-url\") ||\n client().options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\");\n const frame = document.createElement(\"iframe\");\n frame.src = enrollUrl(appUrl, slug, langOf(this), appearanceOf(this, root));\n frame.title = \"Vimine\";\n frame.loading = \"lazy\";\n frame.style.height = `${Number(this.getAttribute(\"height\")) || 900}px`;\n frame.setAttribute(\n \"sandbox\",\n \"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\",\n );\n root.appendChild(frame);\n }\n}\n\nconst money = (amount: number, currency: string, lang: Lang): string => {\n try {\n return new Intl.NumberFormat(lang === \"en\" ? \"en-GB\" : \"it-IT\", {\n style: \"currency\",\n currency: currency || \"EUR\",\n }).format(amount);\n } catch {\n return `${amount.toFixed(2)} ${currency}`;\n }\n};\nconst when = (iso: string, tz: string, lang: Lang): string => {\n try {\n return new Date(iso).toLocaleString(lang === \"en\" ? \"en-GB\" : \"it-IT\", {\n timeZone: tz,\n dateStyle: \"full\",\n timeStyle: \"short\",\n });\n } catch {\n return new Date(iso).toLocaleString();\n }\n};\n\n/**\n * `<vimine-events slug=\"…\" filter=\"upcoming\" limit=\"10\" detail-url=\"/eventi/{slug}\">` — the association's events:\n * the public ones for a visitor (no sign-in), every published one for a signed-in member, each with its registration\n * types (contribution, places left) and a register button (`registrations:write`). Fires `vimine-registration`\n * `{ registration }` after a registration. `detail-url` (with `{slug}`) adds a details link.\n *\n * A VISITOR is offered a way in, not a bare sign-in: *Iscriviti all’associazione e prenota* opens the association's\n * hosted enrolment page with the event (a new tab; `app-url` as on `<vimine-enroll>`) — they join and ask for the place\n * in one go — and *Sono già socio: accedi* signs a member in here. The first is shown while the event has a registration\n * that can be had and the association takes enrolment requests; otherwise the sign-in alone.\n */\nexport class VimineEvents extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n private state: Record<string, Registration> = {};\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const lang = langOf(this);\n const t = STRINGS[lang];\n const root = shadow(\n this,\n /* CSS */ `:host { display: block; }\n.event { border: 1px solid var(--vimine-border, #e5e5e5); border-radius: var(--vimine-radius, 16px); padding: var(--vimine-padding, 1rem); margin: 0 0 1rem; }\n.event h3 { margin: 0 0 .25rem; font-size: 1.15em; } .event img { width: 100%; border-radius: var(--vimine-radius, 16px); margin-bottom: .75rem; display: block; }\n.type { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--vimine-border, #eee); }\n.type .n { font-weight: 600; } .type button { padding: .45rem .9rem; } a { color: var(--vimine-accent, #0a0e1a); }\n.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding-top: .75rem; border-top: 1px solid var(--vimine-border, #eee); }\na.button { display: inline-block; text-decoration: none; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font-weight: 600; }\nbutton.link { background: none; color: var(--vimine-accent, #0a0e1a); padding: 0; border-radius: 0; text-decoration: underline; font-weight: 400; }`,\n );\n const note = (cls: string, text: string): void => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n note(\"muted\", t.loading);\n const slug = this.getAttribute(\"slug\") || \"\";\n const filter = (this.getAttribute(\"filter\") || \"upcoming\") as\n | \"upcoming\"\n | \"past\"\n | \"cancelled\"\n | \"all\";\n const limit = Number(this.getAttribute(\"limit\")) || undefined;\n let items: Event[];\n // For a visitor: does the association take enrolment requests? Only then is joining a way to a place. A side\n // read — a failure leaves the sign-in alone.\n let joinable = false;\n try {\n const params = { filter, ...(limit ? { limit } : {}) };\n items = mp.isSignedIn()\n ? (await mp.events.list(params)).items\n : (await mp.public.events.list(slug, params)).items;\n if (!mp.isSignedIn() && slug)\n joinable = await mp.public\n .association(slug)\n .then((config) => config.aps.accepting_requests === true)\n .catch(() => false);\n } catch {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n return note(\"error\", t.error);\n }\n root.innerHTML = root.querySelector(\"style\")!.outerHTML;\n if (!items.length) return note(\"muted\", t.noEvents);\n const detailUrl = this.getAttribute(\"detail-url\");\n const join = joinable\n ? {\n slug,\n appUrl: (\n this.getAttribute(\"app-url\") ||\n mp.options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\"),\n }\n : null;\n for (const ev of items)\n root.appendChild(this.card(ev, mp, lang, detailUrl, join));\n }\n private card(\n ev: Event,\n mp: Vimine,\n lang: Lang,\n detailUrl: string | null,\n join: { slug: string; appUrl: string } | null,\n ): HTMLElement {\n const t = STRINGS[lang];\n const el = document.createElement(\"article\");\n el.className = \"event\";\n if (ev.cover_url) {\n const img = document.createElement(\"img\");\n img.src = ev.cover_url;\n img.alt = \"\";\n el.appendChild(img);\n }\n const h = document.createElement(\"h3\");\n h.textContent = ev.title;\n el.appendChild(h);\n const meta = document.createElement(\"div\");\n meta.className = \"muted\";\n meta.textContent = `${when(ev.starts_at, ev.timezone, lang)}${ev.location ? ` · ${ev.location.name || ev.location.address || \"\"}` : \"\"}`;\n el.appendChild(meta);\n if (ev.summary) {\n const p = document.createElement(\"p\");\n p.textContent = ev.summary;\n el.appendChild(p);\n }\n if (detailUrl) {\n const a = document.createElement(\"a\");\n a.href = detailUrl.replace(\"{slug}\", encodeURIComponent(ev.slug));\n a.textContent = t.details;\n el.appendChild(a);\n }\n const mine = this.state[ev.id];\n if (mine) {\n const d = document.createElement(\"div\");\n d.className = \"muted\";\n d.textContent = mine.status === \"confirmed\" ? t.registered : t.reserved;\n el.appendChild(d);\n return el;\n }\n if (ev.status === \"published\")\n for (const tp of ev.registration_types)\n el.appendChild(this.typeRow(ev, tp, mp, lang));\n // A visitor: one call for the event, under its registrations — join and book on the hosted page, or sign in here.\n if (\n ev.status === \"published\" &&\n !mp.isSignedIn() &&\n ev.registration_types.some((tp) => tp.open)\n ) {\n const actions = document.createElement(\"div\");\n actions.className = \"actions\";\n const signIn = document.createElement(\"button\");\n signIn.type = \"button\";\n signIn.addEventListener(\n \"click\",\n () =>\n void mp.signIn({\n scopes: [\n \"events:read\",\n \"registrations:read\",\n \"registrations:write\",\n ],\n }),\n );\n if (join) {\n const a = document.createElement(\"a\");\n a.className = \"button\";\n a.href = eventEnrollUrl(join.appUrl, join.slug, ev.slug, lang);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = t.joinAndBook;\n actions.appendChild(a);\n signIn.className = \"link\";\n signIn.textContent = t.alreadyMember;\n } else signIn.textContent = t.signInToRegister;\n actions.appendChild(signIn);\n el.appendChild(actions);\n }\n return el;\n }\n private typeRow(\n ev: Event,\n tp: RegistrationType,\n mp: Vimine,\n lang: Lang,\n ): HTMLElement {\n const t = STRINGS[lang];\n const row = document.createElement(\"div\");\n row.className = \"type\";\n const left = document.createElement(\"div\");\n const n = document.createElement(\"div\");\n n.className = \"n\";\n n.textContent = `${tp.name} · ${tp.amount > 0 ? money(tp.amount, tp.currency, lang) : t.free}`;\n left.appendChild(n);\n const s = document.createElement(\"div\");\n s.className = \"muted\";\n s.textContent = [\n tp.remaining != null ? `${tp.remaining} ${t.places}` : \"\",\n tp.reason ? t.reason[tp.reason] || tp.reason : \"\",\n ]\n .filter(Boolean)\n .join(\" · \");\n left.appendChild(s);\n row.appendChild(left);\n // A visitor has the event's own call below the registrations (`card`): no button per registration.\n if (!mp.isSignedIn()) return row;\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n btn.textContent = t.register;\n btn.disabled = !tp.open;\n btn.addEventListener(\"click\", async () => {\n btn.disabled = true;\n try {\n const reg = await mp.registrations.create(ev.slug, {\n registration_type: tp.uid,\n });\n this.state[ev.id] = reg;\n this.dispatchEvent(\n new CustomEvent(\"vimine-registration\", {\n detail: { registration: reg },\n bubbles: true,\n }),\n );\n void this.render();\n } catch (err) {\n btn.disabled = false;\n const reasons = (\n (err as { errors?: { code?: string }[] })?.errors || []\n )\n .map((e) => t.reason[e.code || \"\"] || e.code)\n .filter(Boolean);\n s.textContent = reasons.length ? reasons.join(\", \") : t.error;\n s.className = \"error\";\n }\n });\n row.appendChild(btn);\n return row;\n }\n}\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,gHAAgH;AAChH,mGAAmG;AACnG,EAAE;AACF,iEAAiE;AACjE,kGAAkG;AAClG,EAAE;AACF,+FAA+F;AAC/F,uGAAuG;AACvG,qHAAqH;AACrH,oHAAoH;AACpH,yHAAyH;AACzH,wGAAwG;AACxG,0GAA0G;AAC1G,uHAAuH;AACvH,iGAAiG;AACjG,EAAE;AACF,sGAAsG;AACtG,6EAA6E;AAC7E,OAAO,EAAE,MAAM,EAAsB,MAAM,YAAY,CAAC;AAGxD,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,MAAM,OAAO,GAAG;IACd,EAAE,EAAE;QACF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G,EAAE,CAAC;gBACb,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACrB,MAAM,OAAO,GAAG,CACb,GAAwC,EAAE,MAAM,IAAI,EAAE,CACxD;qBACE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;qBAC5C,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnB,CAAC,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC9D,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// @vimine/sdk/elements — the low-code tier: three custom elements over the browser client, Shadow DOM,\n// styled through `--vimine-*` CSS custom properties, Italian by default (`lang=\"en\"` on the element or the page\n// switches the strings). Register them once, then use the tags anywhere (CMS pages, static sites):\n//\n// import { defineVimineElements } from '@vimine/sdk/elements';\n// defineVimineElements({ clientId: 'vmc_…', redirectUri: 'https://www.example.org/callback' });\n//\n// <vimine-sign-in scope=\"membership:read\"></vimine-sign-in> a \"Sign in with Vimine\" button\n// <vimine-card></vimine-card> the signed-in member's card (SVG + QR)\n// <vimine-enroll slug=\"your-slug\"></vimine-enroll> the hosted enrolment form (iframe, Embed v0), in the\n// element's language; someone who already has a\n// Vimine account is offered a hand-off to the hosted\n// page, where they join in one step\n// <vimine-events slug=\"your-slug\"></vimine-events> the association's events (public ones for\n// visitors, every one for a signed-in member) with\n// a register button per type\n//\n// The callback page still calls `client.handleRedirect()` (or `<vimine-sign-in>` does it for you when\n// `handle-redirect` is set on the element and the page is the redirect URI).\nimport { Vimine, type VimineOptions } from \"./index.js\";\nimport type { Event, Registration, RegistrationType, Scope } from \"./types.js\";\n\nlet shared: Vimine | null = null;\n\nconst STRINGS = {\n it: {\n signIn: \"Accedi con Vimine\",\n signOut: \"Esci\",\n loading: \"Caricamento…\",\n notSignedIn: \"Accedi per vedere la tua tessera.\",\n noMembership: \"Nessuna tessera in questa associazione.\",\n notActive:\n \"La tessera non è ancora attiva: il codice compare quando lo diventa.\",\n error: \"Si è verificato un errore.\",\n noEvents: \"Nessun evento in programma.\",\n free: \"gratuita\",\n places: \"posti\",\n register: \"Iscriviti\",\n signInToRegister: \"Accedi per iscriverti\",\n joinAndBook: \"Iscriviti all’associazione e prenota\",\n alreadyMember: \"Sono già socio: accedi\",\n registered: \"Iscrizione confermata\",\n reserved: \"Posto riservato: in attesa del contributo\",\n details: \"Dettagli\",\n reason: {\n sold_out: \"esaurito\",\n event_full: \"al completo\",\n registration_not_open: \"iscrizioni non ancora aperte\",\n registration_closed: \"iscrizioni chiuse\",\n membership_required: \"riservato ai soci\",\n membership_not_active: \"tessera non valida\",\n membership_not_yet_valid:\n \"la tessera non è ancora utilizzabile a quella data\",\n membership_type_not_allowed: \"tipo di tessera non ammesso\",\n max_per_user: \"già iscritto\",\n event_past: \"evento concluso\",\n event_cancelled: \"evento annullato\",\n event_not_published: \"non pubblicato\",\n plan_limit: \"non disponibile\",\n invalid_type: \"tipo non valido\",\n } as Record<string, string>,\n },\n en: {\n signIn: \"Sign in with Vimine\",\n signOut: \"Sign out\",\n loading: \"Loading…\",\n notSignedIn: \"Sign in to see your card.\",\n noMembership: \"No membership in this association.\",\n notActive: \"The card is not active yet: its code appears once it is.\",\n error: \"Something went wrong.\",\n noEvents: \"No upcoming events.\",\n free: \"free\",\n places: \"places\",\n register: \"Register\",\n signInToRegister: \"Sign in to register\",\n joinAndBook: \"Join the association and book\",\n alreadyMember: \"Already a member? Sign in\",\n registered: \"Registration confirmed\",\n reserved: \"Place reserved: awaiting the contribution\",\n details: \"Details\",\n reason: {\n sold_out: \"sold out\",\n event_full: \"full\",\n registration_not_open: \"registrations not open yet\",\n registration_closed: \"registrations closed\",\n membership_required: \"members only\",\n membership_not_active: \"membership not valid\",\n membership_not_yet_valid: \"your card is not usable yet on that date\",\n membership_type_not_allowed: \"membership type not admitted\",\n max_per_user: \"already registered\",\n event_past: \"event over\",\n event_cancelled: \"event cancelled\",\n event_not_published: \"not published\",\n plan_limit: \"not available\",\n invalid_type: \"invalid type\",\n } as Record<string, string>,\n },\n \"zh-Hans\": {\n signIn: \"使用 Vimine 登录\",\n signOut: \"退出\",\n loading: \"加载中…\",\n notSignedIn: \"请登录以查看您的会员卡。\",\n noMembership: \"您在这个协会没有会员卡。\",\n notActive: \"会员卡尚未生效:生效后会显示二维码。\",\n error: \"出现错误。\",\n noEvents: \"暂无安排的活动。\",\n free: \"免费\",\n places: \"个名额\",\n register: \"报名\",\n signInToRegister: \"登录后报名\",\n joinAndBook: \"加入协会并预约\",\n alreadyMember: \"已是会员?请登录\",\n registered: \"报名已确认\",\n reserved: \"名额已保留:等待缴纳参与费\",\n details: \"详情\",\n reason: {\n sold_out: \"名额已满\",\n event_full: \"已满员\",\n registration_not_open: \"报名尚未开始\",\n registration_closed: \"报名已截止\",\n membership_required: \"仅限会员\",\n membership_not_active: \"会员卡无效\",\n membership_not_yet_valid: \"在该日期您的会员卡尚不可用\",\n membership_type_not_allowed: \"该会员卡类型不在允许范围内\",\n max_per_user: \"已报名\",\n event_past: \"活动已结束\",\n event_cancelled: \"活动已取消\",\n event_not_published: \"未发布\",\n plan_limit: \"不可用\",\n invalid_type: \"类型无效\",\n } as Record<string, string>,\n },\n \"zh-Hant\": {\n signIn: \"使用 Vimine 登入\",\n signOut: \"退出\",\n loading: \"載入中…\",\n notSignedIn: \"請登入以檢視您的會員卡。\",\n noMembership: \"您在這個協會沒有會員卡。\",\n notActive: \"會員卡尚未生效:生效後會顯示二維碼。\",\n error: \"出現錯誤。\",\n noEvents: \"暫無安排的活動。\",\n free: \"免費\",\n places: \"個名額\",\n register: \"報名\",\n signInToRegister: \"登入後報名\",\n joinAndBook: \"加入協會並預約\",\n alreadyMember: \"已是會員?請登入\",\n registered: \"報名已確認\",\n reserved: \"名額已保留:等待繳納參與費\",\n details: \"詳情\",\n reason: {\n sold_out: \"名額已滿\",\n event_full: \"已滿員\",\n registration_not_open: \"報名尚未開始\",\n registration_closed: \"報名已截止\",\n membership_required: \"僅限會員\",\n membership_not_active: \"會員卡無效\",\n membership_not_yet_valid: \"在該日期您的會員卡尚不可用\",\n membership_type_not_allowed: \"該會員卡類型不在允許範圍內\",\n max_per_user: \"已報名\",\n event_past: \"活動已結束\",\n event_cancelled: \"活動已取消\",\n event_not_published: \"未釋出\",\n plan_limit: \"不可用\",\n invalid_type: \"類型無效\",\n } as Record<string, string>,\n },\n \"fr\": {\n signIn: \"Se connecter avec Vimine\",\n signOut: \"Se déconnecter\",\n loading: \"Chargement…\",\n notSignedIn: \"Connectez-vous pour voir votre carte.\",\n noMembership: \"Aucune carte dans cette association.\",\n notActive: \"La carte n'est pas encore active : le code apparaîtra lorsqu'elle le sera.\",\n error: \"Une erreur s'est produite.\",\n noEvents: \"Aucun événement prévu.\",\n free: \"gratuite\",\n places: \"places\",\n register: \"S'inscrire\",\n signInToRegister: \"Se connecter pour s'inscrire\",\n joinAndBook: \"Adhérer à l'association et réserver\",\n alreadyMember: \"Déjà membre : se connecter\",\n registered: \"Inscription confirmée\",\n reserved: \"Place réservée : en attente de la contribution\",\n details: \"Détails\",\n reason: {\n sold_out: \"plus de places\",\n event_full: \"complet\",\n registration_not_open: \"inscriptions pas encore ouvertes\",\n registration_closed: \"inscriptions closes\",\n membership_required: \"réservé aux membres\",\n membership_not_active: \"adhésion non valable\",\n membership_not_yet_valid: \"la carte n'est pas encore utilisable à cette date\",\n membership_type_not_allowed: \"type d'adhésion non admis\",\n max_per_user: \"déjà inscrit\",\n event_past: \"événement terminé\",\n event_cancelled: \"événement annulé\",\n event_not_published: \"non publié\",\n plan_limit: \"non disponible\",\n invalid_type: \"type non valide\",\n } as Record<string, string>,\n },\n \"es\": {\n signIn: \"Iniciar sesión con Vimine\",\n signOut: \"Cerrar sesión\",\n loading: \"Cargando…\",\n notSignedIn: \"Inicia sesión para ver tu carné.\",\n noMembership: \"No tienes carné en esta asociación.\",\n notActive: \"El carné aún no está activo: el código aparece cuando lo esté.\",\n error: \"Se ha producido un error.\",\n noEvents: \"No hay eventos programados.\",\n free: \"gratuita\",\n places: \"plazas\",\n register: \"Inscríbete\",\n signInToRegister: \"Inicia sesión para inscribirte\",\n joinAndBook: \"Hazte socio y reserva\",\n alreadyMember: \"¿Ya eres socio? Inicia sesión\",\n registered: \"Inscripción confirmada\",\n reserved: \"Plaza reservada: pendiente de la contribución\",\n details: \"Detalles\",\n reason: {\n sold_out: \"agotado\",\n event_full: \"completo\",\n registration_not_open: \"inscripciones aún no abiertas\",\n registration_closed: \"inscripciones cerradas\",\n membership_required: \"solo para socios\",\n membership_not_active: \"carné no válido\",\n membership_not_yet_valid: \"el carné aún no se puede usar en esa fecha\",\n membership_type_not_allowed: \"tipo de carné no admitido\",\n max_per_user: \"ya inscrito\",\n event_past: \"evento finalizado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"no publicado\",\n plan_limit: \"no disponible\",\n invalid_type: \"tipo no válido\",\n } as Record<string, string>,\n },\n \"de\": {\n signIn: \"Mit Vimine anmelden\",\n signOut: \"Abmelden\",\n loading: \"Wird geladen…\",\n notSignedIn: \"Melden Sie sich an, um Ihren Ausweis zu sehen.\",\n noMembership: \"Keine Mitgliedschaft in diesem Verein.\",\n notActive: \"Der Ausweis ist noch nicht aktiv: Der Code erscheint, sobald er es ist.\",\n error: \"Ein Fehler ist aufgetreten.\",\n noEvents: \"Keine Veranstaltungen geplant.\",\n free: \"kostenlos\",\n places: \"Plätze\",\n register: \"Teilnehmen\",\n signInToRegister: \"Zum Teilnehmen anmelden\",\n joinAndBook: \"Dem Verein beitreten und Platz reservieren\",\n alreadyMember: \"Schon Mitglied? Anmelden\",\n registered: \"Anmeldung bestätigt\",\n reserved: \"Platz reserviert: Beitrag ausstehend\",\n details: \"Details\",\n reason: {\n sold_out: \"ausgebucht\",\n event_full: \"voll\",\n registration_not_open: \"Anmeldung noch nicht offen\",\n registration_closed: \"Anmeldung geschlossen\",\n membership_required: \"nur für Mitglieder\",\n membership_not_active: \"Mitgliedschaft nicht gültig\",\n membership_not_yet_valid: \"Ihr Ausweis ist an diesem Datum noch nicht nutzbar\",\n membership_type_not_allowed: \"Mitgliedsart nicht zugelassen\",\n max_per_user: \"bereits angemeldet\",\n event_past: \"Veranstaltung vorbei\",\n event_cancelled: \"Veranstaltung abgesagt\",\n event_not_published: \"nicht veröffentlicht\",\n plan_limit: \"nicht verfügbar\",\n invalid_type: \"ungültige Art\",\n } as Record<string, string>,\n },\n \"pt-BR\": {\n signIn: \"Entrar com Vimine\",\n signOut: \"Sair\",\n loading: \"Carregando…\",\n notSignedIn: \"Entre para ver sua carteirinha.\",\n noMembership: \"Nenhuma carteirinha nesta associação.\",\n notActive: \"A carteirinha ainda não está ativa: o código aparece quando ela for ativada.\",\n error: \"Ocorreu um erro.\",\n noEvents: \"Nenhum evento programado.\",\n free: \"gratuita\",\n places: \"vagas\",\n register: \"Inscrever-se\",\n signInToRegister: \"Entre para se inscrever\",\n joinAndBook: \"Associe-se e reserve\",\n alreadyMember: \"Já sou associado: entrar\",\n registered: \"Inscrição confirmada\",\n reserved: \"Vaga reservada: aguardando a contribuição\",\n details: \"Detalhes\",\n reason: {\n sold_out: \"esgotado\",\n event_full: \"lotado\",\n registration_not_open: \"inscrições ainda não abertas\",\n registration_closed: \"inscrições encerradas\",\n membership_required: \"exclusivo para associados\",\n membership_not_active: \"carteirinha inválida\",\n membership_not_yet_valid: \"a carteirinha ainda não pode ser usada nessa data\",\n membership_type_not_allowed: \"tipo de carteirinha não admitido\",\n max_per_user: \"já inscrito\",\n event_past: \"evento encerrado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"não publicado\",\n plan_limit: \"indisponível\",\n invalid_type: \"tipo inválido\",\n } as Record<string, string>,\n },\n};\ntype Lang = keyof typeof STRINGS;\n// Languages drafted and not yet read by a native speaker — as on the platform, which serves a draft only where its preview\n// switch names it. Their strings ship, but an element speaks one only on a page that opted in\n// (`defineVimineElements(options, { previewLanguages: true })`); elsewhere it speaks Italian, as the platform would.\n// A language leaves this list with the platform, in an SDK release. Empty since 2026-10-20: the platform enabled its six\n// drafted languages ahead of their review (the owner's decision), and the elements speak them with it.\nconst DRAFT_LANGS: Lang[] = [];\nlet previewLanguages = false;\n// The page's language → the elements' own: the tag itself, Chinese by script (zh-TW, zh-HK → Traditional; zh, zh-CN →\n// Simplified), any other variant to the language's (en-GB → en, pt-PT → pt-BR); Italian otherwise. The platform's rule.\nconst LANGS = Object.keys(STRINGS) as Lang[];\n/** The elements' language for a page's tag, or null when they do not speak it (`preview`: drafts included). */\nexport const matchLang = (tag: string, preview = previewLanguages): Lang | null => {\n const served = LANGS.filter((l) => preview || !DRAFT_LANGS.includes(l));\n const lower = tag.trim().replace(/_/g, \"-\").toLowerCase();\n const exact = served.find((l) => l.toLowerCase() === lower);\n if (exact) return exact;\n const [lang, ...rest] = lower.split(\"-\");\n if (lang === \"zh\") {\n const script = rest.some((p) => [\"hant\", \"tw\", \"hk\", \"mo\"].includes(p)) ? \"zh-Hant\" : \"zh-Hans\";\n return served.includes(script) ? script : null;\n }\n return served.find((l) => l.toLowerCase().split(\"-\")[0] === lang) || null;\n};\nconst langOf = (el: HTMLElement): Lang =>\n matchLang(\n el.getAttribute(\"lang\") ||\n el.closest(\"[lang]\")?.getAttribute(\"lang\") ||\n document.documentElement.lang ||\n \"it\",\n ) || \"it\";\n// Dates and amounts in the reader's conventions: English with day-month order, Chinese naming its script.\nconst INTL: Record<Lang, string> = {\n it: \"it-IT\",\n en: \"en-GB\",\n \"zh-Hans\": \"zh-Hans-CN\",\n \"zh-Hant\": \"zh-Hant-TW\",\n fr: \"fr-FR\",\n es: \"es-ES\",\n de: \"de-DE\",\n \"pt-BR\": \"pt-BR\",\n};\n\nconst BASE_CSS = /* CSS */ `\n:host { display: inline-block; font-family: var(--vimine-font, system-ui, sans-serif); color: var(--vimine-color, #111); }\nbutton { cursor: pointer; border: 0; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font: inherit; font-weight: 600; }\nbutton:disabled { opacity: .6; cursor: default; }\n.muted { color: var(--vimine-muted, #666); font-size: .9em; }\n.error { color: var(--vimine-error, #a33); font-size: .9em; }\n`;\n\nconst shadow = (el: HTMLElement, css: string): ShadowRoot => {\n const root = el.shadowRoot || el.attachShadow({ mode: \"open\" });\n root.innerHTML = `<style>${BASE_CSS}${css}</style>`;\n return root;\n};\n\n/** The client the elements use. Call once; pass your own instance to share it with the rest of the page. */\nexport function defineVimineElements(\n options: VimineOptions | Vimine,\n elements: { previewLanguages?: boolean } = {},\n): Vimine {\n shared = options instanceof Vimine ? options : new Vimine(options);\n previewLanguages = !!elements.previewLanguages;\n if (typeof customElements !== \"undefined\") {\n if (!customElements.get(\"vimine-sign-in\"))\n customElements.define(\"vimine-sign-in\", VimineSignIn);\n if (!customElements.get(\"vimine-card\"))\n customElements.define(\"vimine-card\", VimineCard);\n if (!customElements.get(\"vimine-enroll\"))\n customElements.define(\"vimine-enroll\", VimineEnroll);\n if (!customElements.get(\"vimine-events\"))\n customElements.define(\"vimine-events\", VimineEvents);\n }\n return shared;\n}\n\nconst client = (): Vimine => {\n if (!shared)\n throw new Error(\n \"Vimine elements: call defineVimineElements({ clientId, redirectUri }) first\",\n );\n return shared;\n};\n\n/** `<vimine-sign-in scope=\"…\" return-to=\"/area\" label=\"…\" handle-redirect>` — a sign-in / sign-out button. */\nexport class VimineSignIn extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.boot();\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async boot(): Promise<void> {\n const mp = client();\n if (this.hasAttribute(\"handle-redirect\")) {\n try {\n await mp.handleRedirect();\n } catch (err) {\n this.render(err instanceof Error ? err.message : String(err));\n return;\n }\n }\n this.render();\n this.unsubscribe = mp.onChange(() => this.render());\n }\n private render(error?: string): void {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(this, \"\");\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n if (mp.isSignedIn()) {\n btn.textContent = this.getAttribute(\"label-signed-in\") || t.signOut;\n btn.addEventListener(\n \"click\",\n () => void mp.signOut({ everywhere: this.hasAttribute(\"everywhere\") }),\n );\n } else {\n btn.textContent = this.getAttribute(\"label\") || t.signIn;\n btn.addEventListener(\"click\", () => {\n const scopes = (this.getAttribute(\"scope\") || \"\")\n .split(/[\\s,]+/)\n .filter(Boolean) as Scope[];\n void mp.signIn({\n ...(scopes.length ? { scopes } : {}),\n ...(this.getAttribute(\"return-to\")\n ? { returnTo: this.getAttribute(\"return-to\")! }\n : {}),\n });\n });\n }\n root.appendChild(btn);\n if (error) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = error;\n root.appendChild(e);\n }\n this.dispatchEvent(\n new CustomEvent(\"vimine-change\", {\n detail: { signedIn: mp.isSignedIn() },\n bubbles: true,\n }),\n );\n }\n}\n\n/** `<vimine-card>` — the signed-in member's card as SVG (with the live QR); refreshes when the session changes. */\nexport class VimineCard extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(\n this,\n \":host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }\",\n );\n const note = (cls: string, text: string) => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n if (!mp.isSignedIn()) return note(\"muted\", t.notSignedIn);\n note(\"muted\", t.loading);\n try {\n const svg = await mp.membership.cardSvg();\n root.innerHTML = `<style>${BASE_CSS}:host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }</style>${svg}`;\n this.dispatchEvent(\n new CustomEvent(\"vimine-card\", {\n detail: { loaded: true },\n bubbles: true,\n }),\n );\n } catch (err) {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n const code = (err as { code?: string })?.code;\n // `not_active`: the membership exists but has no card (pending, suspended, revoked) — a state, not a failure.\n const quiet = code === \"not_found\" || code === \"not_active\";\n note(\n quiet ? \"muted\" : \"error\",\n code === \"not_found\"\n ? t.noMembership\n : code === \"not_active\"\n ? t.notActive\n : t.error,\n );\n }\n }\n}\n\n/** The hosted enrolment page of an association, in a language: the frame's address, and where a hand-off lands. */\n/**\n * How the hosted enrolment page looks inside the host site: its scheme, the accent of its buttons, links and the\n * association's name, and the ground behind its cards (`transparent`: the host page shows through). The page reads them\n * from its address — a framed page cannot see the host's CSS — and ignores anything that is not a colour or a keyword.\n */\nexport type EnrollAppearance = { scheme?: \"light\" | \"dark\"; accent?: string; background?: string; font?: Typeface };\n\n/** The faces the hosted page offers — served by Vimine itself — or `system`, the device's own. They set everything. */\nexport const TYPEFACES = [\n \"system\",\n \"inter\",\n \"roboto\",\n \"open-sans\",\n \"montserrat\",\n \"nunito\",\n \"lora\",\n \"merriweather\",\n \"roboto-slab\",\n] as const;\nexport type Typeface = (typeof TYPEFACES)[number];\n\nconst HEX = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;\nconst appearanceQuery = (a?: EnrollAppearance): string => {\n if (!a) return \"\";\n const out: string[] = [];\n if (a.scheme === \"light\" || a.scheme === \"dark\") out.push(`scheme=${a.scheme}`);\n if (a.accent && HEX.test(a.accent)) out.push(`accent=${encodeURIComponent(a.accent.replace(/^#/, \"\"))}`);\n if (a.background === \"transparent\") out.push(\"background=transparent\");\n else if (a.background && HEX.test(a.background))\n out.push(`background=${encodeURIComponent(a.background.replace(/^#/, \"\"))}`);\n if (a.font && (TYPEFACES as readonly string[]).includes(a.font)) out.push(`font=${a.font}`);\n return out.length ? `&${out.join(\"&\")}` : \"\";\n};\n\nexport const enrollUrl = (appUrl: string, slug: string, lang: string, appearance?: EnrollAppearance): string =>\n `${appUrl.replace(/\\/+$/, \"\")}/enroll/${encodeURIComponent(slug)}?locale=${encodeURIComponent(lang)}${appearanceQuery(appearance)}`;\n\n/**\n * The same page, opened FROM an event: the person joins the association and asks for a place at the event in one go.\n * The request carries the event; the place is confirmed, or held until the membership is active.\n */\nexport const eventEnrollUrl = (\n appUrl: string,\n slug: string,\n event: string,\n lang: string,\n): string =>\n `${enrollUrl(appUrl, slug, lang)}&event=${encodeURIComponent(event)}`;\n\n/** Any CSS colour (a name, `rgb()`, `hsl()`, a hex) as `#rrggbb`, resolved by the browser; null when it is none. */\nconst hexColour = (root: ShadowRoot, value: string): string | null => {\n const v = value.trim();\n if (!v) return null;\n const probe = document.createElement(\"span\");\n probe.style.color = v;\n if (!probe.style.color) return null;\n root.appendChild(probe);\n const m = /rgba?\\(([^)]+)\\)/.exec(getComputedStyle(probe).color);\n probe.remove();\n const parts = (m?.[1] ?? \"\").split(/[\\s,/]+/).filter(Boolean).map(Number);\n if (parts.length < 3) return null;\n const [r = 0, g = 0, b = 0, alpha] = parts;\n if (alpha === 0) return null;\n return `#${[r, g, b].map((n) => Math.round(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n};\n\n/**\n * The page's look from the host's CSS: `--vimine-scheme` (light | dark), `--vimine-accent` and `--vimine-background` (a\n * colour, or `transparent`), `--vimine-typeface` (one of TYPEFACES) — custom properties inherit, so one rule on `:root`\n * styles every Vimine element at once.\n */\nconst appearanceOf = (el: HTMLElement, root: ShadowRoot): EnrollAppearance => {\n const css = getComputedStyle(el);\n const read = (name: string) => css.getPropertyValue(name).trim();\n const out: EnrollAppearance = {};\n const scheme = read(\"--vimine-scheme\");\n if (scheme === \"light\" || scheme === \"dark\") out.scheme = scheme;\n const accent = hexColour(root, read(\"--vimine-accent\"));\n if (accent) out.accent = accent;\n const background = read(\"--vimine-background\");\n if (background === \"transparent\") out.background = \"transparent\";\n else {\n const bg = hexColour(root, background);\n if (bg) out.background = bg;\n }\n const typeface = read(\"--vimine-typeface\");\n if ((TYPEFACES as readonly string[]).includes(typeface)) out.font = typeface as Typeface;\n return out;\n};\n\n/**\n * `<vimine-enroll slug=\"…\" app-url=\"https://app.vimine.network\" height=\"900\" lang=\"en\">` — the hosted enrolment form.\n *\n * Styled like the other elements, through CSS custom properties on the element or any ancestor:\n *\n * vimine-enroll { --vimine-scheme: light; --vimine-accent: #1e3a5f; --vimine-background: transparent; }\n *\n * `--vimine-scheme` the page's scheme; `--vimine-accent` its buttons, links and the association's name (moved towards\n * the page's ink when it would not read on its cards); `--vimine-background` the ground behind the cards;\n * `--vimine-typeface` the face of the whole page, fields included — one of TYPEFACES, served by Vimine (a framed page\n * cannot use the host's fonts). The frame is styled once, when the element connects.\n *\n * The form opens in the element's language (`lang` on the element or the page; Italian by default). Someone who already\n * has a Vimine account need not fill it: the form offers *Continua su Vimine*, which opens the hosted page in a new\n * tab — there their session is recognised and they join in one step (the association's statuto and privacy notice, and\n * nothing they have already told Vimine). It is a hand-off and not a sign-in inside the frame because a browser keeps a\n * framed page's session apart from the same site opened directly; the frame's sandbox lets that tab open as an ordinary\n * page (`allow-popups-to-escape-sandbox`).\n */\nexport class VimineEnroll extends HTMLElement {\n connectedCallback(): void {\n const slug = this.getAttribute(\"slug\");\n const root = shadow(\n this,\n \":host { display: block; } iframe { width: 100%; border: 0; border-radius: var(--vimine-radius, 16px); background: transparent; }\",\n );\n if (!slug) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = \"vimine-enroll: missing slug\";\n root.appendChild(e);\n return;\n }\n const appUrl = (\n this.getAttribute(\"app-url\") ||\n client().options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\");\n const frame = document.createElement(\"iframe\");\n frame.src = enrollUrl(appUrl, slug, langOf(this), appearanceOf(this, root));\n frame.title = \"Vimine\";\n frame.loading = \"lazy\";\n frame.style.height = `${Number(this.getAttribute(\"height\")) || 900}px`;\n frame.setAttribute(\n \"sandbox\",\n \"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\",\n );\n root.appendChild(frame);\n }\n}\n\nconst money = (amount: number, currency: string, lang: Lang): string => {\n try {\n return new Intl.NumberFormat(INTL[lang], {\n style: \"currency\",\n currency: currency || \"EUR\",\n }).format(amount);\n } catch {\n return `${amount.toFixed(2)} ${currency}`;\n }\n};\nconst when = (iso: string, tz: string, lang: Lang): string => {\n try {\n return new Date(iso).toLocaleString(INTL[lang], {\n timeZone: tz,\n dateStyle: \"full\",\n timeStyle: \"short\",\n });\n } catch {\n return new Date(iso).toLocaleString();\n }\n};\n\n/**\n * `<vimine-events slug=\"…\" filter=\"upcoming\" limit=\"10\" detail-url=\"/eventi/{slug}\">` — the association's events:\n * the public ones for a visitor (no sign-in), every published one for a signed-in member, each with its registration\n * types (contribution, places left) and a register button (`registrations:write`). Fires `vimine-registration`\n * `{ registration }` after a registration. `detail-url` (with `{slug}`) adds a details link.\n *\n * A VISITOR is offered a way in, not a bare sign-in: *Iscriviti all’associazione e prenota* opens the association's\n * hosted enrolment page with the event (a new tab; `app-url` as on `<vimine-enroll>`) — they join and ask for the place\n * in one go — and *Sono già socio: accedi* signs a member in here. The first is shown while the event has a registration\n * that can be had and the association takes enrolment requests; otherwise the sign-in alone.\n */\nexport class VimineEvents extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n private state: Record<string, Registration> = {};\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const lang = langOf(this);\n const t = STRINGS[lang];\n const root = shadow(\n this,\n /* CSS */ `:host { display: block; }\n.event { border: 1px solid var(--vimine-border, #e5e5e5); border-radius: var(--vimine-radius, 16px); padding: var(--vimine-padding, 1rem); margin: 0 0 1rem; }\n.event h3 { margin: 0 0 .25rem; font-size: 1.15em; } .event img { width: 100%; border-radius: var(--vimine-radius, 16px); margin-bottom: .75rem; display: block; }\n.type { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--vimine-border, #eee); }\n.type .n { font-weight: 600; } .type button { padding: .45rem .9rem; } a { color: var(--vimine-accent, #0a0e1a); }\n.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding-top: .75rem; border-top: 1px solid var(--vimine-border, #eee); }\na.button { display: inline-block; text-decoration: none; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font-weight: 600; }\nbutton.link { background: none; color: var(--vimine-accent, #0a0e1a); padding: 0; border-radius: 0; text-decoration: underline; font-weight: 400; }`,\n );\n const note = (cls: string, text: string): void => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n note(\"muted\", t.loading);\n const slug = this.getAttribute(\"slug\") || \"\";\n const filter = (this.getAttribute(\"filter\") || \"upcoming\") as\n | \"upcoming\"\n | \"past\"\n | \"cancelled\"\n | \"all\";\n const limit = Number(this.getAttribute(\"limit\")) || undefined;\n let items: Event[];\n // For a visitor: does the association take enrolment requests? Only then is joining a way to a place. A side\n // read — a failure leaves the sign-in alone.\n let joinable = false;\n try {\n const params = { filter, ...(limit ? { limit } : {}) };\n items = mp.isSignedIn()\n ? (await mp.events.list(params)).items\n : (await mp.public.events.list(slug, params)).items;\n if (!mp.isSignedIn() && slug)\n joinable = await mp.public\n .association(slug)\n .then((config) => config.aps.accepting_requests === true)\n .catch(() => false);\n } catch {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n return note(\"error\", t.error);\n }\n root.innerHTML = root.querySelector(\"style\")!.outerHTML;\n if (!items.length) return note(\"muted\", t.noEvents);\n const detailUrl = this.getAttribute(\"detail-url\");\n const join = joinable\n ? {\n slug,\n appUrl: (\n this.getAttribute(\"app-url\") ||\n mp.options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\"),\n }\n : null;\n for (const ev of items)\n root.appendChild(this.card(ev, mp, lang, detailUrl, join));\n }\n private card(\n ev: Event,\n mp: Vimine,\n lang: Lang,\n detailUrl: string | null,\n join: { slug: string; appUrl: string } | null,\n ): HTMLElement {\n const t = STRINGS[lang];\n const el = document.createElement(\"article\");\n el.className = \"event\";\n if (ev.cover_url) {\n const img = document.createElement(\"img\");\n img.src = ev.cover_url;\n img.alt = \"\";\n el.appendChild(img);\n }\n const h = document.createElement(\"h3\");\n h.textContent = ev.title;\n el.appendChild(h);\n const meta = document.createElement(\"div\");\n meta.className = \"muted\";\n meta.textContent = `${when(ev.starts_at, ev.timezone, lang)}${ev.location ? ` · ${ev.location.name || ev.location.address || \"\"}` : \"\"}`;\n el.appendChild(meta);\n if (ev.summary) {\n const p = document.createElement(\"p\");\n p.textContent = ev.summary;\n el.appendChild(p);\n }\n if (detailUrl) {\n const a = document.createElement(\"a\");\n a.href = detailUrl.replace(\"{slug}\", encodeURIComponent(ev.slug));\n a.textContent = t.details;\n el.appendChild(a);\n }\n const mine = this.state[ev.id];\n if (mine) {\n const d = document.createElement(\"div\");\n d.className = \"muted\";\n d.textContent = mine.status === \"confirmed\" ? t.registered : t.reserved;\n el.appendChild(d);\n return el;\n }\n if (ev.status === \"published\")\n for (const tp of ev.registration_types)\n el.appendChild(this.typeRow(ev, tp, mp, lang));\n // A visitor: one call for the event, under its registrations — join and book on the hosted page, or sign in here.\n if (\n ev.status === \"published\" &&\n !mp.isSignedIn() &&\n ev.registration_types.some((tp) => tp.open)\n ) {\n const actions = document.createElement(\"div\");\n actions.className = \"actions\";\n const signIn = document.createElement(\"button\");\n signIn.type = \"button\";\n signIn.addEventListener(\n \"click\",\n () =>\n void mp.signIn({\n scopes: [\n \"events:read\",\n \"registrations:read\",\n \"registrations:write\",\n ],\n }),\n );\n if (join) {\n const a = document.createElement(\"a\");\n a.className = \"button\";\n a.href = eventEnrollUrl(join.appUrl, join.slug, ev.slug, lang);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = t.joinAndBook;\n actions.appendChild(a);\n signIn.className = \"link\";\n signIn.textContent = t.alreadyMember;\n } else signIn.textContent = t.signInToRegister;\n actions.appendChild(signIn);\n el.appendChild(actions);\n }\n return el;\n }\n private typeRow(\n ev: Event,\n tp: RegistrationType,\n mp: Vimine,\n lang: Lang,\n ): HTMLElement {\n const t = STRINGS[lang];\n const row = document.createElement(\"div\");\n row.className = \"type\";\n const left = document.createElement(\"div\");\n const n = document.createElement(\"div\");\n n.className = \"n\";\n n.textContent = `${tp.name} · ${tp.amount > 0 ? money(tp.amount, tp.currency, lang) : t.free}`;\n left.appendChild(n);\n const s = document.createElement(\"div\");\n s.className = \"muted\";\n s.textContent = [\n tp.remaining != null ? `${tp.remaining} ${t.places}` : \"\",\n tp.reason ? t.reason[tp.reason] || tp.reason : \"\",\n ]\n .filter(Boolean)\n .join(\" · \");\n left.appendChild(s);\n row.appendChild(left);\n // A visitor has the event's own call below the registrations (`card`): no button per registration.\n if (!mp.isSignedIn()) return row;\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n btn.textContent = t.register;\n btn.disabled = !tp.open;\n btn.addEventListener(\"click\", async () => {\n btn.disabled = true;\n try {\n const reg = await mp.registrations.create(ev.slug, {\n registration_type: tp.uid,\n });\n this.state[ev.id] = reg;\n this.dispatchEvent(\n new CustomEvent(\"vimine-registration\", {\n detail: { registration: reg },\n bubbles: true,\n }),\n );\n void this.render();\n } catch (err) {\n btn.disabled = false;\n const reasons = (\n (err as { errors?: { code?: string }[] })?.errors || []\n )\n .map((e) => t.reason[e.code || \"\"] || e.code)\n .filter(Boolean);\n s.textContent = reasons.length ? reasons.join(\", \") : t.error;\n s.className = \"error\";\n }\n });\n row.appendChild(btn);\n return row;\n }\n}\n"]}
@@ -152,7 +152,7 @@ export interface SignupRequest {
152
152
  codicefiscale?: string | null;
153
153
  /** The person confirms a code that disagrees with their particulars (422 `codicefiscale_mismatch` with `confirmable: true`) */
154
154
  codicefiscale_confirmed?: boolean;
155
- /** The language of the page the person filled in (`it`, `en`; a regional tag such as `en-GB` is reduced to its language). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */
155
+ /** The language of the page the person filled in (a platform language — `it`, `en`, …; any other tag is matched to the platform’s own: `en-GB` → `en`, `zh-TW` → `zh-Hant`). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */
156
156
  locale?: string | null;
157
157
  /** The account terms (platform_terms) the person accepted on your site — optional, but when given it must name the in-force version */
158
158
  accept_terms?: LegalRef;
@@ -181,7 +181,7 @@ export interface EnrollRequest {
181
181
  birth_country?: string | null;
182
182
  /** One of the association’s membership types (omit when it has exactly one) */
183
183
  membership_type?: string;
184
- /** The language of the page the person filled in (`it`, `en`; a regional tag such as `en-GB` is reduced to its language). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */
184
+ /** The language of the page the person filled in (a platform language — `it`, `en`, …; any other tag is matched to the platform’s own: `en-GB` → `en`, `zh-TW` → `zh-Hant`). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */
185
185
  locale?: string | null;
186
186
  /** The in-force statuto the person accepted on your site (from GET /v1/aps/{slug}) */
187
187
  accept_statuto: {
@@ -217,7 +217,7 @@ export interface Me {
217
217
  /** How the person is identified. `matched`: a fiscal code that agrees with their particulars; `mismatch_confirmed`: a code that disagrees, confirmed by the person; `absent`: no code — date, place and country of birth identify them; null: not identified yet (they cannot request a membership) */
218
218
  codicefiscale_check?: "matched" | "mismatch_confirmed" | "absent" | null;
219
219
  /** The language the person chose for the platform and its mails; null: never chosen — the language of the request, then of the association, applies */
220
- locale?: "it" | "en" | null;
220
+ locale?: "it" | "en" | "zh-Hans" | "zh-Hant" | "fr" | "es" | "de" | "pt-BR" | null;
221
221
  updated_at?: string | null;
222
222
  }
223
223
  export interface Guardian {
@@ -396,7 +396,7 @@ export interface LegalDocumentSummary {
396
396
  uid?: string;
397
397
  /** Document kind (platform_terms, platform_privacy, platform_cookie, aps_terms, aps_dpa, aps_dpa_annex1_processing … developer_terms) */
398
398
  kind: string;
399
- locale: "it" | "en";
399
+ locale: "it" | "en" | "zh-Hans" | "zh-Hant" | "fr" | "es" | "de" | "pt-BR";
400
400
  /** Version label (1.0, 1.1, …) */
401
401
  version: string;
402
402
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"generated.js","sourceRoot":"","sources":["../src/generated.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,kDAAkD;AAilBlD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,UAAU,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC;IACrC,kBAAkB,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAC7C,UAAU,EAAE,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAC9C,kBAAkB,EAAE,CAAC,MAAM,EAAE,0BAA0B,CAAC;IACxD,UAAU,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACvC,WAAW,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACjD,KAAK,EAAE,CAAC,KAA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AE,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,iBAAiB,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACjD,aAAa,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,uBAAuB,CAAC;IAClD,cAAc,EAAE,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxD,UAAU,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACtC,mBAAmB,EAAE,CAAC,KAAK,EAAE,+BAA+B,CAAC;IAC7D,kBAAkB,EAAE,CAAC,MAAM,EAAE,iCAAiC,CAAC;IAC/D,sBAAsB,EAAE,CAAC,KAAK,EAAE,iCAAiC,CAAC;IAClE,mBAAmB,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACpD,iBAAiB,EAAE,CAAC,KAAK,EAAE,2BAA2B,CAAC;IACvD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC7D,uBAAuB,EAAE,CAAC,MAAM,EAAE,uCAAuC,CAAC;IAC1E,wBAAwB,EAAE,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC/D,qBAAqB,EAAE,CAAC,MAAM,EAAE,wBAAwB,CAAC;IACzD,kBAAkB,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;IACxC,gBAAgB,EAAE,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACrD,gBAAgB,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC7C,mBAAmB,EAAE,CAAC,KAAK,EAAE,+BAA+B,CAAC;IAC7D,aAAa,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC;CAC1C,CAAC","sourcesContent":["// GENERATED by scripts/gen-types.mjs from openapi/v1.json — do not edit. Regenerate: npm run spec:types\n// Spec version 2026-10-18 · 47 paths · 36 schemas\n\nexport interface Problem {\n type: string;\n title: string;\n status: number;\n detail?: string;\n code: string;\n request_id?: string;\n errors?: Array<{\n field?: string;\n code?: string;\n message?: string;\n }>;\n}\n\nexport interface Verification {\n status: \"active\" | \"inactive\";\n valid_until?: string;\n /** With `reason: not_yet_valid`: the card is genuine and active, and becomes usable at this moment */\n valid_from?: string;\n reason?: \"expired\" | \"invalid\" | \"not_yet_valid\";\n /** Present for registration tokens */\n kind?: \"card\" | \"registration\";\n event?: {\n slug?: string;\n starts_at?: string;\n } | null;\n}\n\nexport interface MembershipType {\n uid?: string;\n cod?: string;\n name?: string;\n description?: string | null;\n quota_amount?: number | null;\n currency?: string;\n expiry_model?: \"solar_year\" | \"rolling_12\" | \"rolling_24\" | \"prorated_solar\" | \"custom\";\n network_eligible?: boolean;\n}\n\nexport interface Statuto {\n aps?: {\n slug?: string;\n name?: string;\n };\n title: string;\n version: number;\n approved_on?: string | null;\n /** Of the uploaded document, when there is one */\n sha256?: string | null;\n /** The text as registered; empty when only a document was uploaded */\n content_md?: string;\n content_html: string;\n /** The uploaded document, a link valid for 15 minutes */\n document_url?: string | null;\n}\n\nexport interface ApsPublicConfig {\n /** The language this answer is written in */\n locale?: string;\n /** The languages the association offers: its own, plus those it enabled */\n locales?: Array<string>;\n aps: {\n slug?: string;\n name?: string;\n picture_url?: string | null;\n citta?: string | null;\n provincia?: string | null;\n enroll_enabled?: boolean;\n /** Whether a membership request would be taken now: enrolment on, a member more fits the plan, the association ready to collect requests, and its public door open. */\n accepting_requests?: boolean;\n /** True while Vimine registers people by invitation only (the private beta) and this association takes only the people it invited: `accepting_requests` is then false, and `POST /v1/enroll` answers 403 `not_available`. */\n invitation_only?: boolean;\n /** True for a sandbox: the test copy of an association that test clients work on, with synthetic members only. It never sends e-mail, takes no payments and is never in the Network. */\n sandbox?: boolean;\n /** How the association admits its members, so that an applicant can be told up front what to expect. `model`: `board` — the request waits for a decision of the association’s board, and any fee is paid after it; `provisional` — admitted at once, ratified by the board later; `automatic` — active as soon as the conditions are met. `delay_hours`: the hours between admission and a USABLE card (0 = at once): the membership is active from admission, the card counts at the door only afterwards (see `valid_from`). */\n admission?: {\n model?: \"board\" | \"provisional\" | \"automatic\";\n delay_hours?: number;\n };\n /** Kept for compatibility: true when `admission.model` is `board`. Read `admission` instead. */\n approval_required?: boolean;\n /** Whether the association collects its members’ address — of every member or of nobody. `none`: do not ask (an `address` sent anyway is not stored); `optional`; `required`: enrolment answers 422 without one. */\n member_address?: \"none\" | \"optional\" | \"required\";\n /** How to pay the fee, as the association words it */\n payment_instructions?: string | null;\n /** The activities of general interest the association carries out (Italian Third Sector Code, art. 5): `cod` is the letter of the article, `description` its Italian wording; one is marked as prevalent. */\n activity_sectors?: Array<{\n cod?: string;\n description?: string;\n prevalent?: boolean;\n }>;\n /** Present when the association is registered in the RUNTS (the Italian national register of Third Sector entities), as checked by the platform against the official public lists; null otherwise. Never typed by the association. */\n registry?: {\n /** Section of the register */\n section?: \"APS\" | \"ODV\" | \"EF\" | \"IS\" | \"RA\" | \"SOMS\" | \"ALTRI\" | null | null;\n /** Repertory number */\n number?: string | null;\n registered_on?: string | null;\n /** Date of the official list the check ran against */\n checked_on?: string | null;\n } | null;\n };\n membership_types: Array<MembershipType>;\n statuto: Statuto | unknown;\n /** The association's in-force privacy notice to members (full text: GET /v1/aps/{slug}/privacy-notice) */\n privacy_notice?: PrivacyNoticeRef | unknown;\n}\n\nexport interface FiscalCodeCheck {\n /** Codice fiscale (16 characters) */\n code: string;\n first_name?: string;\n last_name?: string;\n gender?: \"M\" | \"F\";\n /** Date of birth */\n date?: string;\n /** Birthplace: the comune, for a person born in Italy */\n place?: string;\n /** Birth country, ISO 3166-1 alpha-2. A code encodes the comune for people born in Italy and only the STATE for everybody else: anything but IT is compared with that state and `place` is ignored */\n country?: string;\n}\n\nexport interface FiscalCodeResult {\n valid?: boolean;\n error?: \"invalid\" | \"mismatch\" | null;\n /** What disagrees with the code, when `error` is `mismatch` */\n mismatches?: Array<\"lastName\" | \"firstName\" | \"gender\" | \"date\" | \"place\">;\n /** `names_swapped`: the code matches once surname and given name are exchanged */\n hints?: Array<\"names_swapped\">;\n /** The date of birth the code itself encodes */\n birth_date?: string | null;\n /** The birth country the code itself encodes, ISO 3166-1 alpha-2 (IT for a comune) */\n birth_country?: string | null;\n}\n\nexport interface CardKeys {\n keys?: Array<{\n kty?: string;\n crv?: string;\n x?: string;\n kid?: string;\n use?: string;\n alg?: string;\n }>;\n}\n\nexport interface SignupRequest {\n email: string;\n first_name: string;\n last_name: string;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only: it is not cross-checked */\n gender?: \"M\" | \"F\" | null;\n /** Comune (born in Italy) or city, free text (born abroad) */\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** Validated and cross-checked against the other fields when present */\n codicefiscale?: string | null;\n /** The person confirms a code that disagrees with their particulars (422 `codicefiscale_mismatch` with `confirmable: true`) */\n codicefiscale_confirmed?: boolean;\n /** The language of the page the person filled in (`it`, `en`; a regional tag such as `en-GB` is reduced to its language). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */\n locale?: string | null;\n /** The account terms (platform_terms) the person accepted on your site — optional, but when given it must name the in-force version */\n accept_terms?: LegalRef;\n /** The platform privacy notice (platform_privacy) the person read on your site — optional, same rule */\n acknowledge_privacy?: LegalRef;\n}\n\nexport interface EnrollRequest {\n email: string;\n first_name: string;\n last_name: string;\n /** Optional. A person is identified by a fiscal code OR by `dob` + `birthplace` + `birth_country` — never neither (422 `required` on each missing particular). When present it is validated and cross-checked against the names, the date and the place (the state, for people born abroad) */\n codicefiscale?: string | null;\n /** The person confirms a code that disagrees with their particulars (422 `codicefiscale_mismatch` with `confirmable: true`) */\n codicefiscale_confirmed?: boolean;\n /** Who holds parental responsibility for a minor (under 18 by `dob`). REQUIRED for a minor where the association declared it collects the block (`aps.collects_guardian_data`): 422 `required` on `guardian` otherwise; stored only where it declared so */\n guardian?: Guardian;\n /** Residence or, where different, domicile. Asked of every member or of nobody: the public profile says what the association declared (`member_address`: none — ignored, not stored · optional · required — 422 `required` on `address` without it) */\n address?: MemberAddress;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only: it is not cross-checked */\n gender?: \"M\" | \"F\" | null;\n /** Comune (born in Italy) or city, free text (born abroad) */\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** One of the association’s membership types (omit when it has exactly one) */\n membership_type?: string;\n /** The language of the page the person filled in (`it`, `en`; a regional tag such as `en-GB` is reduced to its language). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */\n locale?: string | null;\n /** The in-force statuto the person accepted on your site (from GET /v1/aps/{slug}) */\n accept_statuto: {\n version: number;\n sha256?: string;\n };\n /** The association's privacy notice the person read on your site (GET /v1/aps/{slug} → privacy_notice). REQUIRED when the association publishes one; 422 `privacy_notice_outdated` when it is not the in-force version */\n privacy_notice?: PrivacyNoticeAck;\n /** The account terms (platform_terms) the person accepted on your site — optional, must name the in-force version */\n accept_terms?: LegalRef;\n /** The platform privacy notice (platform_privacy) the person read — optional, same rule */\n acknowledge_privacy?: LegalRef;\n}\n\nexport interface Accepted {\n status: \"accepted\";\n}\n\nexport interface Me {\n /** The subject identifier of this person, as in the ID token */\n sub: string;\n email: string;\n email_verified: boolean;\n first_name?: string | null;\n last_name?: string | null;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only */\n gender?: \"M\" | \"F\" | null;\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** Optional: a person may have none */\n codicefiscale?: string | null;\n /** How the person is identified. `matched`: a fiscal code that agrees with their particulars; `mismatch_confirmed`: a code that disagrees, confirmed by the person; `absent`: no code — date, place and country of birth identify them; null: not identified yet (they cannot request a membership) */\n codicefiscale_check?: \"matched\" | \"mismatch_confirmed\" | \"absent\" | null;\n /** The language the person chose for the platform and its mails; null: never chosen — the language of the request, then of the association, applies */\n locale?: \"it\" | \"en\" | null;\n updated_at?: string | null;\n}\n\nexport interface Guardian {\n first_name: string;\n last_name: string;\n /** Parent, guardian… as the association records it */\n relation: string;\n /** Optional; refused when malformed */\n codicefiscale?: string | null;\n email?: string | null;\n phone?: string | null;\n}\n\nexport interface MemberAddress {\n kind?: \"residence\" | \"domicile\";\n /** Street and number */\n line: string;\n postal_code?: string | null;\n city: string;\n /** Italian addresses only (two letters); dropped abroad */\n province?: string | null;\n /** ISO 3166-1 alpha-2 */\n country?: string;\n}\n\nexport interface EnrollConfirmRequest {\n token: string;\n /** Only after a 409 `identification_required`: what the account still lacks — a fiscal code, or date, place and country of birth. Completes the EMPTY fields of the profile, never over what is there */\n identification?: {\n dob?: string;\n birthplace?: string;\n birth_country?: string;\n codicefiscale?: string;\n codicefiscale_confirmed?: boolean;\n };\n /** Only after a 409 `address_required`: the association asks every member for an address (`member_address: required` on its public profile). Optional where it declared `optional`; ignored where it collects none */\n address?: MemberAddress;\n}\n\nexport interface Event {\n id?: string;\n slug?: string;\n /** The language the `title` was served in. When it is not the one you asked for, the association has no translation: you got its Italian text, not a machine translation */\n locale?: string;\n /** The languages in which this event has a title — the association’s own always, plus those it enabled and wrote */\n locales?: Array<string>;\n title?: string;\n summary?: string | null;\n /** Markdown; render it yourself */\n description_md?: string | null;\n starts_at?: string;\n ends_at?: string | null;\n timezone?: string;\n status?: \"published\" | \"completed\" | \"cancelled\";\n visibility?: \"members_only\" | \"public\";\n location?: {\n name?: string | null;\n address?: string | null;\n lat?: number | null;\n lng?: number | null;\n } | null;\n cover_url?: string | null;\n gallery?: Array<{\n url?: string;\n alt?: string | null;\n order?: number;\n }>;\n links?: Array<{\n label?: string;\n url?: string;\n }>;\n registration?: {\n opens_at?: string | null;\n closes_at?: string | null;\n capacity?: number | null;\n remaining?: number | null;\n cancellation_hours?: number;\n };\n registration_types?: Array<{\n uid?: string;\n cod?: string;\n name?: string;\n description?: string | null;\n /** 0 = free */\n amount?: number;\n currency?: string;\n quantity?: number | null;\n /** Places left (never who holds them) */\n remaining?: number | null;\n max_per_user?: number;\n requires_active_membership?: boolean;\n open?: boolean;\n reason?: \"sold_out\" | \"registration_not_open\" | \"registration_closed\" | null | null;\n opens_at?: string | null;\n closes_at?: string | null;\n }>;\n published_at?: string | null;\n cancelled_at?: string | null;\n cancel_reason?: string | null;\n}\n\nexport interface Registration {\n id?: string;\n status?: \"reserved\" | \"confirmed\" | \"cancelled\" | \"refunded\";\n event?: {\n id?: string;\n slug?: string;\n title?: string;\n starts_at?: string;\n ends_at?: string | null;\n timezone?: string;\n status?: string;\n location?: string | null;\n };\n registration_type?: {\n uid?: string;\n cod?: string;\n name?: string;\n amount?: number;\n currency?: string;\n };\n quantity?: number;\n reserved_until?: string | null;\n checked_in_at?: string | null;\n cancelled_at?: string | null;\n cancel_reason?: string | null;\n can_cancel?: boolean;\n payment?: {\n status?: string;\n amount?: number;\n currency?: string;\n method?: string;\n paid_at?: string;\n } | null;\n /** How to pay the contribution while reserved */\n payment_instructions?: string | null;\n /** Free text the person wrote. Withheld (null) from third-party clients when the association declared it processes special categories of data */\n note?: string | null;\n created_at?: string;\n /** The registration QR payload (vmt_…), confirmed registrations only */\n token?: string | null;\n}\n\nexport interface Eligibility {\n can_register?: boolean;\n membership_verdict?: string | null;\n types?: Array<{\n uid?: string;\n cod?: string;\n can_register?: boolean;\n reasons?: Array<string>;\n pending_membership?: boolean;\n }>;\n}\n\nexport interface RegistrationRequest {\n registration_type: string;\n note?: string | null;\n quantity?: number;\n /** The language the registration was made in (`it`, `en`): the language of the mails to a guest, and the fallback for a member who never chose one. Defaults to Accept-Language */\n locale?: string | null;\n}\n\nexport interface GuestRegistrationRequest {\n email: string;\n first_name: string;\n last_name: string;\n registration_type: string;\n note?: string | null;\n /** The language the registration was made in (`it`, `en`): the language of the mails to a guest, and the fallback for a member who never chose one. Defaults to Accept-Language */\n locale?: string | null;\n}\n\nexport interface RegistrationListItem {\n id?: string;\n status?: string;\n registration_type?: string | null;\n membership_id?: string | null;\n quantity?: number;\n checked_in_at?: string | null;\n created_at?: string;\n}\n\nexport interface LegalDocumentSummary {\n uid?: string;\n /** Document kind (platform_terms, platform_privacy, platform_cookie, aps_terms, aps_dpa, aps_dpa_annex1_processing … developer_terms) */\n kind: string;\n locale: \"it\" | \"en\";\n /** Version label (1.0, 1.1, …) */\n version: string;\n title: string;\n /** What changed in this version */\n summary?: string | null;\n effective_from?: string | null;\n retired_at?: string | null;\n /** SHA-256 of the canonical template body */\n sha256?: string | null;\n /** This is the in-force version of the kind in its locale */\n current: boolean;\n requires_reacceptance?: boolean;\n}\n\nexport interface LegalDocumentList {\n documents: Array<LegalDocumentSummary>;\n /** Previous versions (with ?all=1) */\n archive?: Array<LegalDocumentSummary>;\n}\n\nexport type LegalDocument = unknown;\n\nexport interface SubProcessor {\n cod: string;\n name: string;\n entity?: string | null;\n service: string;\n data_categories?: string | null;\n location?: string | null;\n transfer_basis?: string | null;\n role: \"processor\" | \"controller\" | \"none\";\n status: \"active\" | \"planned\" | \"retired\";\n since?: string | null;\n until?: string | null;\n website?: string | null;\n}\n\nexport interface SubProcessorRegistry {\n /** The in-force Annex 3 version the registry is bound to */\n version?: string | null;\n effective_from?: string | null;\n notice_days?: number;\n at?: string;\n active: Array<SubProcessor>;\n planned: Array<SubProcessor>;\n /** Vendors that process no tenant data (transparency) */\n other: Array<SubProcessor>;\n}\n\nexport interface PrivacyNoticeRef {\n uid: string;\n version: number;\n locale: string;\n title?: string;\n sha256?: string | null;\n effective_from?: string | null;\n}\n\nexport type PrivacyNotice = unknown;\n\nexport interface LegalRef {\n /** The in-force version label shown (GET /v1/legal/{kind}) */\n version: string;\n /** Its template hash, when published */\n sha256?: string;\n}\n\nexport interface PrivacyNoticeAck {\n /** The in-force notice version shown (GET /v1/aps/{slug} → privacy_notice) */\n version: number;\n sha256?: string;\n /** The language of the notice you showed (`privacy_notice.locale` of the answer you read it from). Each language is its own document, with its own version: name it when you read the profile with `?locale=`. Default: the request’s `locale`, then the association’s language */\n locale?: string;\n}\n\nexport interface AcceptanceRecord {\n at: string;\n action: \"accepted\" | \"acknowledged\" | \"consented\" | \"withdrawn\" | \"declared\";\n channel?: \"ui\" | \"public\" | \"api\" | \"job\" | \"paper\";\n kind: string;\n title?: string;\n version: string;\n sha256?: string | null;\n /** Hash of the text actually shown */\n rendered_sha256?: string | null;\n locale?: string | null;\n /** The association the act concerns, when any */\n association?: string | null;\n}\n\nexport interface PendingDocument {\n kind: string;\n title?: string;\n locale?: string;\n version: string | number;\n sha256?: string | null;\n effective_from?: string | null;\n /** What the person is asked to do */\n action: \"accepted\" | \"acknowledged\" | \"consented\";\n /** Never acted on any version of this kind (false: a new version requires it again) */\n first?: boolean;\n}\n\nexport interface MyAcceptances {\n items: Array<AcceptanceRecord>;\n pending: {\n /** Account-layer documents still to accept / acknowledge */\n platform?: Array<PendingDocument>;\n /** This association's notice to members, when not yet acknowledged */\n privacy_notice?: PendingDocument | unknown;\n };\n}\n\nexport interface AcceptanceRequest {\n /** platform_terms | platform_privacy | network_consent | privacy_notice */\n kind: string;\n /** The in-force version shown */\n version: string | number;\n sha256?: string;\n}\n\nexport interface AcceptanceResult {\n recorded: boolean;\n kind: string;\n action: string;\n version: string;\n at: string;\n}\n\nexport interface EnrollConfirmResult {\n status: \"pending\" | \"active\" | \"suspended\" | \"revoked\" | \"rejected\";\n /** The person already had a membership request or membership here */\n already: boolean;\n /** Why the membership is still pending, in order: the association’s approval first (when it admits by decision of its board), then the fee. Empty when active */\n pending_reasons?: Array<\"approval\" | \"payment\">;\n /** May the fee be paid yet? False while the approval is pending: approval opens payment */\n payment_open?: boolean;\n /** When the card becomes usable, for an active membership inside the association’s usability delay; null otherwise */\n valid_from?: string | null;\n association: {\n name?: string;\n slug?: string;\n };\n /** Only for a link sent by the association’s hosted enrolment page when that page was opened from one of its public events: what became of the place the person asked for together with the request. `null` for every other link */\n event?: {\n slug?: string;\n title?: string;\n starts_at?: string;\n timezone?: string;\n place?: string | null;\n registration_type?: {\n uid?: string;\n name?: string;\n /** 0 = free */\n amount?: number;\n currency?: string;\n };\n /** `confirmed`: the place is theirs. `reserved`: held, see `waiting`. `held`: the membership request itself still waits for the address to be confirmed, and no place was asked for. `unavailable`: no place, see `reasons` */\n state?: \"confirmed\" | \"reserved\" | \"held\" | \"unavailable\";\n /** What a `reserved` place waits for: the membership to become active (it is then confirmed by itself when free), the contribution, or both */\n waiting?: Array<\"membership\" | \"contribution\">;\n /** Why the place is `unavailable`: the reasons of `GET /v1/events/{slug}/eligibility` */\n reasons?: Array<string>;\n reserved_until?: string | null;\n /** How to pay a contribution that is owed, in the association’s words */\n payment_instructions?: string | null;\n /** The person held this place before the link was used */\n already?: boolean;\n } | null;\n}\n\n/** Every operation of the document: id → [method, path]. */\nexport const operations = {\n getOpenApi: ['GET', '/v1/openapi.json'],\n getCardKeys: ['GET', '/v1/card-keys'],\n getApsPublicConfig: ['GET', '/v1/aps/{slug}'],\n verifyCard: ['GET', '/v1/verify/{card_token}'],\n validateFiscalCode: ['POST', '/v1/validate/fiscal-code'],\n oauthToken: ['POST', '/v1/oauth/token'],\n oauthRevoke: ['POST', '/v1/oauth/revoke'],\n oauthClientInfo: ['GET', '/v1/oauth/client-info'],\n getMe: ['GET', '/v1/me'],\n closeMe: ['DELETE', '/v1/me'],\n updateMe: ['PATCH', '/v1/me'],\n exportMe: ['GET', '/v1/me/export'],\n getMyMembership: ['GET', '/v1/me/membership'],\n requestMyMembership: ['POST', '/v1/me/membership'],\n renewMyMembership: ['POST', '/v1/me/membership/renew'],\n setNetworkOptIn: ['PATCH', '/v1/me/membership/network-opt-in'],\n getMyCardImage: ['GET', '/v1/me/membership/card.svg'],\n emailMyCard: ['POST', '/v1/me/membership/card/email'],\n getGoogleWalletLink: ['GET', '/v1/me/membership/wallet/google'],\n getMyMembershipEvents: ['GET', '/v1/me/membership/events'],\n getMyStatuto: ['GET', '/v1/me/membership/statuto'],\n acceptMyStatuto: ['POST', '/v1/me/membership/statuto/accept'],\n getMyAcceptances: ['GET', '/v1/me/acceptances'],\n recordMyAcceptance: ['POST', '/v1/me/acceptances'],\n getMyCard: ['GET', '/v1/me/membership/card'],\n getMyConnections: ['GET', '/v1/me/connections'],\n revokeMyConnection: ['DELETE', '/v1/me/connections/{client_id}'],\n listMemberships: ['GET', '/v1/memberships'],\n getMembershipStatus: ['GET', '/v1/memberships/{id}/status'],\n getSandbox: ['GET', '/v1/sandbox'],\n resetSandbox: ['POST', '/v1/sandbox/reset'],\n signup: ['POST', '/v1/signup'],\n enroll: ['POST', '/v1/enroll'],\n confirmEnrollment: ['POST', '/v1/enroll/confirm'],\n createCheckin: ['POST', '/v1/checkins'],\n listPublicEvents: ['GET', '/v1/aps/{slug}/events'],\n getPublicEvent: ['GET', '/v1/aps/{slug}/events/{event}'],\n listEvents: ['GET', '/v1/events'],\n getEvent: ['GET', '/v1/events/{slug}'],\n getEventEligibility: ['GET', '/v1/events/{slug}/eligibility'],\n createRegistration: ['POST', '/v1/events/{slug}/registrations'],\n listEventRegistrations: ['GET', '/v1/events/{slug}/registrations'],\n listMyRegistrations: ['GET', '/v1/me/registrations'],\n getMyRegistration: ['GET', '/v1/me/registrations/{id}'],\n cancelMyRegistration: ['DELETE', '/v1/me/registrations/{id}'],\n createGuestRegistration: ['POST', '/v1/events/{slug}/registrations/guest'],\n confirmGuestRegistration: ['POST', '/v1/registrations/confirm'],\n viewGuestRegistration: ['POST', '/v1/registrations/view'],\n listLegalDocuments: ['GET', '/v1/legal'],\n getSubProcessors: ['GET', '/v1/legal/sub-processors'],\n getLegalDocument: ['GET', '/v1/legal/{kind}'],\n getApsPrivacyNotice: ['GET', '/v1/aps/{slug}/privacy-notice'],\n getApsStatuto: ['GET', '/v1/aps/{slug}/statuto'],\n} as const;\nexport type OperationId = keyof typeof operations;\n"]}
1
+ {"version":3,"file":"generated.js","sourceRoot":"","sources":["../src/generated.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,kDAAkD;AAilBlD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,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,EAAE,CAAC,MAAM,EAAE,wBAAwB,CAAC;IACzD,kBAAkB,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;IACxC,gBAAgB,EAAE,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACrD,gBAAgB,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC7C,mBAAmB,EAAE,CAAC,KAAK,EAAE,+BAA+B,CAAC;IAC7D,aAAa,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC;CAC1C,CAAC","sourcesContent":["// GENERATED by scripts/gen-types.mjs from openapi/v1.json — do not edit. Regenerate: npm run spec:types\n// Spec version 2026-10-18 · 47 paths · 36 schemas\n\nexport interface Problem {\n type: string;\n title: string;\n status: number;\n detail?: string;\n code: string;\n request_id?: string;\n errors?: Array<{\n field?: string;\n code?: string;\n message?: string;\n }>;\n}\n\nexport interface Verification {\n status: \"active\" | \"inactive\";\n valid_until?: string;\n /** With `reason: not_yet_valid`: the card is genuine and active, and becomes usable at this moment */\n valid_from?: string;\n reason?: \"expired\" | \"invalid\" | \"not_yet_valid\";\n /** Present for registration tokens */\n kind?: \"card\" | \"registration\";\n event?: {\n slug?: string;\n starts_at?: string;\n } | null;\n}\n\nexport interface MembershipType {\n uid?: string;\n cod?: string;\n name?: string;\n description?: string | null;\n quota_amount?: number | null;\n currency?: string;\n expiry_model?: \"solar_year\" | \"rolling_12\" | \"rolling_24\" | \"prorated_solar\" | \"custom\";\n network_eligible?: boolean;\n}\n\nexport interface Statuto {\n aps?: {\n slug?: string;\n name?: string;\n };\n title: string;\n version: number;\n approved_on?: string | null;\n /** Of the uploaded document, when there is one */\n sha256?: string | null;\n /** The text as registered; empty when only a document was uploaded */\n content_md?: string;\n content_html: string;\n /** The uploaded document, a link valid for 15 minutes */\n document_url?: string | null;\n}\n\nexport interface ApsPublicConfig {\n /** The language this answer is written in */\n locale?: string;\n /** The languages the association offers: its own, plus those it enabled */\n locales?: Array<string>;\n aps: {\n slug?: string;\n name?: string;\n picture_url?: string | null;\n citta?: string | null;\n provincia?: string | null;\n enroll_enabled?: boolean;\n /** Whether a membership request would be taken now: enrolment on, a member more fits the plan, the association ready to collect requests, and its public door open. */\n accepting_requests?: boolean;\n /** True while Vimine registers people by invitation only (the private beta) and this association takes only the people it invited: `accepting_requests` is then false, and `POST /v1/enroll` answers 403 `not_available`. */\n invitation_only?: boolean;\n /** True for a sandbox: the test copy of an association that test clients work on, with synthetic members only. It never sends e-mail, takes no payments and is never in the Network. */\n sandbox?: boolean;\n /** How the association admits its members, so that an applicant can be told up front what to expect. `model`: `board` — the request waits for a decision of the association’s board, and any fee is paid after it; `provisional` — admitted at once, ratified by the board later; `automatic` — active as soon as the conditions are met. `delay_hours`: the hours between admission and a USABLE card (0 = at once): the membership is active from admission, the card counts at the door only afterwards (see `valid_from`). */\n admission?: {\n model?: \"board\" | \"provisional\" | \"automatic\";\n delay_hours?: number;\n };\n /** Kept for compatibility: true when `admission.model` is `board`. Read `admission` instead. */\n approval_required?: boolean;\n /** Whether the association collects its members’ address — of every member or of nobody. `none`: do not ask (an `address` sent anyway is not stored); `optional`; `required`: enrolment answers 422 without one. */\n member_address?: \"none\" | \"optional\" | \"required\";\n /** How to pay the fee, as the association words it */\n payment_instructions?: string | null;\n /** The activities of general interest the association carries out (Italian Third Sector Code, art. 5): `cod` is the letter of the article, `description` its Italian wording; one is marked as prevalent. */\n activity_sectors?: Array<{\n cod?: string;\n description?: string;\n prevalent?: boolean;\n }>;\n /** Present when the association is registered in the RUNTS (the Italian national register of Third Sector entities), as checked by the platform against the official public lists; null otherwise. Never typed by the association. */\n registry?: {\n /** Section of the register */\n section?: \"APS\" | \"ODV\" | \"EF\" | \"IS\" | \"RA\" | \"SOMS\" | \"ALTRI\" | null | null;\n /** Repertory number */\n number?: string | null;\n registered_on?: string | null;\n /** Date of the official list the check ran against */\n checked_on?: string | null;\n } | null;\n };\n membership_types: Array<MembershipType>;\n statuto: Statuto | unknown;\n /** The association's in-force privacy notice to members (full text: GET /v1/aps/{slug}/privacy-notice) */\n privacy_notice?: PrivacyNoticeRef | unknown;\n}\n\nexport interface FiscalCodeCheck {\n /** Codice fiscale (16 characters) */\n code: string;\n first_name?: string;\n last_name?: string;\n gender?: \"M\" | \"F\";\n /** Date of birth */\n date?: string;\n /** Birthplace: the comune, for a person born in Italy */\n place?: string;\n /** Birth country, ISO 3166-1 alpha-2. A code encodes the comune for people born in Italy and only the STATE for everybody else: anything but IT is compared with that state and `place` is ignored */\n country?: string;\n}\n\nexport interface FiscalCodeResult {\n valid?: boolean;\n error?: \"invalid\" | \"mismatch\" | null;\n /** What disagrees with the code, when `error` is `mismatch` */\n mismatches?: Array<\"lastName\" | \"firstName\" | \"gender\" | \"date\" | \"place\">;\n /** `names_swapped`: the code matches once surname and given name are exchanged */\n hints?: Array<\"names_swapped\">;\n /** The date of birth the code itself encodes */\n birth_date?: string | null;\n /** The birth country the code itself encodes, ISO 3166-1 alpha-2 (IT for a comune) */\n birth_country?: string | null;\n}\n\nexport interface CardKeys {\n keys?: Array<{\n kty?: string;\n crv?: string;\n x?: string;\n kid?: string;\n use?: string;\n alg?: string;\n }>;\n}\n\nexport interface SignupRequest {\n email: string;\n first_name: string;\n last_name: string;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only: it is not cross-checked */\n gender?: \"M\" | \"F\" | null;\n /** Comune (born in Italy) or city, free text (born abroad) */\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** Validated and cross-checked against the other fields when present */\n codicefiscale?: string | null;\n /** The person confirms a code that disagrees with their particulars (422 `codicefiscale_mismatch` with `confirmable: true`) */\n codicefiscale_confirmed?: boolean;\n /** The language of the page the person filled in (a platform language — `it`, `en`, …; any other tag is matched to the platform’s own: `en-GB` → `en`, `zh-TW` → `zh-Hant`). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */\n locale?: string | null;\n /** The account terms (platform_terms) the person accepted on your site — optional, but when given it must name the in-force version */\n accept_terms?: LegalRef;\n /** The platform privacy notice (platform_privacy) the person read on your site — optional, same rule */\n acknowledge_privacy?: LegalRef;\n}\n\nexport interface EnrollRequest {\n email: string;\n first_name: string;\n last_name: string;\n /** Optional. A person is identified by a fiscal code OR by `dob` + `birthplace` + `birth_country` — never neither (422 `required` on each missing particular). When present it is validated and cross-checked against the names, the date and the place (the state, for people born abroad) */\n codicefiscale?: string | null;\n /** The person confirms a code that disagrees with their particulars (422 `codicefiscale_mismatch` with `confirmable: true`) */\n codicefiscale_confirmed?: boolean;\n /** Who holds parental responsibility for a minor (under 18 by `dob`). REQUIRED for a minor where the association declared it collects the block (`aps.collects_guardian_data`): 422 `required` on `guardian` otherwise; stored only where it declared so */\n guardian?: Guardian;\n /** Residence or, where different, domicile. Asked of every member or of nobody: the public profile says what the association declared (`member_address`: none — ignored, not stored · optional · required — 422 `required` on `address` without it) */\n address?: MemberAddress;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only: it is not cross-checked */\n gender?: \"M\" | \"F\" | null;\n /** Comune (born in Italy) or city, free text (born abroad) */\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** One of the association’s membership types (omit when it has exactly one) */\n membership_type?: string;\n /** The language of the page the person filled in (a platform language — `it`, `en`, …; any other tag is matched to the platform’s own: `en-GB` → `en`, `zh-TW` → `zh-Hant`). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored */\n locale?: string | null;\n /** The in-force statuto the person accepted on your site (from GET /v1/aps/{slug}) */\n accept_statuto: {\n version: number;\n sha256?: string;\n };\n /** The association's privacy notice the person read on your site (GET /v1/aps/{slug} → privacy_notice). REQUIRED when the association publishes one; 422 `privacy_notice_outdated` when it is not the in-force version */\n privacy_notice?: PrivacyNoticeAck;\n /** The account terms (platform_terms) the person accepted on your site — optional, must name the in-force version */\n accept_terms?: LegalRef;\n /** The platform privacy notice (platform_privacy) the person read — optional, same rule */\n acknowledge_privacy?: LegalRef;\n}\n\nexport interface Accepted {\n status: \"accepted\";\n}\n\nexport interface Me {\n /** The subject identifier of this person, as in the ID token */\n sub: string;\n email: string;\n email_verified: boolean;\n first_name?: string | null;\n last_name?: string | null;\n phone?: string | null;\n dob?: string | null;\n /** Demographic only */\n gender?: \"M\" | \"F\" | null;\n birthplace?: string | null;\n /** ISO 3166-1 alpha-2 */\n birth_country?: string | null;\n /** Optional: a person may have none */\n codicefiscale?: string | null;\n /** How the person is identified. `matched`: a fiscal code that agrees with their particulars; `mismatch_confirmed`: a code that disagrees, confirmed by the person; `absent`: no code — date, place and country of birth identify them; null: not identified yet (they cannot request a membership) */\n codicefiscale_check?: \"matched\" | \"mismatch_confirmed\" | \"absent\" | null;\n /** The language the person chose for the platform and its mails; null: never chosen — the language of the request, then of the association, applies */\n locale?: \"it\" | \"en\" | \"zh-Hans\" | \"zh-Hant\" | \"fr\" | \"es\" | \"de\" | \"pt-BR\" | null;\n updated_at?: string | null;\n}\n\nexport interface Guardian {\n first_name: string;\n last_name: string;\n /** Parent, guardian… as the association records it */\n relation: string;\n /** Optional; refused when malformed */\n codicefiscale?: string | null;\n email?: string | null;\n phone?: string | null;\n}\n\nexport interface MemberAddress {\n kind?: \"residence\" | \"domicile\";\n /** Street and number */\n line: string;\n postal_code?: string | null;\n city: string;\n /** Italian addresses only (two letters); dropped abroad */\n province?: string | null;\n /** ISO 3166-1 alpha-2 */\n country?: string;\n}\n\nexport interface EnrollConfirmRequest {\n token: string;\n /** Only after a 409 `identification_required`: what the account still lacks — a fiscal code, or date, place and country of birth. Completes the EMPTY fields of the profile, never over what is there */\n identification?: {\n dob?: string;\n birthplace?: string;\n birth_country?: string;\n codicefiscale?: string;\n codicefiscale_confirmed?: boolean;\n };\n /** Only after a 409 `address_required`: the association asks every member for an address (`member_address: required` on its public profile). Optional where it declared `optional`; ignored where it collects none */\n address?: MemberAddress;\n}\n\nexport interface Event {\n id?: string;\n slug?: string;\n /** The language the `title` was served in. When it is not the one you asked for, the association has no translation: you got its Italian text, not a machine translation */\n locale?: string;\n /** The languages in which this event has a title — the association’s own always, plus those it enabled and wrote */\n locales?: Array<string>;\n title?: string;\n summary?: string | null;\n /** Markdown; render it yourself */\n description_md?: string | null;\n starts_at?: string;\n ends_at?: string | null;\n timezone?: string;\n status?: \"published\" | \"completed\" | \"cancelled\";\n visibility?: \"members_only\" | \"public\";\n location?: {\n name?: string | null;\n address?: string | null;\n lat?: number | null;\n lng?: number | null;\n } | null;\n cover_url?: string | null;\n gallery?: Array<{\n url?: string;\n alt?: string | null;\n order?: number;\n }>;\n links?: Array<{\n label?: string;\n url?: string;\n }>;\n registration?: {\n opens_at?: string | null;\n closes_at?: string | null;\n capacity?: number | null;\n remaining?: number | null;\n cancellation_hours?: number;\n };\n registration_types?: Array<{\n uid?: string;\n cod?: string;\n name?: string;\n description?: string | null;\n /** 0 = free */\n amount?: number;\n currency?: string;\n quantity?: number | null;\n /** Places left (never who holds them) */\n remaining?: number | null;\n max_per_user?: number;\n requires_active_membership?: boolean;\n open?: boolean;\n reason?: \"sold_out\" | \"registration_not_open\" | \"registration_closed\" | null | null;\n opens_at?: string | null;\n closes_at?: string | null;\n }>;\n published_at?: string | null;\n cancelled_at?: string | null;\n cancel_reason?: string | null;\n}\n\nexport interface Registration {\n id?: string;\n status?: \"reserved\" | \"confirmed\" | \"cancelled\" | \"refunded\";\n event?: {\n id?: string;\n slug?: string;\n title?: string;\n starts_at?: string;\n ends_at?: string | null;\n timezone?: string;\n status?: string;\n location?: string | null;\n };\n registration_type?: {\n uid?: string;\n cod?: string;\n name?: string;\n amount?: number;\n currency?: string;\n };\n quantity?: number;\n reserved_until?: string | null;\n checked_in_at?: string | null;\n cancelled_at?: string | null;\n cancel_reason?: string | null;\n can_cancel?: boolean;\n payment?: {\n status?: string;\n amount?: number;\n currency?: string;\n method?: string;\n paid_at?: string;\n } | null;\n /** How to pay the contribution while reserved */\n payment_instructions?: string | null;\n /** Free text the person wrote. Withheld (null) from third-party clients when the association declared it processes special categories of data */\n note?: string | null;\n created_at?: string;\n /** The registration QR payload (vmt_…), confirmed registrations only */\n token?: string | null;\n}\n\nexport interface Eligibility {\n can_register?: boolean;\n membership_verdict?: string | null;\n types?: Array<{\n uid?: string;\n cod?: string;\n can_register?: boolean;\n reasons?: Array<string>;\n pending_membership?: boolean;\n }>;\n}\n\nexport interface RegistrationRequest {\n registration_type: string;\n note?: string | null;\n quantity?: number;\n /** The language the registration was made in (`it`, `en`): the language of the mails to a guest, and the fallback for a member who never chose one. Defaults to Accept-Language */\n locale?: string | null;\n}\n\nexport interface GuestRegistrationRequest {\n email: string;\n first_name: string;\n last_name: string;\n registration_type: string;\n note?: string | null;\n /** The language the registration was made in (`it`, `en`): the language of the mails to a guest, and the fallback for a member who never chose one. Defaults to Accept-Language */\n locale?: string | null;\n}\n\nexport interface RegistrationListItem {\n id?: string;\n status?: string;\n registration_type?: string | null;\n membership_id?: string | null;\n quantity?: number;\n checked_in_at?: string | null;\n created_at?: string;\n}\n\nexport interface LegalDocumentSummary {\n uid?: string;\n /** Document kind (platform_terms, platform_privacy, platform_cookie, aps_terms, aps_dpa, aps_dpa_annex1_processing … developer_terms) */\n kind: string;\n locale: \"it\" | \"en\" | \"zh-Hans\" | \"zh-Hant\" | \"fr\" | \"es\" | \"de\" | \"pt-BR\";\n /** Version label (1.0, 1.1, …) */\n version: string;\n title: string;\n /** What changed in this version */\n summary?: string | null;\n effective_from?: string | null;\n retired_at?: string | null;\n /** SHA-256 of the canonical template body */\n sha256?: string | null;\n /** This is the in-force version of the kind in its locale */\n current: boolean;\n requires_reacceptance?: boolean;\n}\n\nexport interface LegalDocumentList {\n documents: Array<LegalDocumentSummary>;\n /** Previous versions (with ?all=1) */\n archive?: Array<LegalDocumentSummary>;\n}\n\nexport type LegalDocument = unknown;\n\nexport interface SubProcessor {\n cod: string;\n name: string;\n entity?: string | null;\n service: string;\n data_categories?: string | null;\n location?: string | null;\n transfer_basis?: string | null;\n role: \"processor\" | \"controller\" | \"none\";\n status: \"active\" | \"planned\" | \"retired\";\n since?: string | null;\n until?: string | null;\n website?: string | null;\n}\n\nexport interface SubProcessorRegistry {\n /** The in-force Annex 3 version the registry is bound to */\n version?: string | null;\n effective_from?: string | null;\n notice_days?: number;\n at?: string;\n active: Array<SubProcessor>;\n planned: Array<SubProcessor>;\n /** Vendors that process no tenant data (transparency) */\n other: Array<SubProcessor>;\n}\n\nexport interface PrivacyNoticeRef {\n uid: string;\n version: number;\n locale: string;\n title?: string;\n sha256?: string | null;\n effective_from?: string | null;\n}\n\nexport type PrivacyNotice = unknown;\n\nexport interface LegalRef {\n /** The in-force version label shown (GET /v1/legal/{kind}) */\n version: string;\n /** Its template hash, when published */\n sha256?: string;\n}\n\nexport interface PrivacyNoticeAck {\n /** The in-force notice version shown (GET /v1/aps/{slug} → privacy_notice) */\n version: number;\n sha256?: string;\n /** The language of the notice you showed (`privacy_notice.locale` of the answer you read it from). Each language is its own document, with its own version: name it when you read the profile with `?locale=`. Default: the request’s `locale`, then the association’s language */\n locale?: string;\n}\n\nexport interface AcceptanceRecord {\n at: string;\n action: \"accepted\" | \"acknowledged\" | \"consented\" | \"withdrawn\" | \"declared\";\n channel?: \"ui\" | \"public\" | \"api\" | \"job\" | \"paper\";\n kind: string;\n title?: string;\n version: string;\n sha256?: string | null;\n /** Hash of the text actually shown */\n rendered_sha256?: string | null;\n locale?: string | null;\n /** The association the act concerns, when any */\n association?: string | null;\n}\n\nexport interface PendingDocument {\n kind: string;\n title?: string;\n locale?: string;\n version: string | number;\n sha256?: string | null;\n effective_from?: string | null;\n /** What the person is asked to do */\n action: \"accepted\" | \"acknowledged\" | \"consented\";\n /** Never acted on any version of this kind (false: a new version requires it again) */\n first?: boolean;\n}\n\nexport interface MyAcceptances {\n items: Array<AcceptanceRecord>;\n pending: {\n /** Account-layer documents still to accept / acknowledge */\n platform?: Array<PendingDocument>;\n /** This association's notice to members, when not yet acknowledged */\n privacy_notice?: PendingDocument | unknown;\n };\n}\n\nexport interface AcceptanceRequest {\n /** platform_terms | platform_privacy | network_consent | privacy_notice */\n kind: string;\n /** The in-force version shown */\n version: string | number;\n sha256?: string;\n}\n\nexport interface AcceptanceResult {\n recorded: boolean;\n kind: string;\n action: string;\n version: string;\n at: string;\n}\n\nexport interface EnrollConfirmResult {\n status: \"pending\" | \"active\" | \"suspended\" | \"revoked\" | \"rejected\";\n /** The person already had a membership request or membership here */\n already: boolean;\n /** Why the membership is still pending, in order: the association’s approval first (when it admits by decision of its board), then the fee. Empty when active */\n pending_reasons?: Array<\"approval\" | \"payment\">;\n /** May the fee be paid yet? False while the approval is pending: approval opens payment */\n payment_open?: boolean;\n /** When the card becomes usable, for an active membership inside the association’s usability delay; null otherwise */\n valid_from?: string | null;\n association: {\n name?: string;\n slug?: string;\n };\n /** Only for a link sent by the association’s hosted enrolment page when that page was opened from one of its public events: what became of the place the person asked for together with the request. `null` for every other link */\n event?: {\n slug?: string;\n title?: string;\n starts_at?: string;\n timezone?: string;\n place?: string | null;\n registration_type?: {\n uid?: string;\n name?: string;\n /** 0 = free */\n amount?: number;\n currency?: string;\n };\n /** `confirmed`: the place is theirs. `reserved`: held, see `waiting`. `held`: the membership request itself still waits for the address to be confirmed, and no place was asked for. `unavailable`: no place, see `reasons` */\n state?: \"confirmed\" | \"reserved\" | \"held\" | \"unavailable\";\n /** What a `reserved` place waits for: the membership to become active (it is then confirmed by itself when free), the contribution, or both */\n waiting?: Array<\"membership\" | \"contribution\">;\n /** Why the place is `unavailable`: the reasons of `GET /v1/events/{slug}/eligibility` */\n reasons?: Array<string>;\n reserved_until?: string | null;\n /** How to pay a contribution that is owed, in the association’s words */\n payment_instructions?: string | null;\n /** The person held this place before the link was used */\n already?: boolean;\n } | null;\n}\n\n/** Every operation of the document: id → [method, path]. */\nexport const operations = {\n getOpenApi: ['GET', '/v1/openapi.json'],\n getCardKeys: ['GET', '/v1/card-keys'],\n getApsPublicConfig: ['GET', '/v1/aps/{slug}'],\n verifyCard: ['GET', '/v1/verify/{card_token}'],\n validateFiscalCode: ['POST', '/v1/validate/fiscal-code'],\n oauthToken: ['POST', '/v1/oauth/token'],\n oauthRevoke: ['POST', '/v1/oauth/revoke'],\n oauthClientInfo: ['GET', '/v1/oauth/client-info'],\n getMe: ['GET', '/v1/me'],\n closeMe: ['DELETE', '/v1/me'],\n updateMe: ['PATCH', '/v1/me'],\n exportMe: ['GET', '/v1/me/export'],\n getMyMembership: ['GET', '/v1/me/membership'],\n requestMyMembership: ['POST', '/v1/me/membership'],\n renewMyMembership: ['POST', '/v1/me/membership/renew'],\n setNetworkOptIn: ['PATCH', '/v1/me/membership/network-opt-in'],\n getMyCardImage: ['GET', '/v1/me/membership/card.svg'],\n emailMyCard: ['POST', '/v1/me/membership/card/email'],\n getGoogleWalletLink: ['GET', '/v1/me/membership/wallet/google'],\n getMyMembershipEvents: ['GET', '/v1/me/membership/events'],\n getMyStatuto: ['GET', '/v1/me/membership/statuto'],\n acceptMyStatuto: ['POST', '/v1/me/membership/statuto/accept'],\n getMyAcceptances: ['GET', '/v1/me/acceptances'],\n recordMyAcceptance: ['POST', '/v1/me/acceptances'],\n getMyCard: ['GET', '/v1/me/membership/card'],\n getMyConnections: ['GET', '/v1/me/connections'],\n revokeMyConnection: ['DELETE', '/v1/me/connections/{client_id}'],\n listMemberships: ['GET', '/v1/memberships'],\n getMembershipStatus: ['GET', '/v1/memberships/{id}/status'],\n getSandbox: ['GET', '/v1/sandbox'],\n resetSandbox: ['POST', '/v1/sandbox/reset'],\n signup: ['POST', '/v1/signup'],\n enroll: ['POST', '/v1/enroll'],\n confirmEnrollment: ['POST', '/v1/enroll/confirm'],\n createCheckin: ['POST', '/v1/checkins'],\n listPublicEvents: ['GET', '/v1/aps/{slug}/events'],\n getPublicEvent: ['GET', '/v1/aps/{slug}/events/{event}'],\n listEvents: ['GET', '/v1/events'],\n getEvent: ['GET', '/v1/events/{slug}'],\n getEventEligibility: ['GET', '/v1/events/{slug}/eligibility'],\n createRegistration: ['POST', '/v1/events/{slug}/registrations'],\n listEventRegistrations: ['GET', '/v1/events/{slug}/registrations'],\n listMyRegistrations: ['GET', '/v1/me/registrations'],\n getMyRegistration: ['GET', '/v1/me/registrations/{id}'],\n cancelMyRegistration: ['DELETE', '/v1/me/registrations/{id}'],\n createGuestRegistration: ['POST', '/v1/events/{slug}/registrations/guest'],\n confirmGuestRegistration: ['POST', '/v1/registrations/confirm'],\n viewGuestRegistration: ['POST', '/v1/registrations/view'],\n listLegalDocuments: ['GET', '/v1/legal'],\n getSubProcessors: ['GET', '/v1/legal/sub-processors'],\n getLegalDocument: ['GET', '/v1/legal/{kind}'],\n getApsPrivacyNotice: ['GET', '/v1/aps/{slug}/privacy-notice'],\n getApsStatuto: ['GET', '/v1/aps/{slug}/statuto'],\n} as const;\nexport type OperationId = keyof typeof operations;\n"]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type PublicApi } from './public.js';
2
2
  import { type StorageKind, type TokenStorage } from './storage.js';
3
- import type { AcceptanceInput, AcceptanceResult, Accepted, Card, Connection, Eligibility, Event, EventList, EventListParams, LocaleParam, Me, Membership, MembershipEvents, MembershipRequest, MembershipRequestResult, MeUpdate, MyAcceptances, NetworkOptIn, Registration, RegistrationList, RegistrationRequest, RenewResult, Scope, StatutoAccept, StatutoInfo } from './types.js';
3
+ import type { AcceptanceInput, AcceptanceResult, Accepted, Card, Connection, Eligibility, Event, EventList, EventListParams, Locale, LocaleParam, Me, Membership, MembershipEvents, MembershipRequest, MembershipRequestResult, MeUpdate, MyAcceptances, NetworkOptIn, Registration, RegistrationList, RegistrationRequest, RenewResult, Scope, StatutoAccept, StatutoInfo } from './types.js';
4
4
  export { VimineError } from './errors.js';
5
5
  export type { FieldError, ProblemDetails } from './errors.js';
6
6
  export { createPkce, createState, createVerifier, createChallenge, base64url } from './pkce.js';
@@ -25,8 +25,8 @@ export interface VimineOptions {
25
25
  storage?: StorageKind | TokenStorage;
26
26
  /** Storage key prefix (default derived from the client id). */
27
27
  storageKey?: string;
28
- /** UI language of the hosted pages. */
29
- locale?: 'it' | 'en';
28
+ /** UI language of the hosted pages (a platform language; Chinese by script: `zh-Hans`, `zh-Hant`). */
29
+ locale?: Locale;
30
30
  /** Custom fetch (tests, polyfills). */
31
31
  fetch?: typeof fetch;
32
32
  /** How to leave the page (default: the top window's `location.assign`). */
@@ -157,7 +157,7 @@ export declare class Vimine {
157
157
  */
158
158
  readonly legal: {
159
159
  acceptances: (params?: {
160
- locale?: "it" | "en";
160
+ locale?: Locale;
161
161
  }) => Promise<MyAcceptances>;
162
162
  record: (body: AcceptanceInput, opts?: {
163
163
  idempotencyKey?: string;