@supscale/sculdoc-client 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ export interface paths {
6
6
  path?: never;
7
7
  cookie?: never;
8
8
  };
9
- /** Who am I: user and organizations, or API key and its organization */
9
+ /** Who am I: user, organizations with roles and permissions, active organization; or API key */
10
10
  get: operations["getMe"];
11
11
  put?: never;
12
12
  post?: never;
@@ -60,7 +60,10 @@ export interface paths {
60
60
  /** List templates (optionally of one folder; folderId=root for the root) */
61
61
  get: operations["listTemplates"];
62
62
  put?: never;
63
- /** Create a template (empty: save a draft next) */
63
+ /**
64
+ * Create a template, empty (save a draft next) or from a starter of the platform
65
+ * @description `fromStarter` (deprecated: POST /library/{slug}/copy): the slug of a template of the public library, copied as by POST /library/{slug}/copy (draft with the content, samples and assets of its current public version, `origin` kept).
66
+ */
64
67
  post: operations["createTemplate"];
65
68
  delete?: never;
66
69
  options?: never;
@@ -110,7 +113,10 @@ export interface paths {
110
113
  cookie?: never;
111
114
  };
112
115
  get?: never;
113
- /** Create or replace the single draft of a template */
116
+ /**
117
+ * Create or replace the single draft of a template
118
+ * @description The response carries the `ETag` of the saved draft. With `If-Match`, a draft changed since it was read is not overwritten: 409 `draft.conflict` with the current draft in `current`.
119
+ */
114
120
  put: operations["saveDraft"];
115
121
  post?: never;
116
122
  /** Discard the draft */
@@ -131,7 +137,7 @@ export interface paths {
131
137
  put?: never;
132
138
  /**
133
139
  * Publish the draft as the next immutable version
134
- * @description Checks: valid SDM document, at least one sample, includes pinned by version and hash, assets resolved, data schema covering every path the template uses, samples valid against the schema. All issues are reported at once (422). Font families are resolved against the organization depot, then the platform depot; a family in neither is substituted by a platform family, pinned in the version and reported in `warnings`.
140
+ * @description Checks: valid SDM document, at least one sample, includes pinned by version and hash, assets resolved, data schema covering every path the template uses, samples valid against the schema. All issues are reported at once (422). Font families are resolved against the organization depot, then the platform depot; a family in neither is substituted by a platform family, pinned in the version and reported in `warnings`. The Typst version (`engine.typst`) is `engine.version` when given (an explicit change, refused with `publish.engine` when the platform does not carry it), else `meta.engine.version` of the draft, else the version of the last publication, else the default (`GET /v1/engines`); a deprecated version publishes with the warning `engine.deprecated`.
135
141
  */
136
142
  post: operations["publishDraft"];
137
143
  delete?: never;
@@ -184,7 +190,10 @@ export interface paths {
184
190
  path?: never;
185
191
  cookie?: never;
186
192
  };
187
- /** Get a version with its content */
193
+ /**
194
+ * Get a version with its content
195
+ * @description `draft`: the response carries the `ETag` to send in `If-Match` with the next save, and the soft edit lock (`lock`).
196
+ */
188
197
  get: operations["getVersion"];
189
198
  put?: never;
190
199
  post?: never;
@@ -463,7 +472,7 @@ export interface paths {
463
472
  };
464
473
  /**
465
474
  * Items of a batch, in the order of the request, with their render and their error
466
- * @description A succeeded item names its render (`renderId`, GET /renders/{id}) and its document (GET /documents/{id}); a failed item carries its error. Pages follow `nextCursor`.
475
+ * @description A succeeded item names its render (`renderId`, GET /renders/{id}) and its document (GET /documents/{id}; `409 document.intermediate` for an item of a sealed merged batch); a failed item carries its error. Pages follow `nextCursor`.
467
476
  */
468
477
  get: operations["listJobItems"];
469
478
  put?: never;
@@ -528,34 +537,542 @@ export interface paths {
528
537
  patch?: never;
529
538
  trace?: never;
530
539
  };
540
+ "/api-keys/{keyId}/usage": {
541
+ parameters: {
542
+ query?: never;
543
+ header?: never;
544
+ path?: never;
545
+ cookie?: never;
546
+ };
547
+ /**
548
+ * Counters and limits of a key: renders of the minute, pages of the day
549
+ * @description Sliding windows (60 seconds, 24 hours), like GET /organization/usage. Owners and admins read every key; a key reads its own counters (to pace itself).
550
+ */
551
+ get: operations["getApiKeyUsage"];
552
+ put?: never;
553
+ post?: never;
554
+ delete?: never;
555
+ options?: never;
556
+ head?: never;
557
+ patch?: never;
558
+ trace?: never;
559
+ };
560
+ "/imports": {
561
+ parameters: {
562
+ query?: never;
563
+ header?: never;
564
+ path?: never;
565
+ cookie?: never;
566
+ };
567
+ /** Imports of the organization, newest first */
568
+ get: operations["listImports"];
569
+ put?: never;
570
+ post?: never;
571
+ delete?: never;
572
+ options?: never;
573
+ head?: never;
574
+ patch?: never;
575
+ trace?: never;
576
+ };
577
+ "/imports/{importId}": {
578
+ parameters: {
579
+ query?: never;
580
+ header?: never;
581
+ path?: never;
582
+ cookie?: never;
583
+ };
584
+ /** State, report and warnings of an import */
585
+ get: operations["getImport"];
586
+ put?: never;
587
+ post?: never;
588
+ delete?: never;
589
+ options?: never;
590
+ head?: never;
591
+ patch?: never;
592
+ trace?: never;
593
+ };
594
+ "/imports/{importId}/candidates": {
595
+ parameters: {
596
+ query?: never;
597
+ header?: never;
598
+ path?: never;
599
+ cookie?: never;
600
+ };
601
+ /**
602
+ * Variable candidates of a succeeded import
603
+ * @description Candidates found by rules (dates, amounts, identifiers, label/value pairs, table cells), `safe` (confidence ≥ 0.7) or `suspect`, with their box on the source page, the rules that fired and the node of the draft that shows them.
604
+ */
605
+ get: operations["getImportCandidates"];
606
+ put?: never;
607
+ post?: never;
608
+ delete?: never;
609
+ options?: never;
610
+ head?: never;
611
+ patch?: never;
612
+ trace?: never;
613
+ };
614
+ "/engines": {
615
+ parameters: {
616
+ query?: never;
617
+ header?: never;
618
+ path?: never;
619
+ cookie?: never;
620
+ };
621
+ /**
622
+ * Typst versions in service: the default one and the deprecated ones
623
+ * @description Every published version pins the Typst version it is rendered with (`engine.typst`, `meta.engine.version` of the template). A publication keeps the version of the previous one; changing it is an explicit republication (`engine.version` of the publish request), whose visual diff compares the renders of the samples by both versions.
624
+ */
625
+ get: operations["listEngines"];
626
+ put?: never;
627
+ post?: never;
628
+ delete?: never;
629
+ options?: never;
630
+ head?: never;
631
+ patch?: never;
632
+ trace?: never;
633
+ };
531
634
  }
532
635
  export type webhooks = Record<string, never>;
533
636
  export interface components {
534
637
  schemas: {
638
+ /** @enum {string} */
639
+ PlanId: "free" | "pro" | "business" | "enterprise";
640
+ /**
641
+ * @description Currency of the prices and of the billing (C-164): the one chosen in the billing details, else from their country (euros in Europe and by default, US dollars elsewhere)
642
+ * @enum {string}
643
+ */
644
+ Currency: "EUR" | "USD";
535
645
  Organization: {
536
646
  id: string;
537
647
  slug: string;
538
648
  name: string;
539
649
  logo: string | null;
650
+ plan: components["schemas"]["PlanId"];
651
+ currency: components["schemas"]["Currency"];
540
652
  /** Format: date-time */
541
653
  createdAt: string;
542
654
  };
655
+ /**
656
+ * @description Errors carry a stable `code` and `params` (values quoted by the message); interfaces translate them, the English `message` is for logs. Issues carry a JSON `path`, and a `code` with `params` too.
657
+ *
658
+ * **Error responses (`error.code`)**
659
+ *
660
+ * | Code | Status | Params | Description |
661
+ * |---|---|---|---|
662
+ * | `bad_request` | 400 | | Malformed request: body, query or parameters (issues: `request.*`) |
663
+ * | `payload_too_large` | 413 | | Request body larger than 32 MB |
664
+ * | `unauthorized` | 401 | | Authentication required: session cookie or API key |
665
+ * | `forbidden` | 403 | | The role, API key access or folder scope does not allow this action |
666
+ * | `not_found` | 404 | `resource` | Resource not found in this organization (never 403: existence is not disclosed) |
667
+ * | `internal` | 500 | | Unexpected error of the platform |
668
+ * | `unavailable` | 503 | | The database of the platform is saturated or unreachable for a moment: retry after `retryAfter` |
669
+ * | `rate_limited` | 429 | | Rate limit of an API key or of the previews; `retryAfter` gives the wait |
670
+ * | `validation` | 422 | | Semantically invalid request (issues carry JSON paths) |
671
+ * | `organization.required` | 400 | | Several organizations: name one with the `x-sculdoc-organization` header |
672
+ * | `cursor.invalid` | 400 | | Unknown pagination cursor: use the `nextCursor` of a previous page |
673
+ * | `request.data_or_sample` | 400 | | `data` and `sample` are exclusive |
674
+ * | `organization.slug_taken` | 409 | | Another organization uses this slug |
675
+ * | `organization.issuer_missing` | 422 | | The organization has no Factur-X issuer: fill it in the settings of the organization |
676
+ * | `member.exists` | 409 | | This user is already a member |
677
+ * | `api_key.replaced` | 409 | | This API key was already rotated: rotate its replacement |
678
+ * | `api_key.ip_not_allowed` | 403 | `ip` | This API key only accepts requests from its allowed addresses (`allowedIps`); `ip` is the address of the caller as the platform sees it |
679
+ * | `member.last_owner` | 409 | | The last owner of an organization cannot leave or lose the role |
680
+ * | `invitation.email_unverified` | 403 | | The sign-in provider did not verify the e-mail address of this account |
681
+ * | `invitation.exists` | 409 | | A pending invitation already targets this e-mail address |
682
+ * | `invitation.expired` | 409 | | The invitation has expired |
683
+ * | `invitation.limit` | | `max`, `period` | Too many invitations (per day, or pending) |
684
+ * | `invitation.not_pending` | 409 | `status` | The invitation is no longer pending |
685
+ * | `auth.email_unverified` | 403 | | The e-mail address of the account is not verified |
686
+ * | `auth.two_factor_required` | 403 | `organizationId` | This organization requires a second factor of its members: activate it in the account settings (GET /me/two-factor) |
687
+ * | `organization.two_factor_owner_first` | 409 | | Activate a second factor on your own account before requiring it of the members |
688
+ * | `platform.two_factor_absent` | 409 | | This account has no second factor to remove |
689
+ * | `auth.reauthentication_required` | 403 | `maxAgeSeconds` | Sign in again: changing the sign-in methods needs a session opened in the last minutes |
690
+ * | `auth.sso_required` | 403 | `provider` | The domain of this address has the identity provider of an organization: the account signs in through it only |
691
+ * | `terms.required` | 403 | | Accept the terms of use and the privacy policy first (POST /me/terms) |
692
+ * | `terms.version` | 422 | `current` | These are not the terms in force: reload them |
693
+ * | `password.exists` | 409 | | The account has a password already: change it instead |
694
+ * | `password.too_short` | 422 | | The password is too short (12 characters at least) |
695
+ * | `password.too_long` | 422 | | The password is too long (128 characters at most) |
696
+ * | `password.compromised` | 422 | | The password appears in lists of compromised passwords |
697
+ * | `password.personal` | 422 | | The password is made of the e-mail address or the name of the account |
698
+ * | `account.last_method` | 409 | | The account keeps at least one sign-in method |
699
+ * | `organization.limit` | 409 | `max` | The user owns as many organizations as their plans allow |
700
+ * | `organization.members_limit` | 409 | `max`, `plan` | The plan of the organization allows no more members (pending invitations included) |
701
+ * | `organization.legal_hold` | 409 | `documents` | Documents under legal hold forbid the deletion of the organization |
702
+ * | `organization.confirm` | 422 | | Type the name of the organization to confirm its deletion |
703
+ * | `organization.suspended` | 403 | | The organization is suspended by the platform: renders are refused |
704
+ * | `organization.deletion_scheduled` | 403 | | The deletion of the organization is scheduled: renders are refused until it is canceled |
705
+ * | `member.same` | 409 | | This member already owns the organization |
706
+ * | `plan.feature_required` | 403 | `feature`, `plan` | The plan of the organization does not include this feature |
707
+ * | `billing.unavailable` | 503 | | Self-service subscriptions are not open on this platform |
708
+ * | `billing.catalog_missing` | 503 | | The plan is not in the catalog of the payment provider yet |
709
+ * | `billing.plan_not_sold` | 409 | | This plan is sold on contract only: contact the platform |
710
+ * | `billing.contract` | 409 | | The organization is billed under a contract: the platform changes its plan |
711
+ * | `billing.subscribed` | 409 | | The organization already has a subscription with the payment provider |
712
+ * | `billing.plan_granted` | 409 | | The organization has a plan granted by the platform: contact it to change it |
713
+ * | `billing.no_customer` | 409 | | The organization has never subscribed through the payment provider |
714
+ * | `billing.not_subscribed` | 409 | | The organization has no subscription to change |
715
+ * | `billing.past_due` | 409 | | A payment is late: update the payment method in the portal first |
716
+ * | `billing.provider_managed` | 409 | | The plan follows the subscription of the payment provider |
717
+ * | `billing.contract_managed` | 409 | | The plan is set by the contract of the organization |
718
+ * | `billing.signature` | 401 | | The notification is not signed by the payment provider |
719
+ * | `billing.contract_active` | 409 | | The organization already has a contract: end it first |
720
+ * | `billing.contract_pending` | 409 | | A contract of the organization is waiting for its acceptance: withdraw it first |
721
+ * | `billing.contract_not_pending` | 409 | | Only a contract waiting for its acceptance can be accepted |
722
+ * | `billing.contract_rendering` | 409 | | The documents of the contract are being produced: retry later |
723
+ * | `billing.no_contract` | 409 | | Invoices are issued to an organization under contract |
724
+ * | `billing.details_required` | 422 | | A contract needs the company name and the country of the billing details of the organization |
725
+ * | `billing.vat_number_required` | 422 | | A business of the European Union is invoiced with its VAT number (reverse charge) |
726
+ * | `billing.vat_number_invalid` | 422 | | VIES does not find the VAT number valid |
727
+ * | `billing.vies_unavailable` | 503 | `reason` | VIES could not check the number (a member state busy or down: `reason`, its error code): retry later |
728
+ * | `billing.price_required` | 422 | | The plan has no grid price: the contract names its price |
729
+ * | `billing.issuer_unavailable` | 409 | | The organization that issues the invoices does not exist |
730
+ * | `billing.issuer_missing` | 409 | | The organization that issues the invoices has no Factur-X issuer |
731
+ * | `billing.issuer_tax_number` | 409 | | The issuer of the invoices gives its tax number as tax registration (BT-32), without VAT identifier |
732
+ * | `billing.invoice_empty` | 422 | | An invoice has at least one line |
733
+ * | `billing.invoice_amount` | 422 | | An invoice is for a positive amount |
734
+ * | `billing.invoice_rendering` | 409 | | The document of the invoice is being produced: retry later |
735
+ * | `billing.invoice_canceled` | 409 | | The invoice is already canceled by a credit note |
736
+ * | `billing.invoice_paid` | 409 | | The invoice has payments: refund them before crediting it |
737
+ * | `billing.credit_note_of_credit_note` | 409 | | A credit note cannot be credited |
738
+ * | `billing.payment_allocation` | 422 | | The allocations of the payment do not match its amount or the invoices |
739
+ * | `billing.overage_carried` | 409 | | The overage of this month is already carried |
740
+ * | `billing.test_clock` | 403 | | The billing runs as of today on this platform |
741
+ * | `sso.discovery` | 422 | | The issuer does not serve a usable OpenID Connect discovery document |
742
+ * | `sso.domain_invalid` | 422 | | Not a domain name |
743
+ * | `sso.domain_exists` | 409 | | The domain is already listed for this provider |
744
+ * | `sso.domain_claimed` | 409 | `domain` | The domain is verified by another organization |
745
+ * | `sso.domain_unverified` | 422 | `name`, `value`, `found` | The DNS record proving the domain was not found (`name`, `value` expected) |
746
+ * | `sso.not_configured` | 404 | | The organization has no identity provider |
747
+ * | `plan.current` | 409 | | The organization already has this plan |
748
+ * | `plan.requests_discontinued` | 410 | | Plans are no longer requested through the API: contact the platform (`contactEmail` of GET /auth/methods) |
749
+ * | `folder.name_taken` | 409 | | A sibling folder already has this name |
750
+ * | `folder.not_empty` | 409 | | The folder still contains folders or templates |
751
+ * | `folder.cycle` | 422 | | A folder cannot be moved into its own subtree |
752
+ * | `template.slug_taken` | 409 | | Another template of the organization uses this slug |
753
+ * | `template.invalid` | 422 | | Not a valid document of the model (issues: `model.*` and the rules of the model) |
754
+ * | `raw.forbidden` | 422 | | Typst code (`raw` node) is not allowed in this organization (setting `allowRaw`) |
755
+ * | `patch.invalid` | 422 | | A JSON Patch operation failed or produced an invalid document |
756
+ * | `draft.conflict` | 409 | | The draft changed since it was read: `current` holds the current draft |
757
+ * | `draft.precondition_required` | 428 | | `If-Match` is required to patch a draft |
758
+ * | `schema.invalid` | 422 | | The data schema of the author is not a valid JSON Schema |
759
+ * | `version.archived` | 410 | | This version is archived and can no longer be rendered |
760
+ * | `version.draft` | 403 | | API keys cannot render a draft |
761
+ * | `version.immutable` | 409 | | A published version cannot be changed |
762
+ * | `version.not_draft` | 409 | | Only the draft can be changed |
763
+ * | `version.number_taken` | 409 | | This version number is already published |
764
+ * | `version.transition` | 409 | `status`, `action` | This lifecycle change is not allowed |
765
+ * | `version.unpinned` | 422 | | This organization requires API keys to name a version number |
766
+ * | `publish.invalid` | 422 | | The publication is refused: every problem is in `issues` |
767
+ * | `closure.invalid` | 422 | | The dependencies of the version cannot be resolved (includes, assets) |
768
+ * | `include.depth` | 422 | | Includes are nested too deeply (cycle?) |
769
+ * | `include.unavailable` | 422 | `ref`, `template` | An include is not available |
770
+ * | `asset.unresolved` | 422 | `hash` | An asset of the template is not in the asset store |
771
+ * | `sample.duplicate` | 422 | | Two samples have the same name |
772
+ * | `sample.exists` | 409 | `name` | The draft already has a sample of this name |
773
+ * | `sample.limit` | 422 | `max` | Too many samples in one version |
774
+ * | `sample.unknown` | 422 | `name` | This version has no sample of this name |
775
+ * | `asset.bytes` | 422 | `max` | Asset size out of bounds |
776
+ * | `asset.type` | 422 | `declared`, `detected`, `accepted` | Unsupported or mismatching asset type |
777
+ * | `asset.encoding` | 422 | | The content is not standard base64 |
778
+ * | `font.bytes` | 422 | `max` | Font size out of bounds |
779
+ * | `font.encoding` | 422 | | The content is not standard base64 |
780
+ * | `font.format` | 422 | | Not a TrueType/OpenType font file |
781
+ * | `font.parse` | 422 | | The font file cannot be read |
782
+ * | `font.pinned` | 409 | | Published versions are closed over this font (issues: the versions) |
783
+ * | `data.invalid` | 422 | | The data do not match the contract of the version (issues: `data.*`) |
784
+ * | `data.json` | 422 | | The data must be a JSON document |
785
+ * | `data.required` | 422 | | `data` is required |
786
+ * | `profile.unsupported` | 422 | `profile` | The template cannot be rendered in this output profile (issues: `profile.*`) |
787
+ * | `document.expired` | 410 | | The document was deleted by the retention of the organization (its manifest remains) |
788
+ * | `document.intermediate` | 409 | | A part of a sealed merged document: download the output of the batch |
789
+ * | `verify.data_mismatch` | 422 | | These data are not the data of this render |
790
+ * | `verify.data_unavailable` | 422 | | The data of this render are no longer available: send them in `data` |
791
+ * | `verify.draft` | 422 | | A render of a draft cannot be verified |
792
+ * | `verify.no_manifest` | 422 | | A failed render has no manifest to verify |
793
+ * | `render.unavailable` | 503 | | The render worker cannot be reached: retry later |
794
+ * | `render.protocol` | 503 | | Unexpected answer of the render worker |
795
+ * | `batch.items` | 422 | `max`, `count` | Too many items in a batch |
796
+ * | `batch.filename` | 422 | | File names of the items of a batch are invalid or not unique |
797
+ * | `batch.merge_unsupported` | 422 | | These documents cannot be merged (accessible profile, Factur-X, attachments) |
798
+ * | `idempotency.key_length` | 422 | `max` | `Idempotency-Key` is too long |
799
+ * | `idempotency.mismatch` | 409 | | This `Idempotency-Key` was used with a different request |
800
+ * | `idempotency.in_progress` | 409 | | The first request with this `Idempotency-Key` has not completed |
801
+ * | `quota.renders_per_minute` | 429 | `max` | Quota of renders per minute of the organization |
802
+ * | `quota.pages_per_day` | 429 | `used`, `max` | Quota of pages per day of the organization |
803
+ * | `quota.key_renders_per_minute` | 429 | `max` | Limit of renders per minute of the API key |
804
+ * | `quota.key_pages_per_day` | 429 | `used`, `max` | Limit of pages per day of the API key |
805
+ * | `quota.storage` | 429 | `used`, `max` | Storage of the free plan full (documents, kept render data, batch outputs): space is freed by the retention, a paid plan goes beyond |
806
+ * | `import.size` | 422 | `max` | PDF size out of bounds (413 above the limit of the request) |
807
+ * | `import.unavailable` | 503 | | No import worker is configured: retry later |
808
+ * | `import.profile` | 422 | `profile` | The background mode embeds the source PDF page: not in a PDF/A profile |
809
+ * | `import.dispatch` | 503 | | The import could not be queued: retry |
810
+ * | `import.result` | 422 | | Unexpected outcome of the import worker |
811
+ * | `upload.used` | 409 | | This upload was already imported: request a new one |
812
+ * | `upload.unknown` | 422 | | Unknown upload: PUT the PDF to the URL of POST /imports/uploads first |
813
+ * | `pdf.invalid` | 422 | | The file is not a PDF |
814
+ * | `asset.unknown` | 422 | | Unknown asset: deposit it with POST /assets |
815
+ * | `folder.missing` | 422 | | The target folder was deleted during the import |
816
+ * | `quota.documents_per_month` | 429 | `used`, `max` | Documents of the month included in the plan (`free`; a paid plan counts its overage instead) |
817
+ * | `quota.ai_imports_per_month` | 429 | `used`, `max` | AI imports of the month: none left on a plan that sells none (`free`) |
818
+ * | `usage.month` | 422 | | The month of a statement is written YYYY-MM and has started |
819
+ * | `usage.range` | 422 | | The period of a usage series: `from` and `to` written YYYY-MM (months) or YYYY-MM-DD (days), started, `from` not after `to`, 12 months or 366 days at most |
820
+ * | `quota.imports_per_day` | 429 | `max` | Quota of imports per day of the organization |
821
+ * | `quota.uploads_per_day` | 429 | `max` | Quota of uploads per day of the organization (that of the imports) |
822
+ * | `import.batch_size` | 422 | `min`, `max`, `count` | A batch has 2 to 50 exemplars |
823
+ * | `import.archive` | 422 | | The ZIP archive of exemplars cannot be read |
824
+ * | `import.llm_disabled` | 422 | | No longer returned: the LLM pass is included according to the plan, no longer enabled by the organization |
825
+ * | `issuer.lookup_id` | 422 | | Not a SIREN (9 digits) or a SIRET (14 digits) with a valid key |
826
+ * | `issuer.lookup_not_found` | 404 | | No public company with this SIREN or SIRET in the directory of the companies |
827
+ * | `issuer.lookup_unavailable` | 503 | | The directory of the companies does not answer: fill the issuer by hand |
828
+ * | `issuer.lookup_rate` | 429 | | Too many lookups of companies: try again in a moment |
829
+ * | `import.llm_unavailable` | 422 | | The LLM pass is not available on this platform (no Claude credentials) |
830
+ * | `import.pending` | 409 | | The import is not finished: no candidates yet, nor a run again |
831
+ * | `import.source_expired` | 410 | | The PDF of the import is no longer stored (30 days): import it again |
832
+ * | `template.missing` | 422 | | The template of the import was deleted or moved while it ran again |
833
+ * | `library.unavailable` | 409 | | The organization of the public library does not exist |
834
+ * | `library.asset_missing` | 503 | | An asset of the library is missing: retry later |
835
+ * | `library.source_taken` | 409 | `slug` | This template already feeds a library template: publish a new version of it |
836
+ * | `library.slug_taken` | 409 | | A library template already uses this slug |
837
+ * | `library.unchanged` | 409 | `version` | The current public version already holds this content |
838
+ * | `library.concurrent` | 409 | | Another public version was published at the same time: retry |
839
+ * | `library.immutable` | 409 | | A public version cannot be changed |
840
+ * | `library.transition` | 409 | `visibility`, `action` | This change of visibility is not allowed |
841
+ * | `library.retired` | 409 | | This library template is retired: it can no longer be copied |
842
+ * | `webhook.url` | 422 | | This receiver URL is not accepted (https, public address) |
843
+ * | `seal.unavailable` | 503 | | No seal service is configured on this platform |
844
+ * | `seal.certificate_missing` | 422 | | Upload the certificate of the organization first |
845
+ * | `seal.tsa_url` | 422 | | The timestamp authority must be a public https URL |
846
+ * | `seal.appearance_template` | 422 | | The appearance of the seal must be a published template of the organization |
847
+ * | `seal.signer.pkcs12` | 422 | | The PKCS#12 file cannot be opened: wrong passphrase, or no key and certificate |
848
+ * | `seal.signer.key_type` | 422 | | The key must be EC (P-256, P-384) or RSA of 2048 bits at least |
849
+ * | `seal.signer.mismatch` | 422 | | The certificate does not match the key |
850
+ * | `seal.signer.expired` | 422 | | The certificate is not valid at this date |
851
+ * | `seal.signer.key_usage` | 422 | | The certificate does not allow signatures (key usage) |
852
+ * | `seal.signer.kms_key` | 422 | | The Cloud KMS key cannot be used by the seal service |
853
+ * | `seal.signer.kms_owner` | 422 | | The Cloud KMS key must carry the label `sculdoc-organization` with the id of the organization |
854
+ * | `seal.signer.certificate` | 422 | | The certificate file cannot be read (PEM) |
855
+ * | `seal.signer.disabled` | 422 | | Organization certificates are not enabled on this platform |
856
+ * | `seal.kms.unavailable` | 503 | | The KMS cannot be reached: retry later |
857
+ * | `seal.request.invalid` | 400 | | Invalid request to the seal service |
858
+ * | `seal.request.too_large` | 422 | | The certificate file is too large |
859
+ * | `conformance.validators` | 503 | | The conformance validators (veraPDF, Mustang) are not available here |
860
+ * | `conformance.not_applicable` | 422 | | Only documents of the archive or accessible profile can be validated |
861
+ * | `conformance.limit` | 429 | `pending`, `perHour` | Too many validations pending or in the last hour for this organization |
862
+ * | `mapping.platform_admin_removed` | 422 | | A provider no longer grants the administration of the platform: platform administrators are managed at /platform/admins |
863
+ * | `platform.admin_exists` | 409 | | This account is already a platform administrator |
864
+ * | `platform.last_admin` | 409 | | The last platform administrator cannot be removed |
865
+ *
866
+ * **Issues (`issues[].code`)**
867
+ *
868
+ * | Code | Status | Params | Description |
869
+ * |---|---|---|---|
870
+ * | `request.invalid_type` | | `expected` | Wrong type |
871
+ * | `request.too_small` | | `origin`, `minimum`, `inclusive` | Too small, too short or too few |
872
+ * | `request.too_big` | | `origin`, `maximum`, `inclusive` | Too big, too long or too many |
873
+ * | `request.invalid_format` | | `format`, `pattern` | Wrong format |
874
+ * | `request.invalid_value` | | `values` | Not one of the allowed values |
875
+ * | `request.unrecognized_keys` | | `keys` | Unknown properties |
876
+ * | `request.invalid_union` | | | Matches none of the allowed shapes |
877
+ * | `request.not_multiple_of` | | `divisor` | Not a multiple |
878
+ * | `request.invalid_key` | | | Invalid key |
879
+ * | `request.invalid_element` | | | Invalid element |
880
+ * | `request.custom` | | | Rule of the API (see the message) |
881
+ * | `api_key.limit` | | `limit`, `max` | A limit of an API key exceeds the quota of its organization |
882
+ * | `retention.beyond_plan` | | `max`, `plan` | A retention longer than the plan of the organization allows (days) |
883
+ * | `model.invalid_type` | | `expected` | Wrong type |
884
+ * | `model.too_small` | | `origin`, `minimum`, `inclusive` | Too small, too short or too few |
885
+ * | `model.too_big` | | `origin`, `maximum`, `inclusive` | Too big, too long or too many |
886
+ * | `model.invalid_format` | | `format`, `pattern` | Wrong format |
887
+ * | `model.invalid_value` | | `values` | Not one of the allowed values |
888
+ * | `model.unrecognized_keys` | | `keys` | Unknown properties |
889
+ * | `model.invalid_union` | | | Matches none of the allowed shapes |
890
+ * | `model.not_multiple_of` | | `divisor` | Not a multiple |
891
+ * | `model.invalid_key` | | | Invalid key |
892
+ * | `model.invalid_element` | | | Invalid element |
893
+ * | `model.custom` | | | Rule of the model (see the message) |
894
+ * | `model.reserved_name` | | `name` | Reserved name: `page` stands for the page counters (`page.number`, `page.total`…), no alias or include data key may use it |
895
+ * | `data.required` | | `missingProperty` | Required property missing |
896
+ * | `data.type` | | `type` | Wrong type |
897
+ * | `data.enum` | | `allowedValues` | Not one of the allowed values |
898
+ * | `data.const` | | `allowedValue` | Not the expected value |
899
+ * | `data.format` | | `format` | Wrong format |
900
+ * | `data.pattern` | | `pattern` | Does not match the pattern |
901
+ * | `data.minLength` | | `limit` | Too short |
902
+ * | `data.maxLength` | | `limit` | Too long |
903
+ * | `data.minimum` | | `limit`, `comparison` | Too small |
904
+ * | `data.maximum` | | `limit`, `comparison` | Too big |
905
+ * | `data.exclusiveMinimum` | | `limit`, `comparison` | Too small |
906
+ * | `data.exclusiveMaximum` | | `limit`, `comparison` | Too big |
907
+ * | `data.minItems` | | `limit` | Too few items |
908
+ * | `data.maxItems` | | `limit` | Too many items |
909
+ * | `data.uniqueItems` | | `i`, `j` | Duplicate items |
910
+ * | `data.additionalProperties` | | `additionalProperty` | Property not allowed |
911
+ * | `data.anyOf` | | | Matches none of the allowed shapes |
912
+ * | `data.oneOf` | | | Matches none or several of the allowed shapes |
913
+ * | `data.multipleOf` | | `multipleOf` | Not a multiple |
914
+ * | `schema.undeclared` | | | Used by the template but not declared in the schema of the author |
915
+ * | `schema.items_undeclared` | | | Array items used by the template but not declared |
916
+ * | `schema.ref` | | `ref` | The template uses this path as a standard type |
917
+ * | `schema.reserved` | | `name` | The schema of the author declares the reserved root `page` (page counters, computed at render time) |
918
+ * | `publish.samples_missing` | | | At least one sample is required to derive and check the data schema |
919
+ * | `publish.engine` | | `engine`, `available` | This engine version is not available |
920
+ * | `publish.compile` | | `code` | The template does not compile with a sample (see the message) |
921
+ * | `raw.node` | | | Typst code (`raw` node) is not allowed in this organization |
922
+ * | `include.unpinned` | | | An include must pin a published version number and its content hash |
923
+ * | `include.missing` | | `template` | The included template has no such published version |
924
+ * | `asset.missing` | | `hash` | This asset is not in the asset store of the organization |
925
+ * | `batch.filename` | | `item` | Same file name as another item |
926
+ * | `batch.merge` | | `reason` | This template cannot be merged in a batch |
927
+ * | `font.substituted` | | `family`, `substitute` | A font family is in no depot: a platform family replaces it |
928
+ * | `sample.reserved` | | `name` | A sample sends the reserved root key `page`: ignored, the page counters are computed at render time |
929
+ * | `version.latest` | | `resolved` | `latest` was resolved: pin a version number in production |
930
+ * | `engine.deprecated` | | `engine`, `replacement`, `removal` | The Typst version of this version is deprecated: republish with its replacement |
931
+ * | `profile.alt_missing` | | `node` | A text alternative is required in the accessible profile |
932
+ * | `profile.pdf_embed` | | `profile` | A PDF page cannot be embedded in this profile (PDF/A) |
933
+ * | `profile.pdf_background` | | `profile`, `master` | A PDF page background cannot be embedded in this profile (PDF/A) |
934
+ * | `profile.title_missing` | | `profile` | The accessible profile needs a document title |
935
+ * | `plan.feature` | | `feature`, `plan` | The plan of the organization does not include this feature (dry run of a publication) |
936
+ * | `profile.facturx_standard` | | | Factur-X needs the archive or accessible profile (PDF/A-3) |
937
+ * | `profile.attachment_reserved` | | `name` | `factur-x.xml` is reserved for the Factur-X invoice |
938
+ * | `profile.seal_visible` | | | A visible seal is not allowed in the accessible profile (PDF/UA) |
939
+ * | `profile.seal_appearance` | | | The seal appearance must be a declared asset of kind pdf |
940
+ * | `facturx.invoice` | | `level`, `sample` | The invoice of the sample does not satisfy the contract of the level |
941
+ * | `facturx.expression` | | `sample` | The invoice expression cannot be evaluated with the sample |
942
+ * | `facturx.issuer` | | `level` | The issuer of the organization does not satisfy the contract of the level |
943
+ * | `facturx.issuer_missing` | | | The organization has no Factur-X issuer |
944
+ *
945
+ * **Failures of a render (`error.code` of a render, job or item)**
946
+ *
947
+ * | Code | Status | Params | Description |
948
+ * |---|---|---|---|
949
+ * | `job.invalid` | | | Invalid render job |
950
+ * | `job.scope` | | | A resource outside the organization of the job |
951
+ * | `job.linearize` | | | A sealed document is not linearized |
952
+ * | `job.lost` | | | The job or item has no outcome after one hour |
953
+ * | `job.dispatch` | | | The job could not be queued |
954
+ * | `batch.failed` | | | No item of the batch succeeded |
955
+ * | `import.lost` | | | The import has no outcome after one hour |
956
+ * | `import.completion` | | | The template of the import could not be created |
957
+ * | `import.batch_clusters` | | | The files of the batch are exemplars of several models (issues: the model of each file) |
958
+ * | `ocr.failed` | | | Tesseract failed on a scanned page |
959
+ * | `snapshot.invalid` | | | The snapshot of the version is invalid |
960
+ * | `storage.not_found` | | | An asset or a snapshot is missing from the storage |
961
+ * | `data.bytes` | | | The data are too large for this queue |
962
+ * | `asset.hash` | | | The bytes of an asset do not match its hash |
963
+ * | `asset.invalid` | | | An image cannot be read |
964
+ * | `asset.pixels` | | | An image has too many pixels |
965
+ * | `asset.svg` | | | An SVG image holds forbidden content (script, external reference…) |
966
+ * | `asset.path` | | | An asset has no path (development renders) |
967
+ * | `font.missing` | | | A pinned font is in no depot |
968
+ * | `font.hash` | | | The bytes of a font do not match its hash |
969
+ * | `font.scope` | | | A font outside the scope of the job |
970
+ * | `engine.version` | | `engine`, `pinned` | The job names another version of Typst than the one pinned by the template |
971
+ * | `engine.unavailable` | | `engine`, `available` | The render worker does not carry this version of Typst |
972
+ * | `render.timeout` | | | The render exceeded its time limit |
973
+ * | `render.memory` | | | The render exceeded its memory limit |
974
+ * | `render.pages` | | `max`, `actual` | The document exceeds the page limit of its queue |
975
+ * | `render.limits` | | `limit`, `max`, `actual` | The document exceeds a limit of its template (`meta.limits`: maxPages, maxRows or maxImagePixels) |
976
+ * | `render.engine` | | | Typst refused the document (see the message) |
977
+ * | `render.killed` | | | The engine was stopped from outside: retry |
978
+ * | `render.output` | | | The engine produced no document |
979
+ * | `render.package` | | | A Typst package was imported |
980
+ * | `master.missing` | | | A template needs at least one master |
981
+ * | `master.unknown` | | `master` | Unknown master |
982
+ * | `style.unknown` | | `style` | Unknown style |
983
+ * | `style.cycle` | | | Style inheritance too deep (cycle?) |
984
+ * | `image.source` | | | An image needs an asset or an expression |
985
+ * | `datatable.incomplete` | | | A data table needs a spec, or a source, columns and a row template |
986
+ * | `datatable.spec` | | `expr` | The expression of a data table must give a TableSpec |
987
+ * | `limits.maxRows` | | `rows`, `max` | Too many rows for `meta.limits.maxRows` |
988
+ * | `attachment.unsupported` | | | An attachment cannot be resolved |
989
+ * | `include.hash` | | | The content of an include does not match its pinned hash |
990
+ * | `data.file` | | | Data file not found (development renders) |
991
+ * | `measure.failed` | | | The measure of the anchored headers failed |
992
+ * | `boxes.failed` | | | The query of the boxes of the preview failed |
993
+ * | `facturx.issuer` | | | The template declares Factur-X and the organization has no issuer |
994
+ * | `facturx.invalid` | | | The invoice or the issuer does not satisfy the contract of the level (issues: paths) |
995
+ * | `post.unavailable` | | | The post-processing service is not available |
996
+ * | `post.failed` | | | The post-processing failed |
997
+ * | `post.protocol` | | | Unexpected answer of the post-processing service |
998
+ * | `post.attachment.pdfa` | | | Attachments need PDF/A-3 |
999
+ * | `post.facturx.pdfa` | | | Factur-X needs PDF/A-3 |
1000
+ * | `post.pdf.signed` | | | A signed document cannot be post-processed |
1001
+ * | `assemble.bytes` | | | The documents of the batch are too large to assemble |
1002
+ * | `assemble.hash` | | | A document of the batch does not match its hash |
1003
+ * | `assemble.names` | | | Invalid or duplicate file names in the batch |
1004
+ * | `assemble.pages` | | | The merged document exceeds 20,000 pages |
1005
+ * | `assemble.seal_size` | | | The merged document exceeds 64 MB and cannot be sealed |
1006
+ * | `seal.unavailable` | | | No seal service is configured |
1007
+ * | `seal.unreachable` | | | The seal service cannot be reached: retry |
1008
+ * | `seal.protocol` | | | Unexpected answer of the seal service |
1009
+ * | `seal.failed` | | | The seal failed |
1010
+ * | `seal.visible` | | | A visible seal is not allowed in the accessible profile |
1011
+ * | `seal.field` | | | The signature field is already signed |
1012
+ * | `seal.page` | | | The page of the visible seal is outside the document |
1013
+ * | `seal.appearance` | | | The appearance of the visible seal is invalid |
1014
+ * | `seal.tsa.unavailable` | | | The timestamp authority is unavailable: retry |
1015
+ * | `seal.kms.integrity` | | | The KMS answer failed its integrity check: retry |
1016
+ * | `seal.pdf.invalid` | | | The document cannot be read by the seal service |
1017
+ * | `seal.pdf.encrypted` | | | An encrypted document cannot be sealed |
1018
+ * | `seal.signer.invalid` | | | The certificate of the organization cannot be used: upload it again |
1019
+ * | `seal.signer.expired` | | | The certificate of the organization has expired |
1020
+ * | `seal.tsa.address` | | | The timestamp authority of the organization resolves to a private address |
1021
+ * | `seal.request.too_large` | | | The document is too large to be sealed |
1022
+ * | `conformance.failed` | | | The document does not conform to its profile (veraPDF, Mustang) |
1023
+ * | `conformance.error` | | | The validators could not check the document |
1024
+ * | `expr.syntax.too_long` | | `max`, `pos`, `src` | Expression too long |
1025
+ * | `expr.syntax.number` | | `pos`, `src` | Malformed number |
1026
+ * | `expr.syntax.unterminated_string` | | `pos`, `src` | Unterminated string |
1027
+ * | `expr.syntax.identifier` | | `pos`, `src` | Malformed identifier |
1028
+ * | `expr.syntax.character` | | `char`, `pos`, `src` | Unexpected character |
1029
+ * | `expr.syntax.expected` | | `expected`, `pos`, `src` | Missing character |
1030
+ * | `expr.syntax.too_deep` | | `pos`, `src` | Expression nested too deeply |
1031
+ * | `expr.syntax.filter_name` | | `pos`, `src` | Expected a filter name after `|` |
1032
+ * | `expr.syntax.property_name` | | `pos`, `src` | Expected a property name after `.` |
1033
+ * | `expr.syntax.token` | | `pos`, `src` | Unexpected token |
1034
+ * | `expr.syntax.trailing` | | `pos`, `src` | Unexpected trailing input |
1035
+ * | `expr.eval.forbidden_property` | | `property`, `src` | Forbidden property |
1036
+ * | `expr.eval.unary_minus` | | `src` | Unary minus on a value that is not a number |
1037
+ * | `expr.eval.unknown_filter` | | `name`, `src` | Unknown filter |
1038
+ * | `expr.eval.unknown_function` | | `name`, `src` | Unknown function |
1039
+ * | `expr.eval.index_type` | | `value`, `src` | An index must be a number or a string |
1040
+ * | `expr.eval.division_by_zero` | | `src` | Division by zero |
1041
+ * | `expr.eval.unknown_operator` | | `op`, `src` | Unknown operator |
1042
+ * | `expr.eval.not_a_number` | | `value`, `src` | Not a number |
1043
+ * | `expr.eval.reserved_variable` | | `name`, `src` | Reserved variable: `page.*` other than the page counters (`page.number`, `page.total`, `page.sectionNumber`, `page.sectionTotal`) is not a data variable |
1044
+ */
543
1045
  Error: {
544
1046
  error: {
545
- /** @example validation */
1047
+ /**
1048
+ * @description Stable code (catalogue below)
1049
+ * @example validation
1050
+ */
546
1051
  code: string;
1052
+ /** @description English message, for logs; interfaces translate `code` */
547
1053
  message: string;
548
1054
  path?: string;
549
- issues: {
550
- /** @example $.items[2].total */
551
- path: string;
552
- message: string;
553
- }[];
1055
+ /** @description Values quoted by the message, for a translated message (see the catalogue of codes) */
1056
+ params?: {
1057
+ [key: string]: string | number | boolean;
1058
+ };
1059
+ issues: components["schemas"]["Issue"][];
554
1060
  /** @description 429: seconds before the same request may succeed (also in the `Retry-After` header) */
555
1061
  retryAfter?: number;
556
1062
  };
557
1063
  requestId: string;
558
1064
  };
1065
+ Issue: {
1066
+ /** @example $.items[2].total */
1067
+ path: string;
1068
+ message: string;
1069
+ /** @example data.type */
1070
+ code?: string;
1071
+ /** @description Values quoted by the message, for a translated message (see the catalogue of codes) */
1072
+ params?: {
1073
+ [key: string]: string | number | boolean;
1074
+ };
1075
+ };
559
1076
  Folder: {
560
1077
  id: string;
561
1078
  parentId: string | null;
@@ -575,6 +1092,13 @@ export interface components {
575
1092
  createdAt: string;
576
1093
  /** Format: date-time */
577
1094
  updatedAt: string;
1095
+ /** @description Library template this template was copied from (GET /library/{librarySlug}); never updated by the platform */
1096
+ origin: {
1097
+ libraryId: string;
1098
+ librarySlug: string;
1099
+ /** @description Public version copied */
1100
+ version: number;
1101
+ } | null;
578
1102
  };
579
1103
  VersionSummary: {
580
1104
  id: string;
@@ -596,6 +1120,10 @@ export interface components {
596
1120
  createdAt: string;
597
1121
  /** Format: date-time */
598
1122
  updatedAt: string;
1123
+ /** @description Draft: incremented by every save (see `ETag`) */
1124
+ revision: number;
1125
+ /** @description Last author of the draft (user id) */
1126
+ updatedBy: string | null;
599
1127
  };
600
1128
  Version: {
601
1129
  id: string;
@@ -617,6 +1145,10 @@ export interface components {
617
1145
  createdAt: string;
618
1146
  /** Format: date-time */
619
1147
  updatedAt: string;
1148
+ /** @description Draft: incremented by every save (see `ETag`) */
1149
+ revision: number;
1150
+ /** @description Last author of the draft (user id) */
1151
+ updatedBy: string | null;
620
1152
  /** @description SDM document (packages/model) */
621
1153
  ir: {
622
1154
  [key: string]: unknown;
@@ -634,12 +1166,433 @@ export interface components {
634
1166
  codegen: string;
635
1167
  sdm: string;
636
1168
  } | null;
1169
+ /** @description Draft only: who is editing it (soft lock, information only) */
1170
+ lock?: components["schemas"]["DraftLock"] | null;
637
1171
  };
638
1172
  Sample: {
639
1173
  /** @example facture-standard */
640
1174
  name: string;
641
1175
  data?: unknown;
642
1176
  };
1177
+ DraftLock: {
1178
+ userId: string;
1179
+ name: string;
1180
+ email: string;
1181
+ /** Format: date-time */
1182
+ expiresAt: string;
1183
+ };
1184
+ /**
1185
+ * @description Errors carry a stable `code` and `params` (values quoted by the message); interfaces translate them, the English `message` is for logs. Issues carry a JSON `path`, and a `code` with `params` too.
1186
+ *
1187
+ * **Error responses (`error.code`)**
1188
+ *
1189
+ * | Code | Status | Params | Description |
1190
+ * |---|---|---|---|
1191
+ * | `bad_request` | 400 | | Malformed request: body, query or parameters (issues: `request.*`) |
1192
+ * | `payload_too_large` | 413 | | Request body larger than 32 MB |
1193
+ * | `unauthorized` | 401 | | Authentication required: session cookie or API key |
1194
+ * | `forbidden` | 403 | | The role, API key access or folder scope does not allow this action |
1195
+ * | `not_found` | 404 | `resource` | Resource not found in this organization (never 403: existence is not disclosed) |
1196
+ * | `internal` | 500 | | Unexpected error of the platform |
1197
+ * | `unavailable` | 503 | | The database of the platform is saturated or unreachable for a moment: retry after `retryAfter` |
1198
+ * | `rate_limited` | 429 | | Rate limit of an API key or of the previews; `retryAfter` gives the wait |
1199
+ * | `validation` | 422 | | Semantically invalid request (issues carry JSON paths) |
1200
+ * | `organization.required` | 400 | | Several organizations: name one with the `x-sculdoc-organization` header |
1201
+ * | `cursor.invalid` | 400 | | Unknown pagination cursor: use the `nextCursor` of a previous page |
1202
+ * | `request.data_or_sample` | 400 | | `data` and `sample` are exclusive |
1203
+ * | `organization.slug_taken` | 409 | | Another organization uses this slug |
1204
+ * | `organization.issuer_missing` | 422 | | The organization has no Factur-X issuer: fill it in the settings of the organization |
1205
+ * | `member.exists` | 409 | | This user is already a member |
1206
+ * | `api_key.replaced` | 409 | | This API key was already rotated: rotate its replacement |
1207
+ * | `api_key.ip_not_allowed` | 403 | `ip` | This API key only accepts requests from its allowed addresses (`allowedIps`); `ip` is the address of the caller as the platform sees it |
1208
+ * | `member.last_owner` | 409 | | The last owner of an organization cannot leave or lose the role |
1209
+ * | `invitation.email_unverified` | 403 | | The sign-in provider did not verify the e-mail address of this account |
1210
+ * | `invitation.exists` | 409 | | A pending invitation already targets this e-mail address |
1211
+ * | `invitation.expired` | 409 | | The invitation has expired |
1212
+ * | `invitation.limit` | | `max`, `period` | Too many invitations (per day, or pending) |
1213
+ * | `invitation.not_pending` | 409 | `status` | The invitation is no longer pending |
1214
+ * | `auth.email_unverified` | 403 | | The e-mail address of the account is not verified |
1215
+ * | `auth.two_factor_required` | 403 | `organizationId` | This organization requires a second factor of its members: activate it in the account settings (GET /me/two-factor) |
1216
+ * | `organization.two_factor_owner_first` | 409 | | Activate a second factor on your own account before requiring it of the members |
1217
+ * | `platform.two_factor_absent` | 409 | | This account has no second factor to remove |
1218
+ * | `auth.reauthentication_required` | 403 | `maxAgeSeconds` | Sign in again: changing the sign-in methods needs a session opened in the last minutes |
1219
+ * | `auth.sso_required` | 403 | `provider` | The domain of this address has the identity provider of an organization: the account signs in through it only |
1220
+ * | `terms.required` | 403 | | Accept the terms of use and the privacy policy first (POST /me/terms) |
1221
+ * | `terms.version` | 422 | `current` | These are not the terms in force: reload them |
1222
+ * | `password.exists` | 409 | | The account has a password already: change it instead |
1223
+ * | `password.too_short` | 422 | | The password is too short (12 characters at least) |
1224
+ * | `password.too_long` | 422 | | The password is too long (128 characters at most) |
1225
+ * | `password.compromised` | 422 | | The password appears in lists of compromised passwords |
1226
+ * | `password.personal` | 422 | | The password is made of the e-mail address or the name of the account |
1227
+ * | `account.last_method` | 409 | | The account keeps at least one sign-in method |
1228
+ * | `organization.limit` | 409 | `max` | The user owns as many organizations as their plans allow |
1229
+ * | `organization.members_limit` | 409 | `max`, `plan` | The plan of the organization allows no more members (pending invitations included) |
1230
+ * | `organization.legal_hold` | 409 | `documents` | Documents under legal hold forbid the deletion of the organization |
1231
+ * | `organization.confirm` | 422 | | Type the name of the organization to confirm its deletion |
1232
+ * | `organization.suspended` | 403 | | The organization is suspended by the platform: renders are refused |
1233
+ * | `organization.deletion_scheduled` | 403 | | The deletion of the organization is scheduled: renders are refused until it is canceled |
1234
+ * | `member.same` | 409 | | This member already owns the organization |
1235
+ * | `plan.feature_required` | 403 | `feature`, `plan` | The plan of the organization does not include this feature |
1236
+ * | `billing.unavailable` | 503 | | Self-service subscriptions are not open on this platform |
1237
+ * | `billing.catalog_missing` | 503 | | The plan is not in the catalog of the payment provider yet |
1238
+ * | `billing.plan_not_sold` | 409 | | This plan is sold on contract only: contact the platform |
1239
+ * | `billing.contract` | 409 | | The organization is billed under a contract: the platform changes its plan |
1240
+ * | `billing.subscribed` | 409 | | The organization already has a subscription with the payment provider |
1241
+ * | `billing.plan_granted` | 409 | | The organization has a plan granted by the platform: contact it to change it |
1242
+ * | `billing.no_customer` | 409 | | The organization has never subscribed through the payment provider |
1243
+ * | `billing.not_subscribed` | 409 | | The organization has no subscription to change |
1244
+ * | `billing.past_due` | 409 | | A payment is late: update the payment method in the portal first |
1245
+ * | `billing.provider_managed` | 409 | | The plan follows the subscription of the payment provider |
1246
+ * | `billing.contract_managed` | 409 | | The plan is set by the contract of the organization |
1247
+ * | `billing.signature` | 401 | | The notification is not signed by the payment provider |
1248
+ * | `billing.contract_active` | 409 | | The organization already has a contract: end it first |
1249
+ * | `billing.contract_pending` | 409 | | A contract of the organization is waiting for its acceptance: withdraw it first |
1250
+ * | `billing.contract_not_pending` | 409 | | Only a contract waiting for its acceptance can be accepted |
1251
+ * | `billing.contract_rendering` | 409 | | The documents of the contract are being produced: retry later |
1252
+ * | `billing.no_contract` | 409 | | Invoices are issued to an organization under contract |
1253
+ * | `billing.details_required` | 422 | | A contract needs the company name and the country of the billing details of the organization |
1254
+ * | `billing.vat_number_required` | 422 | | A business of the European Union is invoiced with its VAT number (reverse charge) |
1255
+ * | `billing.vat_number_invalid` | 422 | | VIES does not find the VAT number valid |
1256
+ * | `billing.vies_unavailable` | 503 | `reason` | VIES could not check the number (a member state busy or down: `reason`, its error code): retry later |
1257
+ * | `billing.price_required` | 422 | | The plan has no grid price: the contract names its price |
1258
+ * | `billing.issuer_unavailable` | 409 | | The organization that issues the invoices does not exist |
1259
+ * | `billing.issuer_missing` | 409 | | The organization that issues the invoices has no Factur-X issuer |
1260
+ * | `billing.issuer_tax_number` | 409 | | The issuer of the invoices gives its tax number as tax registration (BT-32), without VAT identifier |
1261
+ * | `billing.invoice_empty` | 422 | | An invoice has at least one line |
1262
+ * | `billing.invoice_amount` | 422 | | An invoice is for a positive amount |
1263
+ * | `billing.invoice_rendering` | 409 | | The document of the invoice is being produced: retry later |
1264
+ * | `billing.invoice_canceled` | 409 | | The invoice is already canceled by a credit note |
1265
+ * | `billing.invoice_paid` | 409 | | The invoice has payments: refund them before crediting it |
1266
+ * | `billing.credit_note_of_credit_note` | 409 | | A credit note cannot be credited |
1267
+ * | `billing.payment_allocation` | 422 | | The allocations of the payment do not match its amount or the invoices |
1268
+ * | `billing.overage_carried` | 409 | | The overage of this month is already carried |
1269
+ * | `billing.test_clock` | 403 | | The billing runs as of today on this platform |
1270
+ * | `sso.discovery` | 422 | | The issuer does not serve a usable OpenID Connect discovery document |
1271
+ * | `sso.domain_invalid` | 422 | | Not a domain name |
1272
+ * | `sso.domain_exists` | 409 | | The domain is already listed for this provider |
1273
+ * | `sso.domain_claimed` | 409 | `domain` | The domain is verified by another organization |
1274
+ * | `sso.domain_unverified` | 422 | `name`, `value`, `found` | The DNS record proving the domain was not found (`name`, `value` expected) |
1275
+ * | `sso.not_configured` | 404 | | The organization has no identity provider |
1276
+ * | `plan.current` | 409 | | The organization already has this plan |
1277
+ * | `plan.requests_discontinued` | 410 | | Plans are no longer requested through the API: contact the platform (`contactEmail` of GET /auth/methods) |
1278
+ * | `folder.name_taken` | 409 | | A sibling folder already has this name |
1279
+ * | `folder.not_empty` | 409 | | The folder still contains folders or templates |
1280
+ * | `folder.cycle` | 422 | | A folder cannot be moved into its own subtree |
1281
+ * | `template.slug_taken` | 409 | | Another template of the organization uses this slug |
1282
+ * | `template.invalid` | 422 | | Not a valid document of the model (issues: `model.*` and the rules of the model) |
1283
+ * | `raw.forbidden` | 422 | | Typst code (`raw` node) is not allowed in this organization (setting `allowRaw`) |
1284
+ * | `patch.invalid` | 422 | | A JSON Patch operation failed or produced an invalid document |
1285
+ * | `draft.conflict` | 409 | | The draft changed since it was read: `current` holds the current draft |
1286
+ * | `draft.precondition_required` | 428 | | `If-Match` is required to patch a draft |
1287
+ * | `schema.invalid` | 422 | | The data schema of the author is not a valid JSON Schema |
1288
+ * | `version.archived` | 410 | | This version is archived and can no longer be rendered |
1289
+ * | `version.draft` | 403 | | API keys cannot render a draft |
1290
+ * | `version.immutable` | 409 | | A published version cannot be changed |
1291
+ * | `version.not_draft` | 409 | | Only the draft can be changed |
1292
+ * | `version.number_taken` | 409 | | This version number is already published |
1293
+ * | `version.transition` | 409 | `status`, `action` | This lifecycle change is not allowed |
1294
+ * | `version.unpinned` | 422 | | This organization requires API keys to name a version number |
1295
+ * | `publish.invalid` | 422 | | The publication is refused: every problem is in `issues` |
1296
+ * | `closure.invalid` | 422 | | The dependencies of the version cannot be resolved (includes, assets) |
1297
+ * | `include.depth` | 422 | | Includes are nested too deeply (cycle?) |
1298
+ * | `include.unavailable` | 422 | `ref`, `template` | An include is not available |
1299
+ * | `asset.unresolved` | 422 | `hash` | An asset of the template is not in the asset store |
1300
+ * | `sample.duplicate` | 422 | | Two samples have the same name |
1301
+ * | `sample.exists` | 409 | `name` | The draft already has a sample of this name |
1302
+ * | `sample.limit` | 422 | `max` | Too many samples in one version |
1303
+ * | `sample.unknown` | 422 | `name` | This version has no sample of this name |
1304
+ * | `asset.bytes` | 422 | `max` | Asset size out of bounds |
1305
+ * | `asset.type` | 422 | `declared`, `detected`, `accepted` | Unsupported or mismatching asset type |
1306
+ * | `asset.encoding` | 422 | | The content is not standard base64 |
1307
+ * | `font.bytes` | 422 | `max` | Font size out of bounds |
1308
+ * | `font.encoding` | 422 | | The content is not standard base64 |
1309
+ * | `font.format` | 422 | | Not a TrueType/OpenType font file |
1310
+ * | `font.parse` | 422 | | The font file cannot be read |
1311
+ * | `font.pinned` | 409 | | Published versions are closed over this font (issues: the versions) |
1312
+ * | `data.invalid` | 422 | | The data do not match the contract of the version (issues: `data.*`) |
1313
+ * | `data.json` | 422 | | The data must be a JSON document |
1314
+ * | `data.required` | 422 | | `data` is required |
1315
+ * | `profile.unsupported` | 422 | `profile` | The template cannot be rendered in this output profile (issues: `profile.*`) |
1316
+ * | `document.expired` | 410 | | The document was deleted by the retention of the organization (its manifest remains) |
1317
+ * | `document.intermediate` | 409 | | A part of a sealed merged document: download the output of the batch |
1318
+ * | `verify.data_mismatch` | 422 | | These data are not the data of this render |
1319
+ * | `verify.data_unavailable` | 422 | | The data of this render are no longer available: send them in `data` |
1320
+ * | `verify.draft` | 422 | | A render of a draft cannot be verified |
1321
+ * | `verify.no_manifest` | 422 | | A failed render has no manifest to verify |
1322
+ * | `render.unavailable` | 503 | | The render worker cannot be reached: retry later |
1323
+ * | `render.protocol` | 503 | | Unexpected answer of the render worker |
1324
+ * | `batch.items` | 422 | `max`, `count` | Too many items in a batch |
1325
+ * | `batch.filename` | 422 | | File names of the items of a batch are invalid or not unique |
1326
+ * | `batch.merge_unsupported` | 422 | | These documents cannot be merged (accessible profile, Factur-X, attachments) |
1327
+ * | `idempotency.key_length` | 422 | `max` | `Idempotency-Key` is too long |
1328
+ * | `idempotency.mismatch` | 409 | | This `Idempotency-Key` was used with a different request |
1329
+ * | `idempotency.in_progress` | 409 | | The first request with this `Idempotency-Key` has not completed |
1330
+ * | `quota.renders_per_minute` | 429 | `max` | Quota of renders per minute of the organization |
1331
+ * | `quota.pages_per_day` | 429 | `used`, `max` | Quota of pages per day of the organization |
1332
+ * | `quota.key_renders_per_minute` | 429 | `max` | Limit of renders per minute of the API key |
1333
+ * | `quota.key_pages_per_day` | 429 | `used`, `max` | Limit of pages per day of the API key |
1334
+ * | `quota.storage` | 429 | `used`, `max` | Storage of the free plan full (documents, kept render data, batch outputs): space is freed by the retention, a paid plan goes beyond |
1335
+ * | `import.size` | 422 | `max` | PDF size out of bounds (413 above the limit of the request) |
1336
+ * | `import.unavailable` | 503 | | No import worker is configured: retry later |
1337
+ * | `import.profile` | 422 | `profile` | The background mode embeds the source PDF page: not in a PDF/A profile |
1338
+ * | `import.dispatch` | 503 | | The import could not be queued: retry |
1339
+ * | `import.result` | 422 | | Unexpected outcome of the import worker |
1340
+ * | `upload.used` | 409 | | This upload was already imported: request a new one |
1341
+ * | `upload.unknown` | 422 | | Unknown upload: PUT the PDF to the URL of POST /imports/uploads first |
1342
+ * | `pdf.invalid` | 422 | | The file is not a PDF |
1343
+ * | `asset.unknown` | 422 | | Unknown asset: deposit it with POST /assets |
1344
+ * | `folder.missing` | 422 | | The target folder was deleted during the import |
1345
+ * | `quota.documents_per_month` | 429 | `used`, `max` | Documents of the month included in the plan (`free`; a paid plan counts its overage instead) |
1346
+ * | `quota.ai_imports_per_month` | 429 | `used`, `max` | AI imports of the month: none left on a plan that sells none (`free`) |
1347
+ * | `usage.month` | 422 | | The month of a statement is written YYYY-MM and has started |
1348
+ * | `usage.range` | 422 | | The period of a usage series: `from` and `to` written YYYY-MM (months) or YYYY-MM-DD (days), started, `from` not after `to`, 12 months or 366 days at most |
1349
+ * | `quota.imports_per_day` | 429 | `max` | Quota of imports per day of the organization |
1350
+ * | `quota.uploads_per_day` | 429 | `max` | Quota of uploads per day of the organization (that of the imports) |
1351
+ * | `import.batch_size` | 422 | `min`, `max`, `count` | A batch has 2 to 50 exemplars |
1352
+ * | `import.archive` | 422 | | The ZIP archive of exemplars cannot be read |
1353
+ * | `import.llm_disabled` | 422 | | No longer returned: the LLM pass is included according to the plan, no longer enabled by the organization |
1354
+ * | `issuer.lookup_id` | 422 | | Not a SIREN (9 digits) or a SIRET (14 digits) with a valid key |
1355
+ * | `issuer.lookup_not_found` | 404 | | No public company with this SIREN or SIRET in the directory of the companies |
1356
+ * | `issuer.lookup_unavailable` | 503 | | The directory of the companies does not answer: fill the issuer by hand |
1357
+ * | `issuer.lookup_rate` | 429 | | Too many lookups of companies: try again in a moment |
1358
+ * | `import.llm_unavailable` | 422 | | The LLM pass is not available on this platform (no Claude credentials) |
1359
+ * | `import.pending` | 409 | | The import is not finished: no candidates yet, nor a run again |
1360
+ * | `import.source_expired` | 410 | | The PDF of the import is no longer stored (30 days): import it again |
1361
+ * | `template.missing` | 422 | | The template of the import was deleted or moved while it ran again |
1362
+ * | `library.unavailable` | 409 | | The organization of the public library does not exist |
1363
+ * | `library.asset_missing` | 503 | | An asset of the library is missing: retry later |
1364
+ * | `library.source_taken` | 409 | `slug` | This template already feeds a library template: publish a new version of it |
1365
+ * | `library.slug_taken` | 409 | | A library template already uses this slug |
1366
+ * | `library.unchanged` | 409 | `version` | The current public version already holds this content |
1367
+ * | `library.concurrent` | 409 | | Another public version was published at the same time: retry |
1368
+ * | `library.immutable` | 409 | | A public version cannot be changed |
1369
+ * | `library.transition` | 409 | `visibility`, `action` | This change of visibility is not allowed |
1370
+ * | `library.retired` | 409 | | This library template is retired: it can no longer be copied |
1371
+ * | `webhook.url` | 422 | | This receiver URL is not accepted (https, public address) |
1372
+ * | `seal.unavailable` | 503 | | No seal service is configured on this platform |
1373
+ * | `seal.certificate_missing` | 422 | | Upload the certificate of the organization first |
1374
+ * | `seal.tsa_url` | 422 | | The timestamp authority must be a public https URL |
1375
+ * | `seal.appearance_template` | 422 | | The appearance of the seal must be a published template of the organization |
1376
+ * | `seal.signer.pkcs12` | 422 | | The PKCS#12 file cannot be opened: wrong passphrase, or no key and certificate |
1377
+ * | `seal.signer.key_type` | 422 | | The key must be EC (P-256, P-384) or RSA of 2048 bits at least |
1378
+ * | `seal.signer.mismatch` | 422 | | The certificate does not match the key |
1379
+ * | `seal.signer.expired` | 422 | | The certificate is not valid at this date |
1380
+ * | `seal.signer.key_usage` | 422 | | The certificate does not allow signatures (key usage) |
1381
+ * | `seal.signer.kms_key` | 422 | | The Cloud KMS key cannot be used by the seal service |
1382
+ * | `seal.signer.kms_owner` | 422 | | The Cloud KMS key must carry the label `sculdoc-organization` with the id of the organization |
1383
+ * | `seal.signer.certificate` | 422 | | The certificate file cannot be read (PEM) |
1384
+ * | `seal.signer.disabled` | 422 | | Organization certificates are not enabled on this platform |
1385
+ * | `seal.kms.unavailable` | 503 | | The KMS cannot be reached: retry later |
1386
+ * | `seal.request.invalid` | 400 | | Invalid request to the seal service |
1387
+ * | `seal.request.too_large` | 422 | | The certificate file is too large |
1388
+ * | `conformance.validators` | 503 | | The conformance validators (veraPDF, Mustang) are not available here |
1389
+ * | `conformance.not_applicable` | 422 | | Only documents of the archive or accessible profile can be validated |
1390
+ * | `conformance.limit` | 429 | `pending`, `perHour` | Too many validations pending or in the last hour for this organization |
1391
+ * | `mapping.platform_admin_removed` | 422 | | A provider no longer grants the administration of the platform: platform administrators are managed at /platform/admins |
1392
+ * | `platform.admin_exists` | 409 | | This account is already a platform administrator |
1393
+ * | `platform.last_admin` | 409 | | The last platform administrator cannot be removed |
1394
+ *
1395
+ * **Issues (`issues[].code`)**
1396
+ *
1397
+ * | Code | Status | Params | Description |
1398
+ * |---|---|---|---|
1399
+ * | `request.invalid_type` | | `expected` | Wrong type |
1400
+ * | `request.too_small` | | `origin`, `minimum`, `inclusive` | Too small, too short or too few |
1401
+ * | `request.too_big` | | `origin`, `maximum`, `inclusive` | Too big, too long or too many |
1402
+ * | `request.invalid_format` | | `format`, `pattern` | Wrong format |
1403
+ * | `request.invalid_value` | | `values` | Not one of the allowed values |
1404
+ * | `request.unrecognized_keys` | | `keys` | Unknown properties |
1405
+ * | `request.invalid_union` | | | Matches none of the allowed shapes |
1406
+ * | `request.not_multiple_of` | | `divisor` | Not a multiple |
1407
+ * | `request.invalid_key` | | | Invalid key |
1408
+ * | `request.invalid_element` | | | Invalid element |
1409
+ * | `request.custom` | | | Rule of the API (see the message) |
1410
+ * | `api_key.limit` | | `limit`, `max` | A limit of an API key exceeds the quota of its organization |
1411
+ * | `retention.beyond_plan` | | `max`, `plan` | A retention longer than the plan of the organization allows (days) |
1412
+ * | `model.invalid_type` | | `expected` | Wrong type |
1413
+ * | `model.too_small` | | `origin`, `minimum`, `inclusive` | Too small, too short or too few |
1414
+ * | `model.too_big` | | `origin`, `maximum`, `inclusive` | Too big, too long or too many |
1415
+ * | `model.invalid_format` | | `format`, `pattern` | Wrong format |
1416
+ * | `model.invalid_value` | | `values` | Not one of the allowed values |
1417
+ * | `model.unrecognized_keys` | | `keys` | Unknown properties |
1418
+ * | `model.invalid_union` | | | Matches none of the allowed shapes |
1419
+ * | `model.not_multiple_of` | | `divisor` | Not a multiple |
1420
+ * | `model.invalid_key` | | | Invalid key |
1421
+ * | `model.invalid_element` | | | Invalid element |
1422
+ * | `model.custom` | | | Rule of the model (see the message) |
1423
+ * | `model.reserved_name` | | `name` | Reserved name: `page` stands for the page counters (`page.number`, `page.total`…), no alias or include data key may use it |
1424
+ * | `data.required` | | `missingProperty` | Required property missing |
1425
+ * | `data.type` | | `type` | Wrong type |
1426
+ * | `data.enum` | | `allowedValues` | Not one of the allowed values |
1427
+ * | `data.const` | | `allowedValue` | Not the expected value |
1428
+ * | `data.format` | | `format` | Wrong format |
1429
+ * | `data.pattern` | | `pattern` | Does not match the pattern |
1430
+ * | `data.minLength` | | `limit` | Too short |
1431
+ * | `data.maxLength` | | `limit` | Too long |
1432
+ * | `data.minimum` | | `limit`, `comparison` | Too small |
1433
+ * | `data.maximum` | | `limit`, `comparison` | Too big |
1434
+ * | `data.exclusiveMinimum` | | `limit`, `comparison` | Too small |
1435
+ * | `data.exclusiveMaximum` | | `limit`, `comparison` | Too big |
1436
+ * | `data.minItems` | | `limit` | Too few items |
1437
+ * | `data.maxItems` | | `limit` | Too many items |
1438
+ * | `data.uniqueItems` | | `i`, `j` | Duplicate items |
1439
+ * | `data.additionalProperties` | | `additionalProperty` | Property not allowed |
1440
+ * | `data.anyOf` | | | Matches none of the allowed shapes |
1441
+ * | `data.oneOf` | | | Matches none or several of the allowed shapes |
1442
+ * | `data.multipleOf` | | `multipleOf` | Not a multiple |
1443
+ * | `schema.undeclared` | | | Used by the template but not declared in the schema of the author |
1444
+ * | `schema.items_undeclared` | | | Array items used by the template but not declared |
1445
+ * | `schema.ref` | | `ref` | The template uses this path as a standard type |
1446
+ * | `schema.reserved` | | `name` | The schema of the author declares the reserved root `page` (page counters, computed at render time) |
1447
+ * | `publish.samples_missing` | | | At least one sample is required to derive and check the data schema |
1448
+ * | `publish.engine` | | `engine`, `available` | This engine version is not available |
1449
+ * | `publish.compile` | | `code` | The template does not compile with a sample (see the message) |
1450
+ * | `raw.node` | | | Typst code (`raw` node) is not allowed in this organization |
1451
+ * | `include.unpinned` | | | An include must pin a published version number and its content hash |
1452
+ * | `include.missing` | | `template` | The included template has no such published version |
1453
+ * | `asset.missing` | | `hash` | This asset is not in the asset store of the organization |
1454
+ * | `batch.filename` | | `item` | Same file name as another item |
1455
+ * | `batch.merge` | | `reason` | This template cannot be merged in a batch |
1456
+ * | `font.substituted` | | `family`, `substitute` | A font family is in no depot: a platform family replaces it |
1457
+ * | `sample.reserved` | | `name` | A sample sends the reserved root key `page`: ignored, the page counters are computed at render time |
1458
+ * | `version.latest` | | `resolved` | `latest` was resolved: pin a version number in production |
1459
+ * | `engine.deprecated` | | `engine`, `replacement`, `removal` | The Typst version of this version is deprecated: republish with its replacement |
1460
+ * | `profile.alt_missing` | | `node` | A text alternative is required in the accessible profile |
1461
+ * | `profile.pdf_embed` | | `profile` | A PDF page cannot be embedded in this profile (PDF/A) |
1462
+ * | `profile.pdf_background` | | `profile`, `master` | A PDF page background cannot be embedded in this profile (PDF/A) |
1463
+ * | `profile.title_missing` | | `profile` | The accessible profile needs a document title |
1464
+ * | `plan.feature` | | `feature`, `plan` | The plan of the organization does not include this feature (dry run of a publication) |
1465
+ * | `profile.facturx_standard` | | | Factur-X needs the archive or accessible profile (PDF/A-3) |
1466
+ * | `profile.attachment_reserved` | | `name` | `factur-x.xml` is reserved for the Factur-X invoice |
1467
+ * | `profile.seal_visible` | | | A visible seal is not allowed in the accessible profile (PDF/UA) |
1468
+ * | `profile.seal_appearance` | | | The seal appearance must be a declared asset of kind pdf |
1469
+ * | `facturx.invoice` | | `level`, `sample` | The invoice of the sample does not satisfy the contract of the level |
1470
+ * | `facturx.expression` | | `sample` | The invoice expression cannot be evaluated with the sample |
1471
+ * | `facturx.issuer` | | `level` | The issuer of the organization does not satisfy the contract of the level |
1472
+ * | `facturx.issuer_missing` | | | The organization has no Factur-X issuer |
1473
+ *
1474
+ * **Failures of a render (`error.code` of a render, job or item)**
1475
+ *
1476
+ * | Code | Status | Params | Description |
1477
+ * |---|---|---|---|
1478
+ * | `job.invalid` | | | Invalid render job |
1479
+ * | `job.scope` | | | A resource outside the organization of the job |
1480
+ * | `job.linearize` | | | A sealed document is not linearized |
1481
+ * | `job.lost` | | | The job or item has no outcome after one hour |
1482
+ * | `job.dispatch` | | | The job could not be queued |
1483
+ * | `batch.failed` | | | No item of the batch succeeded |
1484
+ * | `import.lost` | | | The import has no outcome after one hour |
1485
+ * | `import.completion` | | | The template of the import could not be created |
1486
+ * | `import.batch_clusters` | | | The files of the batch are exemplars of several models (issues: the model of each file) |
1487
+ * | `ocr.failed` | | | Tesseract failed on a scanned page |
1488
+ * | `snapshot.invalid` | | | The snapshot of the version is invalid |
1489
+ * | `storage.not_found` | | | An asset or a snapshot is missing from the storage |
1490
+ * | `data.bytes` | | | The data are too large for this queue |
1491
+ * | `asset.hash` | | | The bytes of an asset do not match its hash |
1492
+ * | `asset.invalid` | | | An image cannot be read |
1493
+ * | `asset.pixels` | | | An image has too many pixels |
1494
+ * | `asset.svg` | | | An SVG image holds forbidden content (script, external reference…) |
1495
+ * | `asset.path` | | | An asset has no path (development renders) |
1496
+ * | `font.missing` | | | A pinned font is in no depot |
1497
+ * | `font.hash` | | | The bytes of a font do not match its hash |
1498
+ * | `font.scope` | | | A font outside the scope of the job |
1499
+ * | `engine.version` | | `engine`, `pinned` | The job names another version of Typst than the one pinned by the template |
1500
+ * | `engine.unavailable` | | `engine`, `available` | The render worker does not carry this version of Typst |
1501
+ * | `render.timeout` | | | The render exceeded its time limit |
1502
+ * | `render.memory` | | | The render exceeded its memory limit |
1503
+ * | `render.pages` | | `max`, `actual` | The document exceeds the page limit of its queue |
1504
+ * | `render.limits` | | `limit`, `max`, `actual` | The document exceeds a limit of its template (`meta.limits`: maxPages, maxRows or maxImagePixels) |
1505
+ * | `render.engine` | | | Typst refused the document (see the message) |
1506
+ * | `render.killed` | | | The engine was stopped from outside: retry |
1507
+ * | `render.output` | | | The engine produced no document |
1508
+ * | `render.package` | | | A Typst package was imported |
1509
+ * | `master.missing` | | | A template needs at least one master |
1510
+ * | `master.unknown` | | `master` | Unknown master |
1511
+ * | `style.unknown` | | `style` | Unknown style |
1512
+ * | `style.cycle` | | | Style inheritance too deep (cycle?) |
1513
+ * | `image.source` | | | An image needs an asset or an expression |
1514
+ * | `datatable.incomplete` | | | A data table needs a spec, or a source, columns and a row template |
1515
+ * | `datatable.spec` | | `expr` | The expression of a data table must give a TableSpec |
1516
+ * | `limits.maxRows` | | `rows`, `max` | Too many rows for `meta.limits.maxRows` |
1517
+ * | `attachment.unsupported` | | | An attachment cannot be resolved |
1518
+ * | `include.hash` | | | The content of an include does not match its pinned hash |
1519
+ * | `data.file` | | | Data file not found (development renders) |
1520
+ * | `measure.failed` | | | The measure of the anchored headers failed |
1521
+ * | `boxes.failed` | | | The query of the boxes of the preview failed |
1522
+ * | `facturx.issuer` | | | The template declares Factur-X and the organization has no issuer |
1523
+ * | `facturx.invalid` | | | The invoice or the issuer does not satisfy the contract of the level (issues: paths) |
1524
+ * | `post.unavailable` | | | The post-processing service is not available |
1525
+ * | `post.failed` | | | The post-processing failed |
1526
+ * | `post.protocol` | | | Unexpected answer of the post-processing service |
1527
+ * | `post.attachment.pdfa` | | | Attachments need PDF/A-3 |
1528
+ * | `post.facturx.pdfa` | | | Factur-X needs PDF/A-3 |
1529
+ * | `post.pdf.signed` | | | A signed document cannot be post-processed |
1530
+ * | `assemble.bytes` | | | The documents of the batch are too large to assemble |
1531
+ * | `assemble.hash` | | | A document of the batch does not match its hash |
1532
+ * | `assemble.names` | | | Invalid or duplicate file names in the batch |
1533
+ * | `assemble.pages` | | | The merged document exceeds 20,000 pages |
1534
+ * | `assemble.seal_size` | | | The merged document exceeds 64 MB and cannot be sealed |
1535
+ * | `seal.unavailable` | | | No seal service is configured |
1536
+ * | `seal.unreachable` | | | The seal service cannot be reached: retry |
1537
+ * | `seal.protocol` | | | Unexpected answer of the seal service |
1538
+ * | `seal.failed` | | | The seal failed |
1539
+ * | `seal.visible` | | | A visible seal is not allowed in the accessible profile |
1540
+ * | `seal.field` | | | The signature field is already signed |
1541
+ * | `seal.page` | | | The page of the visible seal is outside the document |
1542
+ * | `seal.appearance` | | | The appearance of the visible seal is invalid |
1543
+ * | `seal.tsa.unavailable` | | | The timestamp authority is unavailable: retry |
1544
+ * | `seal.kms.integrity` | | | The KMS answer failed its integrity check: retry |
1545
+ * | `seal.pdf.invalid` | | | The document cannot be read by the seal service |
1546
+ * | `seal.pdf.encrypted` | | | An encrypted document cannot be sealed |
1547
+ * | `seal.signer.invalid` | | | The certificate of the organization cannot be used: upload it again |
1548
+ * | `seal.signer.expired` | | | The certificate of the organization has expired |
1549
+ * | `seal.tsa.address` | | | The timestamp authority of the organization resolves to a private address |
1550
+ * | `seal.request.too_large` | | | The document is too large to be sealed |
1551
+ * | `conformance.failed` | | | The document does not conform to its profile (veraPDF, Mustang) |
1552
+ * | `conformance.error` | | | The validators could not check the document |
1553
+ * | `expr.syntax.too_long` | | `max`, `pos`, `src` | Expression too long |
1554
+ * | `expr.syntax.number` | | `pos`, `src` | Malformed number |
1555
+ * | `expr.syntax.unterminated_string` | | `pos`, `src` | Unterminated string |
1556
+ * | `expr.syntax.identifier` | | `pos`, `src` | Malformed identifier |
1557
+ * | `expr.syntax.character` | | `char`, `pos`, `src` | Unexpected character |
1558
+ * | `expr.syntax.expected` | | `expected`, `pos`, `src` | Missing character |
1559
+ * | `expr.syntax.too_deep` | | `pos`, `src` | Expression nested too deeply |
1560
+ * | `expr.syntax.filter_name` | | `pos`, `src` | Expected a filter name after `|` |
1561
+ * | `expr.syntax.property_name` | | `pos`, `src` | Expected a property name after `.` |
1562
+ * | `expr.syntax.token` | | `pos`, `src` | Unexpected token |
1563
+ * | `expr.syntax.trailing` | | `pos`, `src` | Unexpected trailing input |
1564
+ * | `expr.eval.forbidden_property` | | `property`, `src` | Forbidden property |
1565
+ * | `expr.eval.unary_minus` | | `src` | Unary minus on a value that is not a number |
1566
+ * | `expr.eval.unknown_filter` | | `name`, `src` | Unknown filter |
1567
+ * | `expr.eval.unknown_function` | | `name`, `src` | Unknown function |
1568
+ * | `expr.eval.index_type` | | `value`, `src` | An index must be a number or a string |
1569
+ * | `expr.eval.division_by_zero` | | `src` | Division by zero |
1570
+ * | `expr.eval.unknown_operator` | | `op`, `src` | Unknown operator |
1571
+ * | `expr.eval.not_a_number` | | `value`, `src` | Not a number |
1572
+ * | `expr.eval.reserved_variable` | | `name`, `src` | Reserved variable: `page.*` other than the page counters (`page.number`, `page.total`, `page.sectionNumber`, `page.sectionTotal`) is not a data variable |
1573
+ */
1574
+ DraftConflict: {
1575
+ error: {
1576
+ /**
1577
+ * @description Stable code (catalogue below)
1578
+ * @example validation
1579
+ */
1580
+ code: string;
1581
+ /** @description English message, for logs; interfaces translate `code` */
1582
+ message: string;
1583
+ path?: string;
1584
+ /** @description Values quoted by the message, for a translated message (see the catalogue of codes) */
1585
+ params?: {
1586
+ [key: string]: string | number | boolean;
1587
+ };
1588
+ issues: components["schemas"]["Issue"][];
1589
+ /** @description 429: seconds before the same request may succeed (also in the `Retry-After` header) */
1590
+ retryAfter?: number;
1591
+ };
1592
+ requestId: string;
1593
+ /** @description The draft as it is now (null: no draft any more) */
1594
+ current: components["schemas"]["Version"] | null;
1595
+ };
643
1596
  PublishedVersion: {
644
1597
  id: string;
645
1598
  /** @description null while draft */
@@ -660,6 +1613,10 @@ export interface components {
660
1613
  createdAt: string;
661
1614
  /** Format: date-time */
662
1615
  updatedAt: string;
1616
+ /** @description Draft: incremented by every save (see `ETag`) */
1617
+ revision: number;
1618
+ /** @description Last author of the draft (user id) */
1619
+ updatedBy: string | null;
663
1620
  /** @description SDM document (packages/model) */
664
1621
  ir: {
665
1622
  [key: string]: unknown;
@@ -677,11 +1634,10 @@ export interface components {
677
1634
  codegen: string;
678
1635
  sdm: string;
679
1636
  } | null;
1637
+ /** @description Draft only: who is editing it (soft lock, information only) */
1638
+ lock?: components["schemas"]["DraftLock"] | null;
680
1639
  /** @description Reported without refusing the publication: font families substituted */
681
- warnings: {
682
- path: string;
683
- message: string;
684
- }[];
1640
+ warnings: components["schemas"]["Issue"][];
685
1641
  };
686
1642
  VersionDiff: {
687
1643
  from: {
@@ -720,15 +1676,9 @@ export interface components {
720
1676
  PublicationCheck: {
721
1677
  valid: boolean;
722
1678
  /** @description Why the publication would be refused (JSON paths) */
723
- issues: {
724
- path: string;
725
- message: string;
726
- }[];
1679
+ issues: components["schemas"]["Issue"][];
727
1680
  /** @description Font families that would be substituted */
728
- warnings: {
729
- path: string;
730
- message: string;
731
- }[];
1681
+ warnings: components["schemas"]["Issue"][];
732
1682
  /** @description Content hash the publication would freeze */
733
1683
  contentHash: string | null;
734
1684
  /** @description Version compared with; null: no such version */
@@ -762,6 +1712,14 @@ export interface components {
762
1712
  }[];
763
1713
  breaking: boolean;
764
1714
  } | null;
1715
+ /** @description JSON Schema derived from the template and the samples, reported even when other issues refuse the publication; null when it cannot be derived (invalid document, unresolved includes or assets, compilation error) */
1716
+ derivedSchema: {
1717
+ [key: string]: unknown;
1718
+ } | null;
1719
+ /** @description Data contract the publication would freeze (the author's schema, else the derived one); null when refused */
1720
+ dataSchema: {
1721
+ [key: string]: unknown;
1722
+ } | null;
765
1723
  };
766
1724
  DataSchema: {
767
1725
  [key: string]: unknown;
@@ -939,10 +1897,10 @@ export interface components {
939
1897
  error: {
940
1898
  code: string;
941
1899
  message: string;
942
- issues?: {
943
- path: string;
944
- message: string;
945
- }[];
1900
+ params?: {
1901
+ [key: string]: string | number | boolean;
1902
+ };
1903
+ issues?: components["schemas"]["Issue"][];
946
1904
  } | null;
947
1905
  /** @description The data of the render are kept (encrypted): POST /renders/{id}/verify needs no `data` */
948
1906
  dataRetained: boolean;
@@ -966,6 +1924,9 @@ export interface components {
966
1924
  code: string;
967
1925
  message: string;
968
1926
  path?: string;
1927
+ params?: {
1928
+ [key: string]: string | number | boolean;
1929
+ };
969
1930
  };
970
1931
  RenderRequest: {
971
1932
  /** @description Template id or slug */
@@ -1016,10 +1977,10 @@ export interface components {
1016
1977
  error: {
1017
1978
  code: string;
1018
1979
  message: string;
1019
- issues?: {
1020
- path: string;
1021
- message: string;
1022
- }[];
1980
+ params?: {
1981
+ [key: string]: string | number | boolean;
1982
+ };
1983
+ issues?: components["schemas"]["Issue"][];
1023
1984
  } | null;
1024
1985
  /** @description The data of the render are kept (encrypted): POST /renders/{id}/verify needs no `data` */
1025
1986
  dataRetained: boolean;
@@ -1090,10 +2051,10 @@ export interface components {
1090
2051
  error: {
1091
2052
  code: string;
1092
2053
  message: string;
1093
- issues?: {
1094
- path: string;
1095
- message: string;
1096
- }[];
2054
+ params?: {
2055
+ [key: string]: string | number | boolean;
2056
+ };
2057
+ issues?: components["schemas"]["Issue"][];
1097
2058
  } | null;
1098
2059
  /**
1099
2060
  * @description Batch jobs: one ZIP archive, one merged PDF, or the documents of the items; null: one document
@@ -1134,10 +2095,10 @@ export interface components {
1134
2095
  error: {
1135
2096
  code: string;
1136
2097
  message: string;
1137
- issues?: {
1138
- path: string;
1139
- message: string;
1140
- }[];
2098
+ params?: {
2099
+ [key: string]: string | number | boolean;
2100
+ };
2101
+ issues?: components["schemas"]["Issue"][];
1141
2102
  } | null;
1142
2103
  /**
1143
2104
  * @description Batch jobs: one ZIP archive, one merged PDF, or the documents of the items; null: one document
@@ -1223,10 +2184,10 @@ export interface components {
1223
2184
  error: {
1224
2185
  code: string;
1225
2186
  message: string;
1226
- issues?: {
1227
- path: string;
1228
- message: string;
1229
- }[];
2187
+ params?: {
2188
+ [key: string]: string | number | boolean;
2189
+ };
2190
+ issues?: components["schemas"]["Issue"][];
1230
2191
  } | null;
1231
2192
  /** Format: date-time */
1232
2193
  startedAt: string | null;
@@ -1281,13 +2242,181 @@ export interface components {
1281
2242
  };
1282
2243
  Validation: {
1283
2244
  valid: boolean;
1284
- issues: {
1285
- path: string;
1286
- message: string;
1287
- }[];
2245
+ issues: components["schemas"]["Issue"][];
1288
2246
  /** @description `version.latest`: an API key asked for `latest`; pin a version number in production */
1289
2247
  warnings: components["schemas"]["Warning"][];
1290
2248
  };
2249
+ ApiKeyUsage: {
2250
+ limits: {
2251
+ rendersPerMinute: number | null;
2252
+ pagesPerDay: number | null;
2253
+ };
2254
+ /** @description What applies: the limit of the key, else the quota of the organization */
2255
+ effective: {
2256
+ rendersPerMinute: number;
2257
+ pagesPerDay: number;
2258
+ };
2259
+ usage: {
2260
+ rendersLastMinute: number;
2261
+ pagesLast24Hours: number;
2262
+ };
2263
+ };
2264
+ Import: {
2265
+ id: string;
2266
+ /** @enum {string} */
2267
+ status: "queued" | "running" | "succeeded" | "failed";
2268
+ /**
2269
+ * @description `flow` (default): the document rebuilt as a flow (paragraphs, rows, tables, running headers and footers in the masters), fixed blocks only where the flow cannot lay them out; `zones`: everything rebuilt as absolute zones; `background`: the source page as background with the variables re-rendered on white patches (standard profile only)
2270
+ * @enum {string}
2271
+ */
2272
+ mode: "flow" | "zones" | "background";
2273
+ /** @enum {string} */
2274
+ profile: "standard" | "archive" | "accessible";
2275
+ templateName: string;
2276
+ folderId: string | null;
2277
+ source: {
2278
+ name: string;
2279
+ sha256: string;
2280
+ bytes: number;
2281
+ };
2282
+ /** @description Batch import: every exemplar, the source being the first one; null for one PDF */
2283
+ exemplars: {
2284
+ name: string;
2285
+ sha256: string;
2286
+ bytes: number;
2287
+ }[] | null;
2288
+ options: {
2289
+ ocr: boolean;
2290
+ /** @enum {string} */
2291
+ clusters: "reject" | "largest";
2292
+ llm: {
2293
+ /** @enum {string} */
2294
+ model: "sonnet" | "haiku";
2295
+ } | null;
2296
+ /** @description Import run again in another mode (`POST /imports/{id}/reimport`): its id */
2297
+ from?: string;
2298
+ };
2299
+ /** @description Usage of the LLM pass (`report.llm` tells why it did not run) */
2300
+ llm: {
2301
+ model: string;
2302
+ inputTokens: number;
2303
+ outputTokens: number;
2304
+ /** @description Cost of the pass to the platform (US dollars): platform administrators only, absent for any other caller (C-164); an organization counts AI imports (GET /organization/usage) */
2305
+ costUsd?: number;
2306
+ } | null;
2307
+ pages: number | null;
2308
+ /** @description Template created with the imported draft (succeeded); for an import run again, the template whose draft it replaces */
2309
+ templateId: string | null;
2310
+ candidates: {
2311
+ total: number;
2312
+ safe: number;
2313
+ suspect: number;
2314
+ } | null;
2315
+ warnings: {
2316
+ [key: string]: unknown;
2317
+ }[];
2318
+ /** @description Blocks, tables, candidates, fonts and their substitutions, warnings, timings */
2319
+ report: {
2320
+ [key: string]: unknown;
2321
+ } | null;
2322
+ error: {
2323
+ code: string;
2324
+ message: string;
2325
+ issues?: {
2326
+ path: string;
2327
+ message: string;
2328
+ /** @description Values the message quotes; `import.batch_clusters`: `file`, `cluster` (1-based), `clusters`, `files` (of the group), `pages` */
2329
+ params?: {
2330
+ [key: string]: string | number | boolean;
2331
+ };
2332
+ }[];
2333
+ } | null;
2334
+ /** Format: date-time */
2335
+ createdAt: string;
2336
+ /** Format: date-time */
2337
+ startedAt: string | null;
2338
+ /** Format: date-time */
2339
+ finishedAt: string | null;
2340
+ links: {
2341
+ [key: string]: string;
2342
+ };
2343
+ };
2344
+ ImportList: {
2345
+ imports: components["schemas"]["Import"][];
2346
+ nextCursor: string | null;
2347
+ };
2348
+ ImportCandidates: {
2349
+ importId: string;
2350
+ templateId: string;
2351
+ total: number;
2352
+ safe: number;
2353
+ suspect: number;
2354
+ candidates: components["schemas"]["ImportCandidate"][];
2355
+ };
2356
+ ImportCandidate: {
2357
+ /** @description Zone or table cell of the draft that shows the variable */
2358
+ id: string;
2359
+ /**
2360
+ * @description Data path in the imported sample
2361
+ * @example dateDEmission
2362
+ */
2363
+ path: string;
2364
+ text: string;
2365
+ page: number;
2366
+ /** @description [x0, y0, x1, y1] in mm from the top left of the page */
2367
+ bbox: number[];
2368
+ /**
2369
+ * @example [
2370
+ * "date",
2371
+ * "value_of_label"
2372
+ * ]
2373
+ */
2374
+ rules: string[];
2375
+ confidence: number;
2376
+ /** @enum {string} */
2377
+ status: "safe" | "suspect";
2378
+ /** @enum {string} */
2379
+ kind: "text" | "cell";
2380
+ /** @description `rule`: found by the rules on its text; `exemplar`: varies between the exemplars of a batch (sure); `llm`: named and typed by the LLM pass */
2381
+ sources?: ("rule" | "exemplar" | "llm")[];
2382
+ /** @description Proposal of the LLM pass (the path is already renamed after it) */
2383
+ llm?: {
2384
+ variable?: boolean;
2385
+ name?: string | null;
2386
+ type?: string | null;
2387
+ format?: string | null;
2388
+ group?: string | null;
2389
+ confidence?: number;
2390
+ };
2391
+ };
2392
+ Engines: {
2393
+ /**
2394
+ * @description Version given to new templates
2395
+ * @example 0.15.1
2396
+ */
2397
+ default: string;
2398
+ engines: {
2399
+ /** @example 0.15.1 */
2400
+ version: string;
2401
+ default: boolean;
2402
+ deprecated: components["schemas"]["EngineDeprecation"];
2403
+ }[];
2404
+ };
2405
+ /** @description Renders of a deprecated version carry the warning `engine.deprecated` */
2406
+ EngineDeprecation: {
2407
+ /**
2408
+ * @description Date of the deprecation (ISO 8601)
2409
+ * @example 2026-10-22
2410
+ */
2411
+ since: string;
2412
+ /** @description Earliest removal date; a version is only removed once no template’s last publication pins it */
2413
+ removal: string;
2414
+ /**
2415
+ * @description Version to republish with
2416
+ * @example 0.15.1
2417
+ */
2418
+ replacement: string;
2419
+ } | null;
1291
2420
  };
1292
2421
  responses: never;
1293
2422
  parameters: never;
@@ -1319,13 +2448,41 @@ export interface operations {
1319
2448
  id: string;
1320
2449
  email: string;
1321
2450
  name: string;
2451
+ image: string | null;
1322
2452
  platformAdmin: boolean;
2453
+ emailVerified: boolean;
2454
+ /** @enum {string|null} */
2455
+ locale: "fr" | "en" | null;
2456
+ /**
2457
+ * @description null: an account of a partner provider created before the self-service
2458
+ * @enum {string|null}
2459
+ */
2460
+ signupMethod: "password" | "magic_link" | "google" | "oidc" | null;
2461
+ /** Format: date-time */
2462
+ termsAcceptedAt: string | null;
2463
+ /** @description A second factor (TOTP) is active on the account */
2464
+ twoFactorEnabled: boolean;
1323
2465
  } | null;
1324
2466
  organizations: (components["schemas"]["Organization"] & {
2467
+ /** @description null: platform administrator without membership */
1325
2468
  role: string | null;
2469
+ /** @description What the caller may do in it */
2470
+ permissions: string[];
2471
+ /** @description The organization requires a second factor this session lacks: its requests answer 403 `auth.two_factor_required` until the account activates one */
2472
+ twoFactorRequired: boolean;
1326
2473
  })[];
1327
- /** @description Sign-in providers enabled on this deployment */
1328
- providers: string[];
2474
+ /** @description Organization of the requests without `x-sculdoc-organization`: the active one of the session (POST /me/organization), else the only membership */
2475
+ activeOrganizationId: string | null;
2476
+ onboarding: {
2477
+ /** @description A self-service account accepts the terms in force before acting (POST /me/terms) */
2478
+ termsRequired: boolean;
2479
+ termsVersion: string;
2480
+ organizationsOwned: number;
2481
+ /** @description Organizations the user may own: the limit of the best plan among those they own */
2482
+ organizationsLimit: number;
2483
+ canCreateOrganization: boolean;
2484
+ pendingInvitations: number;
2485
+ } | null;
1329
2486
  };
1330
2487
  };
1331
2488
  };
@@ -1633,6 +2790,8 @@ export interface operations {
1633
2790
  slug?: string;
1634
2791
  description?: string;
1635
2792
  folderId?: string | null;
2793
+ /** @description Deprecated: slug of a library template (POST /library/{slug}/copy) */
2794
+ fromStarter?: string;
1636
2795
  };
1637
2796
  };
1638
2797
  };
@@ -1861,7 +3020,10 @@ export interface operations {
1861
3020
  saveDraft: {
1862
3021
  parameters: {
1863
3022
  query?: never;
1864
- header?: never;
3023
+ header?: {
3024
+ /** @description ETag of the draft as last read (`GET …/versions/draft`, previous save): the write is refused with 409 and the current draft if it changed since; `*` = any existing draft */
3025
+ "if-match"?: string;
3026
+ };
1865
3027
  path: {
1866
3028
  /** @description Template id or slug */
1867
3029
  template: string;
@@ -1927,13 +3089,13 @@ export interface operations {
1927
3089
  "application/json": components["schemas"]["Error"];
1928
3090
  };
1929
3091
  };
1930
- /** @description Conflict with the current state */
3092
+ /** @description The draft changed since it was read (`If-Match`) */
1931
3093
  409: {
1932
3094
  headers: {
1933
3095
  [name: string]: unknown;
1934
3096
  };
1935
3097
  content: {
1936
- "application/json": components["schemas"]["Error"];
3098
+ "application/json": components["schemas"]["DraftConflict"];
1937
3099
  };
1938
3100
  };
1939
3101
  /** @description Validation failed (issues carry JSON paths) */
@@ -2037,6 +3199,11 @@ export interface operations {
2037
3199
  "application/json": {
2038
3200
  /** @description Mandatory at publication */
2039
3201
  changelog: string;
3202
+ /** @description Typst version of this publication (`GET /v1/engines`): an explicit change of the version of the template; compare the renders of both versions with the visual diff of the two versions */
3203
+ engine?: {
3204
+ /** @example 0.15.1 */
3205
+ version: string;
3206
+ };
2040
3207
  };
2041
3208
  };
2042
3209
  };
@@ -2206,6 +3373,11 @@ export interface operations {
2206
3373
  [key: string]: unknown;
2207
3374
  } | null;
2208
3375
  samples?: components["schemas"]["Sample"][];
3376
+ /** @description Typst version of this publication (`GET /v1/engines`): an explicit change of the version of the template; compare the renders of both versions with the visual diff of the two versions */
3377
+ engine?: {
3378
+ /** @example 0.15.1 */
3379
+ version: string;
3380
+ };
2209
3381
  /**
2210
3382
  * @description Version number or `latest`
2211
3383
  * @default latest
@@ -2603,7 +3775,10 @@ export interface operations {
2603
3775
  putDraftSample: {
2604
3776
  parameters: {
2605
3777
  query?: never;
2606
- header?: never;
3778
+ header?: {
3779
+ /** @description ETag of the draft as last read (`GET …/versions/draft`, previous save): the write is refused with 409 and the current draft if it changed since; `*` = any existing draft */
3780
+ "if-match"?: string;
3781
+ };
2607
3782
  path: {
2608
3783
  /** @description Template id or slug */
2609
3784
  template: string;
@@ -2674,13 +3849,13 @@ export interface operations {
2674
3849
  "application/json": components["schemas"]["Error"];
2675
3850
  };
2676
3851
  };
2677
- /** @description Conflict with the current state */
3852
+ /** @description The draft changed since it was read (`If-Match`) */
2678
3853
  409: {
2679
3854
  headers: {
2680
3855
  [name: string]: unknown;
2681
3856
  };
2682
3857
  content: {
2683
- "application/json": components["schemas"]["Error"];
3858
+ "application/json": components["schemas"]["DraftConflict"];
2684
3859
  };
2685
3860
  };
2686
3861
  /** @description Validation failed (issues carry JSON paths) */
@@ -2697,7 +3872,10 @@ export interface operations {
2697
3872
  deleteDraftSample: {
2698
3873
  parameters: {
2699
3874
  query?: never;
2700
- header?: never;
3875
+ header?: {
3876
+ /** @description ETag of the draft as last read (`GET …/versions/draft`, previous save): the write is refused with 409 and the current draft if it changed since; `*` = any existing draft */
3877
+ "if-match"?: string;
3878
+ };
2701
3879
  path: {
2702
3880
  /** @description Template id or slug */
2703
3881
  template: string;
@@ -2750,13 +3928,13 @@ export interface operations {
2750
3928
  "application/json": components["schemas"]["Error"];
2751
3929
  };
2752
3930
  };
2753
- /** @description Conflict with the current state */
3931
+ /** @description The draft changed since it was read (`If-Match`) */
2754
3932
  409: {
2755
3933
  headers: {
2756
3934
  [name: string]: unknown;
2757
3935
  };
2758
3936
  content: {
2759
- "application/json": components["schemas"]["Error"];
3937
+ "application/json": components["schemas"]["DraftConflict"];
2760
3938
  };
2761
3939
  };
2762
3940
  /** @description Validation failed (issues carry JSON paths) */
@@ -2773,7 +3951,10 @@ export interface operations {
2773
3951
  renameDraftSample: {
2774
3952
  parameters: {
2775
3953
  query?: never;
2776
- header?: never;
3954
+ header?: {
3955
+ /** @description ETag of the draft as last read (`GET …/versions/draft`, previous save): the write is refused with 409 and the current draft if it changed since; `*` = any existing draft */
3956
+ "if-match"?: string;
3957
+ };
2777
3958
  path: {
2778
3959
  /** @description Template id or slug */
2779
3960
  template: string;
@@ -2835,13 +4016,13 @@ export interface operations {
2835
4016
  "application/json": components["schemas"]["Error"];
2836
4017
  };
2837
4018
  };
2838
- /** @description Conflict with the current state */
4019
+ /** @description The draft changed since it was read (`If-Match`) */
2839
4020
  409: {
2840
4021
  headers: {
2841
4022
  [name: string]: unknown;
2842
4023
  };
2843
4024
  content: {
2844
- "application/json": components["schemas"]["Error"];
4025
+ "application/json": components["schemas"]["DraftConflict"];
2845
4026
  };
2846
4027
  };
2847
4028
  /** @description Validation failed (issues carry JSON paths) */
@@ -4319,4 +5500,390 @@ export interface operations {
4319
5500
  };
4320
5501
  };
4321
5502
  };
5503
+ getApiKeyUsage: {
5504
+ parameters: {
5505
+ query?: never;
5506
+ header?: never;
5507
+ path: {
5508
+ keyId: string;
5509
+ };
5510
+ cookie?: never;
5511
+ };
5512
+ requestBody?: never;
5513
+ responses: {
5514
+ /** @description Usage of the key */
5515
+ 200: {
5516
+ headers: {
5517
+ [name: string]: unknown;
5518
+ };
5519
+ content: {
5520
+ "application/json": components["schemas"]["ApiKeyUsage"];
5521
+ };
5522
+ };
5523
+ /** @description Malformed request */
5524
+ 400: {
5525
+ headers: {
5526
+ [name: string]: unknown;
5527
+ };
5528
+ content: {
5529
+ "application/json": components["schemas"]["Error"];
5530
+ };
5531
+ };
5532
+ /** @description Authentication required */
5533
+ 401: {
5534
+ headers: {
5535
+ [name: string]: unknown;
5536
+ };
5537
+ content: {
5538
+ "application/json": components["schemas"]["Error"];
5539
+ };
5540
+ };
5541
+ /** @description Insufficient permissions */
5542
+ 403: {
5543
+ headers: {
5544
+ [name: string]: unknown;
5545
+ };
5546
+ content: {
5547
+ "application/json": components["schemas"]["Error"];
5548
+ };
5549
+ };
5550
+ /** @description Not found in this organization */
5551
+ 404: {
5552
+ headers: {
5553
+ [name: string]: unknown;
5554
+ };
5555
+ content: {
5556
+ "application/json": components["schemas"]["Error"];
5557
+ };
5558
+ };
5559
+ /** @description Conflict with the current state */
5560
+ 409: {
5561
+ headers: {
5562
+ [name: string]: unknown;
5563
+ };
5564
+ content: {
5565
+ "application/json": components["schemas"]["Error"];
5566
+ };
5567
+ };
5568
+ /** @description Validation failed (issues carry JSON paths) */
5569
+ 422: {
5570
+ headers: {
5571
+ [name: string]: unknown;
5572
+ };
5573
+ content: {
5574
+ "application/json": components["schemas"]["Error"];
5575
+ };
5576
+ };
5577
+ };
5578
+ };
5579
+ listImports: {
5580
+ parameters: {
5581
+ query?: {
5582
+ status?: "queued" | "running" | "succeeded" | "failed";
5583
+ /** @description Imports of this template (the editor: its review) */
5584
+ templateId?: string;
5585
+ /** @description `true`: only the imports launched by the caller (the signed-in user, or this API key): the background tasks of the application */
5586
+ mine?: "true" | "false";
5587
+ limit?: number;
5588
+ cursor?: string;
5589
+ };
5590
+ header?: never;
5591
+ path?: never;
5592
+ cookie?: never;
5593
+ };
5594
+ requestBody?: never;
5595
+ responses: {
5596
+ /** @description Imports */
5597
+ 200: {
5598
+ headers: {
5599
+ [name: string]: unknown;
5600
+ };
5601
+ content: {
5602
+ "application/json": components["schemas"]["ImportList"];
5603
+ };
5604
+ };
5605
+ /** @description Malformed request */
5606
+ 400: {
5607
+ headers: {
5608
+ [name: string]: unknown;
5609
+ };
5610
+ content: {
5611
+ "application/json": components["schemas"]["Error"];
5612
+ };
5613
+ };
5614
+ /** @description Authentication required */
5615
+ 401: {
5616
+ headers: {
5617
+ [name: string]: unknown;
5618
+ };
5619
+ content: {
5620
+ "application/json": components["schemas"]["Error"];
5621
+ };
5622
+ };
5623
+ /** @description Insufficient permissions */
5624
+ 403: {
5625
+ headers: {
5626
+ [name: string]: unknown;
5627
+ };
5628
+ content: {
5629
+ "application/json": components["schemas"]["Error"];
5630
+ };
5631
+ };
5632
+ /** @description Not found in this organization */
5633
+ 404: {
5634
+ headers: {
5635
+ [name: string]: unknown;
5636
+ };
5637
+ content: {
5638
+ "application/json": components["schemas"]["Error"];
5639
+ };
5640
+ };
5641
+ /** @description Conflict with the current state */
5642
+ 409: {
5643
+ headers: {
5644
+ [name: string]: unknown;
5645
+ };
5646
+ content: {
5647
+ "application/json": components["schemas"]["Error"];
5648
+ };
5649
+ };
5650
+ /** @description Validation failed (issues carry JSON paths) */
5651
+ 422: {
5652
+ headers: {
5653
+ [name: string]: unknown;
5654
+ };
5655
+ content: {
5656
+ "application/json": components["schemas"]["Error"];
5657
+ };
5658
+ };
5659
+ };
5660
+ };
5661
+ getImport: {
5662
+ parameters: {
5663
+ query?: never;
5664
+ header?: never;
5665
+ path: {
5666
+ importId: string;
5667
+ };
5668
+ cookie?: never;
5669
+ };
5670
+ requestBody?: never;
5671
+ responses: {
5672
+ /** @description Import */
5673
+ 200: {
5674
+ headers: {
5675
+ [name: string]: unknown;
5676
+ };
5677
+ content: {
5678
+ "application/json": components["schemas"]["Import"];
5679
+ };
5680
+ };
5681
+ /** @description Malformed request */
5682
+ 400: {
5683
+ headers: {
5684
+ [name: string]: unknown;
5685
+ };
5686
+ content: {
5687
+ "application/json": components["schemas"]["Error"];
5688
+ };
5689
+ };
5690
+ /** @description Authentication required */
5691
+ 401: {
5692
+ headers: {
5693
+ [name: string]: unknown;
5694
+ };
5695
+ content: {
5696
+ "application/json": components["schemas"]["Error"];
5697
+ };
5698
+ };
5699
+ /** @description Insufficient permissions */
5700
+ 403: {
5701
+ headers: {
5702
+ [name: string]: unknown;
5703
+ };
5704
+ content: {
5705
+ "application/json": components["schemas"]["Error"];
5706
+ };
5707
+ };
5708
+ /** @description Not found in this organization */
5709
+ 404: {
5710
+ headers: {
5711
+ [name: string]: unknown;
5712
+ };
5713
+ content: {
5714
+ "application/json": components["schemas"]["Error"];
5715
+ };
5716
+ };
5717
+ /** @description Conflict with the current state */
5718
+ 409: {
5719
+ headers: {
5720
+ [name: string]: unknown;
5721
+ };
5722
+ content: {
5723
+ "application/json": components["schemas"]["Error"];
5724
+ };
5725
+ };
5726
+ /** @description Validation failed (issues carry JSON paths) */
5727
+ 422: {
5728
+ headers: {
5729
+ [name: string]: unknown;
5730
+ };
5731
+ content: {
5732
+ "application/json": components["schemas"]["Error"];
5733
+ };
5734
+ };
5735
+ };
5736
+ };
5737
+ getImportCandidates: {
5738
+ parameters: {
5739
+ query?: {
5740
+ status?: "safe" | "suspect";
5741
+ };
5742
+ header?: never;
5743
+ path: {
5744
+ importId: string;
5745
+ };
5746
+ cookie?: never;
5747
+ };
5748
+ requestBody?: never;
5749
+ responses: {
5750
+ /** @description Candidates */
5751
+ 200: {
5752
+ headers: {
5753
+ [name: string]: unknown;
5754
+ };
5755
+ content: {
5756
+ "application/json": components["schemas"]["ImportCandidates"];
5757
+ };
5758
+ };
5759
+ /** @description Malformed request */
5760
+ 400: {
5761
+ headers: {
5762
+ [name: string]: unknown;
5763
+ };
5764
+ content: {
5765
+ "application/json": components["schemas"]["Error"];
5766
+ };
5767
+ };
5768
+ /** @description Authentication required */
5769
+ 401: {
5770
+ headers: {
5771
+ [name: string]: unknown;
5772
+ };
5773
+ content: {
5774
+ "application/json": components["schemas"]["Error"];
5775
+ };
5776
+ };
5777
+ /** @description Insufficient permissions */
5778
+ 403: {
5779
+ headers: {
5780
+ [name: string]: unknown;
5781
+ };
5782
+ content: {
5783
+ "application/json": components["schemas"]["Error"];
5784
+ };
5785
+ };
5786
+ /** @description Not found in this organization */
5787
+ 404: {
5788
+ headers: {
5789
+ [name: string]: unknown;
5790
+ };
5791
+ content: {
5792
+ "application/json": components["schemas"]["Error"];
5793
+ };
5794
+ };
5795
+ /** @description Conflict with the current state */
5796
+ 409: {
5797
+ headers: {
5798
+ [name: string]: unknown;
5799
+ };
5800
+ content: {
5801
+ "application/json": components["schemas"]["Error"];
5802
+ };
5803
+ };
5804
+ /** @description Validation failed (issues carry JSON paths) */
5805
+ 422: {
5806
+ headers: {
5807
+ [name: string]: unknown;
5808
+ };
5809
+ content: {
5810
+ "application/json": components["schemas"]["Error"];
5811
+ };
5812
+ };
5813
+ };
5814
+ };
5815
+ listEngines: {
5816
+ parameters: {
5817
+ query?: never;
5818
+ header?: never;
5819
+ path?: never;
5820
+ cookie?: never;
5821
+ };
5822
+ requestBody?: never;
5823
+ responses: {
5824
+ /** @description Engine versions */
5825
+ 200: {
5826
+ headers: {
5827
+ [name: string]: unknown;
5828
+ };
5829
+ content: {
5830
+ "application/json": components["schemas"]["Engines"];
5831
+ };
5832
+ };
5833
+ /** @description Malformed request */
5834
+ 400: {
5835
+ headers: {
5836
+ [name: string]: unknown;
5837
+ };
5838
+ content: {
5839
+ "application/json": components["schemas"]["Error"];
5840
+ };
5841
+ };
5842
+ /** @description Authentication required */
5843
+ 401: {
5844
+ headers: {
5845
+ [name: string]: unknown;
5846
+ };
5847
+ content: {
5848
+ "application/json": components["schemas"]["Error"];
5849
+ };
5850
+ };
5851
+ /** @description Insufficient permissions */
5852
+ 403: {
5853
+ headers: {
5854
+ [name: string]: unknown;
5855
+ };
5856
+ content: {
5857
+ "application/json": components["schemas"]["Error"];
5858
+ };
5859
+ };
5860
+ /** @description Not found in this organization */
5861
+ 404: {
5862
+ headers: {
5863
+ [name: string]: unknown;
5864
+ };
5865
+ content: {
5866
+ "application/json": components["schemas"]["Error"];
5867
+ };
5868
+ };
5869
+ /** @description Conflict with the current state */
5870
+ 409: {
5871
+ headers: {
5872
+ [name: string]: unknown;
5873
+ };
5874
+ content: {
5875
+ "application/json": components["schemas"]["Error"];
5876
+ };
5877
+ };
5878
+ /** @description Validation failed (issues carry JSON paths) */
5879
+ 422: {
5880
+ headers: {
5881
+ [name: string]: unknown;
5882
+ };
5883
+ content: {
5884
+ "application/json": components["schemas"]["Error"];
5885
+ };
5886
+ };
5887
+ };
5888
+ };
4322
5889
  }