@canopy-io/node 0.25.1 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +12 -7
- package/dist/index.cjs +95 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +436 -31
- package/dist/index.d.ts +436 -31
- package/dist/index.js +95 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3014,11 +3014,31 @@ interface paths {
|
|
|
3014
3014
|
head?: never;
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Change an Environment's branding
|
|
3017
|
-
* @description Sets the Environment's branding. Every field is optional and stands on its own: send only what you want to change, send `null` to clear a field (the primary color then returns to the default blue). The product name shows in the browser tab, as the logo's alt text and in place of a missing logo; the logo shows at the top and the favicon in the tab; the primary color drives buttons and links, and the hover, link and focus shades are derived from it; the background color paints the page behind the card; the text and card colors set the card and what is written on it, with secondary text, lines and field borders derived from the pair; the color scheme chooses the light look, the dark look or whichever the visitor's device asks for, and the dark colors and dark logo describe the dark look, each with a default; the layout is one centred card or a split page with a panel beside the card, which holds a heading, a short text and an image; the background style paints the background color, a two-color gradient or an image behind the card; the corner radius rounds the card, its panels, fields and buttons together; the card style gives the card a border or none, and the card shadow sets the shadow under it; the body font sets the text and the heading font the headings, each a curated font from the fonts list or the https URL of a WOFF2 file, with the system font behind it; the support, terms and privacy links show as "Need help?", "Terms" and "Privacy" under every hosted page; `header_html`, `notice_html` and `footer_html` place your own content in a bar across the top of the page, above the card and under it, kept to links, paragraphs, bold, italics, line breaks, lists and images with https addresses, everything else being removed when it is saved, so the response shows what was kept; `text_overrides` rewords the hosted page texts the text keys list names, one text at a time; `custom_css` is your own CSS for hosted pages, applied after every other setting, which may set the published `--hp-*` tokens and style the published `hp-*` classes, and is refused when it loads a file from anywhere (`@import`, `@font-face`, `url()`), selects on a field's `value` or does not parse. Returns `400` (`
|
|
3017
|
+
* @description Sets the Environment's branding. Every field is optional and stands on its own: send only what you want to change, send `null` to clear a field (the primary color then returns to the default blue). The product name shows in the browser tab, as the logo's alt text and in place of a missing logo; the logo shows at the top and the favicon in the tab; the primary color drives buttons and links, and the hover, link and focus shades are derived from it; the background color paints the page behind the card; the text and card colors set the card and what is written on it, with secondary text, lines and field borders derived from the pair; the color scheme chooses the light look, the dark look or whichever the visitor's device asks for, and the dark colors and dark logo describe the dark look, each with a default; the layout is one centred card or a split page with a panel beside the card, which holds a heading, a short text and an image; the background style paints the background color, a two-color gradient or an image behind the card; the corner radius rounds the card, its panels, fields and buttons together; the card style gives the card a border or none, and the card shadow sets the shadow under it; the body font sets the text and the heading font the headings, each a curated font from the fonts list or the https URL of a WOFF2 file, with the system font behind it; the support, terms and privacy links show as "Need help?", "Terms" and "Privacy" under every hosted page; `header_html`, `notice_html` and `footer_html` place your own content in a bar across the top of the page, above the card and under it, kept to links, paragraphs, bold, italics, line breaks, lists and images with https addresses, everything else being removed when it is saved, so the response shows what was kept; `text_overrides` rewords the hosted page texts the text keys list names, one text at a time; `custom_css` is your own CSS for hosted pages, applied after every other setting, which may set the published `--hp-*` tokens and style the published `hp-*` classes, and is refused when it loads a file from anywhere (`@import`, `@font-face`, `url()`), selects on a field's `value` or does not parse. Returns `400` (`request.validation_failed`) for a malformed value, an image field whose address is not shaped like an image upload of its kind included, or `branding.image_not_uploaded` for an upload's address on another host or one Canopy does not store, and `403` (`plan_feature_unavailable`) when the request sets `custom_css`, `color_scheme`, `logo_dark_url`, a dark color, `layout`, `background_style`, a gradient color, a background or panel image, `panel_heading`, `panel_text`, a text in `text_overrides`, `header_html`, `notice_html`, `footer_html`, `text_color`, `surface_color`, `corner_radius`, `card_style`, `card_shadow`, `heading_font` or `body_font` and the Account's plan does not include hosted page customization; clearing one with `null` is always allowed. Emits `environment.branding_updated`, which records the fields that changed.
|
|
3018
3018
|
*/
|
|
3019
3019
|
patch: operations["ApiBrandingController_updateBranding"];
|
|
3020
3020
|
trace?: never;
|
|
3021
3021
|
};
|
|
3022
|
+
"/api/v1/branding/images": {
|
|
3023
|
+
parameters: {
|
|
3024
|
+
query?: never;
|
|
3025
|
+
header?: never;
|
|
3026
|
+
path?: never;
|
|
3027
|
+
cookie?: never;
|
|
3028
|
+
};
|
|
3029
|
+
get?: never;
|
|
3030
|
+
put?: never;
|
|
3031
|
+
/**
|
|
3032
|
+
* Upload a logo, favicon, background or panel image
|
|
3033
|
+
* @description Stores an image for the hosted pages and answers the address Canopy serves it at, which is the only value an image field (`logo_url`, `logo_dark_url`, `favicon_url`, `background_image_url`, `background_image_dark_url`, `panel_image_url`, `panel_image_dark_url`) takes. Send the file base64-encoded in `image`, or the public https address of the image in `url` for Canopy to fetch once, with its `slot`: `logo`, `favicon`, `background` or `panel`. A PNG, JPEG, WebP or SVG is accepted; it is decoded and drawn again, so the stored image carries no metadata and an SVG is drawn into pixels. A logo or favicon may be at most 1 MB and must be at least 32 by 32 pixels; a logo is stored as a PNG of at most 1200 by 600 and a favicon as a 64 by 64 PNG. A background or panel image may be at most 3 MB and must be at least 600 by 600 pixels; it is stored as a WebP of at most 2560 on either side. The address names the file by its content and size, so the same image always answers the same address, and it is served from Canopy's own origin, cached for a year. Uploading saves nothing to the branding: save the address with the branding update. An image no branding names is deleted after a day. Returns `400` with `branding.image_unreadable` for a file that is not one of those formats, `branding.image_too_large` or `branding.image_too_small` for one outside its kind's limits, `branding.image_svg_external` for an SVG that refers to a file or address outside itself, `branding.image_source` unless exactly one of `image` and `url` is sent, `request.validation_failed` for an address that is not https, `branding.image_url_refused` for one that is not public (a private or loopback host, credentials or a fragment), and `branding.image_url_unreachable` when the address does not answer `200` with the file within 5 seconds (Canopy follows no redirect). Returns `429` after 30 uploads in a minute.
|
|
3034
|
+
*/
|
|
3035
|
+
post: operations["ApiBrandingController_uploadImage"];
|
|
3036
|
+
delete?: never;
|
|
3037
|
+
options?: never;
|
|
3038
|
+
head?: never;
|
|
3039
|
+
patch?: never;
|
|
3040
|
+
trace?: never;
|
|
3041
|
+
};
|
|
3022
3042
|
"/api/v1/branding/preview-pages": {
|
|
3023
3043
|
parameters: {
|
|
3024
3044
|
query?: never;
|
|
@@ -3090,7 +3110,7 @@ interface paths {
|
|
|
3090
3110
|
put?: never;
|
|
3091
3111
|
/**
|
|
3092
3112
|
* Preview a hosted page or email in a branding
|
|
3093
|
-
* @description Renders one hosted page, in one of its states, or one customer email, in the Environment's branding with the unsaved changes in `branding` laid over it, so a branding change can be checked before it is saved. Nothing is saved, and no session or person is involved: the page shows sample data. `page` and `state` are ids from the preview list, and `scheme` renders a page in its light or its dark look whatever the color scheme. Returns the whole HTML document, which works without scripts. Returns `400` (`branding.preview_page_unknown`) for a page or state that does not exist,
|
|
3113
|
+
* @description Renders one hosted page, in one of its states, or one customer email, in the Environment's branding with the unsaved changes in `branding` laid over it, so a branding change can be checked before it is saved. Nothing is saved, and no session or person is involved: the page shows sample data. `page` and `state` are ids from the preview list, and `scheme` renders a page in its light or its dark look whatever the color scheme. Returns the whole HTML document, which works without scripts. Returns `400` (`branding.preview_page_unknown`) for a page or state that does not exist, `validation` for a malformed branding value, or `branding.image_not_uploaded` for an image field that holds anything but an uploaded image, and `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization. `language` renders it in one of the languages Canopy writes the pages in, with the wording `text_overrides` holds for that language; left out, English.
|
|
3094
3114
|
*/
|
|
3095
3115
|
post: operations["ApiBrandingController_preview"];
|
|
3096
3116
|
delete?: never;
|
|
@@ -3099,6 +3119,26 @@ interface paths {
|
|
|
3099
3119
|
patch?: never;
|
|
3100
3120
|
trace?: never;
|
|
3101
3121
|
};
|
|
3122
|
+
"/api/v1/branding/preview-link": {
|
|
3123
|
+
parameters: {
|
|
3124
|
+
query?: never;
|
|
3125
|
+
header?: never;
|
|
3126
|
+
path?: never;
|
|
3127
|
+
cookie?: never;
|
|
3128
|
+
};
|
|
3129
|
+
get?: never;
|
|
3130
|
+
put?: never;
|
|
3131
|
+
/**
|
|
3132
|
+
* Make a link that opens a hosted page in a branding
|
|
3133
|
+
* @description Makes a link that opens one hosted page, in one of its states, in the Environment's branding with the unsaved changes in `branding` laid over it, so a person can see a look in their own browser before it is saved. Takes what the preview takes; `page` must be a hosted page, not an email. Nothing is saved, and the page shows sample data. The link opens for two minutes, on the API's own origin; open it in a browser rather than reading it, and make a new one once it has expired. The page runs with `sandbox allow-scripts` and `form-action 'none'`, so its forms submit nowhere and a page template's scripts reach no cookie or storage. Returns `400` (`branding.preview_link_page_unknown`) for a page or state that is not a hosted page's, `validation` for a malformed branding value, or `branding.image_not_uploaded` for an image field that holds anything but an uploaded image, and `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3134
|
+
*/
|
|
3135
|
+
post: operations["ApiBrandingController_previewLink"];
|
|
3136
|
+
delete?: never;
|
|
3137
|
+
options?: never;
|
|
3138
|
+
head?: never;
|
|
3139
|
+
patch?: never;
|
|
3140
|
+
trace?: never;
|
|
3141
|
+
};
|
|
3102
3142
|
"/api/v1/token-claims": {
|
|
3103
3143
|
parameters: {
|
|
3104
3144
|
query?: never;
|
|
@@ -3306,7 +3346,7 @@ interface paths {
|
|
|
3306
3346
|
head?: never;
|
|
3307
3347
|
/**
|
|
3308
3348
|
* Change an Environment's sign-in settings
|
|
3309
|
-
* @description Updates the sign-in settings of the request's Environment, applying any supplied fields (`mfa`, `allow_self_signup`, `self_signup_require_captcha`, `login_require_captcha`, `password_login_enabled`, `email_otp_login_enabled`, `passkey_login_enabled`, `default_language`, `self_signup_daily_cap`, `access_token_ttl_seconds`, `refresh_token_ttl_days`, `public_refresh_token_ttl_days`, `allowed_web_origins`, `sso_return_urls`, `auth_links_base_url`); omitted fields are left unchanged, `allowed_web_origins` are normalized and de-duplicated on save, and `auth_links_base_url` is canonicalized to a bare origin (send `null` to clear it). While `auth_links_base_url` is set, verification, password-reset and invitation emails link to that origin at `/verify-email`, `/reset-password` and `/accept-invite` instead of Canopy's hosted pages. Send the Environment's `version` (returned by the GET) in `If-Match` to refuse a stale save: a mismatch answers `409 version_mismatch`, and without the header the check is skipped. Emits an `environment.auth_settings_updated` audit event naming the settings whose value changed.
|
|
3349
|
+
* @description Updates the sign-in settings of the request's Environment, applying any supplied fields (`mfa`, `allow_self_signup`, `self_signup_require_captcha`, `login_require_captcha`, `password_login_enabled`, `email_otp_login_enabled`, `passkey_login_enabled`, `languages`, `default_language`, `self_signup_daily_cap`, `access_token_ttl_seconds`, `refresh_token_ttl_days`, `public_refresh_token_ttl_days`, `allowed_web_origins`, `sso_return_urls`, `auth_links_base_url`); omitted fields are left unchanged, `allowed_web_origins` are normalized and de-duplicated on save, and `auth_links_base_url` is canonicalized to a bare origin (send `null` to clear it). While `auth_links_base_url` is set, verification, password-reset and invitation emails link to that origin at `/verify-email`, `/reset-password` and `/accept-invite` instead of Canopy's hosted pages. Send the Environment's `version` (returned by the GET) in `If-Match` to refuse a stale save: a mismatch answers `409 version_mismatch`, and without the header the check is skipped. Emits an `environment.auth_settings_updated` audit event naming the settings whose value changed.
|
|
3310
3350
|
*/
|
|
3311
3351
|
patch: operations["ApiAuthSettingsController_update"];
|
|
3312
3352
|
trace?: never;
|
|
@@ -7434,7 +7474,7 @@ interface components {
|
|
|
7434
7474
|
* @example auth.acme.example
|
|
7435
7475
|
*/
|
|
7436
7476
|
page_template_domain: string | null;
|
|
7437
|
-
/** @description
|
|
7477
|
+
/** @description The languages this Environment offers, in the order they are listed. `text_overrides` may reword the texts in each, and a preview may be asked for in any of them. */
|
|
7438
7478
|
languages: components["schemas"]["AvailableLanguageDto"][];
|
|
7439
7479
|
/**
|
|
7440
7480
|
* @description The language a page is shown in when nothing asks for another, one of `languages`.
|
|
@@ -7447,16 +7487,25 @@ interface components {
|
|
|
7447
7487
|
UpdateEnvironmentBrandingDto: {
|
|
7448
7488
|
/** @description The product name hosted pages and the organization admin portal show: in the browser tab title, beside the logo when `logo_kind` is `icon`, as a full logo's alt text, and in place of a logo when none is set. Null clears it, and the pages then show no name. */
|
|
7449
7489
|
product_name?: string | null;
|
|
7450
|
-
/**
|
|
7490
|
+
/**
|
|
7491
|
+
* @description The logo shown at the top of hosted pages, the portal and emails to the Environment's users. The address `POST /api/v1/branding/images` answered for an image with `slot` `logo`; any other value is refused. Null clears it.
|
|
7492
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-480x120.png
|
|
7493
|
+
*/
|
|
7451
7494
|
logo_url?: string | null;
|
|
7452
|
-
/**
|
|
7495
|
+
/**
|
|
7496
|
+
* @description The logo the dark look of hosted pages shows in place of `logo_url`: a version of the same logo that reads on a dark card. It is used only when `logo_url` is set, and `logo_kind` describes both. Emails never show it. The address `POST /api/v1/branding/images` answered for an image with `slot` `logo`; any other value is refused. Null shows `logo_url` in both looks. Needs the `hosted_page_customization` plan feature to set.
|
|
7497
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-480x120.png
|
|
7498
|
+
*/
|
|
7453
7499
|
logo_dark_url?: string | null;
|
|
7454
7500
|
/**
|
|
7455
7501
|
* @description What the logo image is. `full`: a complete logo that already carries the product name, shown alone. `icon`: a square mark, shown at icon size with the product name beside it. Null returns to `full`.
|
|
7456
7502
|
* @enum {string|null}
|
|
7457
7503
|
*/
|
|
7458
7504
|
logo_kind?: "full" | "icon" | null;
|
|
7459
|
-
/**
|
|
7505
|
+
/**
|
|
7506
|
+
* @description The browser-tab icon on hosted pages. The address `POST /api/v1/branding/images` answered for an image with `slot` `favicon`; any other value is refused. Null clears it.
|
|
7507
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-64x64.png
|
|
7508
|
+
*/
|
|
7460
7509
|
favicon_url?: string | null;
|
|
7461
7510
|
/**
|
|
7462
7511
|
* @description Which look hosted pages wear. `light`: the look the colour fields describe. `dark`: the look their dark counterparts describe (`primary_dark_color`, `background_dark_color`, `text_dark_color`, `surface_dark_color`, `logo_dark_url`), each with a default. `system`: whichever the visitor's device asks for, chosen by the browser with no script. A QR code and the CAPTCHA keep a light ground in both, and emails are always light. Null returns to `light`. Needs the `hosted_page_customization` plan feature to set.
|
|
@@ -7534,13 +7583,13 @@ interface components {
|
|
|
7534
7583
|
*/
|
|
7535
7584
|
gradient_end_dark_color?: string | null;
|
|
7536
7585
|
/**
|
|
7537
|
-
* @description The image behind the card when `background_style` is `image`.
|
|
7538
|
-
* @example https://
|
|
7586
|
+
* @description The image behind the card when `background_style` is `image`. The address `POST /api/v1/branding/images` answered for an image with `slot` `background`; any other value is refused. Null shows the background colour. Needs the `hosted_page_customization` plan feature to set.
|
|
7587
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-1920x1080.webp
|
|
7539
7588
|
*/
|
|
7540
7589
|
background_image_url?: string | null;
|
|
7541
7590
|
/**
|
|
7542
|
-
* @description The image the dark look shows behind the card. Null dims `background_image_url`.
|
|
7543
|
-
* @example https://
|
|
7591
|
+
* @description The image the dark look shows behind the card. Null dims `background_image_url`. The address `POST /api/v1/branding/images` answered for an image with `slot` `background`; any other value is refused. Needs the `hosted_page_customization` plan feature to set.
|
|
7592
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-1920x1080.webp
|
|
7544
7593
|
*/
|
|
7545
7594
|
background_image_dark_url?: string | null;
|
|
7546
7595
|
/** @description The heading on the `split` layout's panel, as plain text. Null shows none. Needs the `hosted_page_customization` plan feature to set. */
|
|
@@ -7548,13 +7597,13 @@ interface components {
|
|
|
7548
7597
|
/** @description A short paragraph under the panel's heading, as plain text; hidden on a narrow screen. Null shows none. Needs the `hosted_page_customization` plan feature to set. */
|
|
7549
7598
|
panel_text?: string | null;
|
|
7550
7599
|
/**
|
|
7551
|
-
* @description The image that fills the `split` layout's panel, darkened under the heading and text so they stay readable.
|
|
7552
|
-
* @example https://
|
|
7600
|
+
* @description The image that fills the `split` layout's panel, darkened under the heading and text so they stay readable. The address `POST /api/v1/branding/images` answered for an image with `slot` `panel`; any other value is refused. Null fills the panel from the primary colour. Needs the `hosted_page_customization` plan feature to set.
|
|
7601
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-1200x1600.webp
|
|
7553
7602
|
*/
|
|
7554
7603
|
panel_image_url?: string | null;
|
|
7555
7604
|
/**
|
|
7556
|
-
* @description The image the dark look shows on the panel. Null shows `panel_image_url`.
|
|
7557
|
-
* @example https://
|
|
7605
|
+
* @description The image the dark look shows on the panel. Null shows `panel_image_url`. The address `POST /api/v1/branding/images` answered for an image with `slot` `panel`; any other value is refused. Needs the `hosted_page_customization` plan feature to set.
|
|
7606
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-1200x1600.webp
|
|
7558
7607
|
*/
|
|
7559
7608
|
panel_image_dark_url?: string | null;
|
|
7560
7609
|
/**
|
|
@@ -7644,6 +7693,46 @@ interface components {
|
|
|
7644
7693
|
};
|
|
7645
7694
|
} | null;
|
|
7646
7695
|
};
|
|
7696
|
+
BrandingImageResponseDto: {
|
|
7697
|
+
/**
|
|
7698
|
+
* @description Where Canopy serves the image. Save it in a branding field of the image's kind; the same file always answers the same address.
|
|
7699
|
+
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-480x120.png
|
|
7700
|
+
*/
|
|
7701
|
+
url: string;
|
|
7702
|
+
/**
|
|
7703
|
+
* @description Its width in pixels.
|
|
7704
|
+
* @example 480
|
|
7705
|
+
*/
|
|
7706
|
+
width: number;
|
|
7707
|
+
/**
|
|
7708
|
+
* @description Its height in pixels.
|
|
7709
|
+
* @example 120
|
|
7710
|
+
*/
|
|
7711
|
+
height: number;
|
|
7712
|
+
/**
|
|
7713
|
+
* @description The format it is stored and served in.
|
|
7714
|
+
* @example image/png
|
|
7715
|
+
*/
|
|
7716
|
+
content_type: string;
|
|
7717
|
+
};
|
|
7718
|
+
UploadBrandingImageDto: {
|
|
7719
|
+
/**
|
|
7720
|
+
* @description The kind of image, which sets its rules and the fields that take it. `logo`: for `logo_url` and `logo_dark_url`; at most 1 MB, at least 32 by 32 pixels, stored as a PNG of at most 1200 by 600. `favicon`: for `favicon_url`; at most 1 MB, at least 32 by 32 pixels, stored as a 64 by 64 PNG. `background`: for `background_image_url` and `background_image_dark_url`; at most 3 MB, at least 600 by 600 pixels, stored as a WebP of at most 2560 on either side. `panel`: the same, for `panel_image_url` and `panel_image_dark_url`.
|
|
7721
|
+
* @example logo
|
|
7722
|
+
* @enum {string}
|
|
7723
|
+
*/
|
|
7724
|
+
slot: "logo" | "favicon" | "background" | "panel";
|
|
7725
|
+
/**
|
|
7726
|
+
* @description The file, base64-encoded: a PNG, JPEG, WebP or SVG. Send this or `url`, not both. It is decoded and drawn again, so the stored image carries no metadata, and an SVG is drawn into pixels; an SVG that refers to any file or address outside itself is refused.
|
|
7727
|
+
* @example iVBORw0KGgoAAAANSUhEUgAA…
|
|
7728
|
+
*/
|
|
7729
|
+
image?: string;
|
|
7730
|
+
/**
|
|
7731
|
+
* @description A public https address Canopy fetches the file from once, in place of `image`: the address of the image itself, which must answer `200` within 5 seconds, since Canopy follows no redirect. The same formats and limits apply, and the stored copy is Canopy's own; the address is not kept.
|
|
7732
|
+
* @example https://www.fernleaf.example/brand/logo.svg
|
|
7733
|
+
*/
|
|
7734
|
+
url?: string;
|
|
7735
|
+
};
|
|
7647
7736
|
BrandingPreviewStateDto: {
|
|
7648
7737
|
/** @example WrongPassword */
|
|
7649
7738
|
id: string;
|
|
@@ -7772,7 +7861,24 @@ interface components {
|
|
|
7772
7861
|
* @example es
|
|
7773
7862
|
* @enum {string}
|
|
7774
7863
|
*/
|
|
7775
|
-
language?: "en" | "es";
|
|
7864
|
+
language?: "en" | "es" | "fr" | "de" | "pt-br" | "it" | "nl" | "ja" | "ko" | "zh-hans" | "ar" | "he";
|
|
7865
|
+
};
|
|
7866
|
+
BrandingPreviewLinkResponseDto: {
|
|
7867
|
+
/**
|
|
7868
|
+
* @description The page's title.
|
|
7869
|
+
* @example Sign in
|
|
7870
|
+
*/
|
|
7871
|
+
title: string;
|
|
7872
|
+
/**
|
|
7873
|
+
* @description The page, on the API's own origin. Load it in a frame with `sandbox="allow-scripts"` and never `allow-same-origin`.
|
|
7874
|
+
* @example https://auth.canopy-io.com/branding-preview/0b7Yc9vQm3kTq1sXr8LpZf2uWn5aEhJd
|
|
7875
|
+
*/
|
|
7876
|
+
url: string;
|
|
7877
|
+
/**
|
|
7878
|
+
* Format: date-time
|
|
7879
|
+
* @description When the link stops opening.
|
|
7880
|
+
*/
|
|
7881
|
+
expires_at: string;
|
|
7776
7882
|
};
|
|
7777
7883
|
TokenClaimEntryResponseDto: {
|
|
7778
7884
|
/**
|
|
@@ -7934,7 +8040,16 @@ interface components {
|
|
|
7934
8040
|
/** @description Enable passkey sign-in for this Environment. Off by default (opt-in); persisted under `env.settings.passkey_login_enabled`. When on, an identity holding a passkey signs in with it alone via /login/passkey/*, and the passkey counts as its second factor. */
|
|
7935
8041
|
passkey_login_enabled?: boolean;
|
|
7936
8042
|
/**
|
|
7937
|
-
* @description The
|
|
8043
|
+
* @description The languages this Environment offers on the hosted pages and in the emails it sends, as language tags. Each must be one of `available_languages` in the response, and the list must hold `default_language`. An Environment that has never saved a list offers `default_language` alone, and a new `default_language` sent without `languages` replaces it. A page or email is only ever written in an offered language.
|
|
8044
|
+
* @example [
|
|
8045
|
+
* "en",
|
|
8046
|
+
* "es",
|
|
8047
|
+
* "fr"
|
|
8048
|
+
* ]
|
|
8049
|
+
*/
|
|
8050
|
+
languages?: string[];
|
|
8051
|
+
/**
|
|
8052
|
+
* @description The language a page or email is written in when nothing names one the Environment offers: no `ui_locales`, no stored language for the person, and no match in the browser's languages. Must be one of `languages`. Unset, `en`.
|
|
7938
8053
|
* @example en
|
|
7939
8054
|
*/
|
|
7940
8055
|
default_language?: string;
|
|
@@ -7963,7 +8078,7 @@ interface components {
|
|
|
7963
8078
|
hierarchy_schema: {
|
|
7964
8079
|
[key: string]: unknown;
|
|
7965
8080
|
} | null;
|
|
7966
|
-
/** @description The sign-in policy: MFA, sign-in methods, CAPTCHA, self-signup, token lifetimes and organization signup. Settings that name one deployment or the source's roles are left out. */
|
|
8081
|
+
/** @description The sign-in policy: MFA, sign-in methods, CAPTCHA, self-signup, languages, token lifetimes and organization signup. Settings that name one deployment or the source's roles are left out. */
|
|
7967
8082
|
auth_settings: components["schemas"]["EnvironmentExportAuthSettingsDto"];
|
|
7968
8083
|
/** @description The custom claims the Environment adds to its tokens */
|
|
7969
8084
|
token_claims: components["schemas"]["TokenClaimEntryResponseDto"][];
|
|
@@ -8029,11 +8144,20 @@ interface components {
|
|
|
8029
8144
|
email_otp_login_enabled?: boolean;
|
|
8030
8145
|
passkey_login_enabled?: boolean;
|
|
8031
8146
|
/**
|
|
8032
|
-
* @description The
|
|
8147
|
+
* @description The languages this Environment offers on the hosted pages and in its emails, in the order of `available_languages`. Only `default_language` when the Environment has not chosen.
|
|
8148
|
+
* @example [
|
|
8149
|
+
* "en",
|
|
8150
|
+
* "es",
|
|
8151
|
+
* "fr"
|
|
8152
|
+
* ]
|
|
8153
|
+
*/
|
|
8154
|
+
languages: string[];
|
|
8155
|
+
/**
|
|
8156
|
+
* @description The language a page or email is written in when nothing names one the Environment offers. Always one of `languages`.
|
|
8033
8157
|
* @example en
|
|
8034
8158
|
*/
|
|
8035
8159
|
default_language: string;
|
|
8036
|
-
/** @description Every language the hosted pages and emails are written in
|
|
8160
|
+
/** @description Every language the hosted pages and emails are written in, which is what `languages` may hold. A page or email follows `ui_locales`, then the person's stored language, then the browser's, then `default_language`, taking only a language in `languages`. */
|
|
8037
8161
|
available_languages: components["schemas"]["AvailableLanguageDto"][];
|
|
8038
8162
|
self_signup_daily_cap?: number;
|
|
8039
8163
|
access_token_ttl_seconds?: number;
|
|
@@ -8113,7 +8237,16 @@ interface components {
|
|
|
8113
8237
|
/** @description Enable passkey sign-in for this Environment. Off by default (opt-in); persisted under `env.settings.passkey_login_enabled`. When on, an identity holding a passkey signs in with it alone via /login/passkey/*, and the passkey counts as its second factor. */
|
|
8114
8238
|
passkey_login_enabled?: boolean;
|
|
8115
8239
|
/**
|
|
8116
|
-
* @description The
|
|
8240
|
+
* @description The languages this Environment offers on the hosted pages and in the emails it sends, as language tags. Each must be one of `available_languages` in the response, and the list must hold `default_language`. An Environment that has never saved a list offers `default_language` alone, and a new `default_language` sent without `languages` replaces it. A page or email is only ever written in an offered language.
|
|
8241
|
+
* @example [
|
|
8242
|
+
* "en",
|
|
8243
|
+
* "es",
|
|
8244
|
+
* "fr"
|
|
8245
|
+
* ]
|
|
8246
|
+
*/
|
|
8247
|
+
languages?: string[];
|
|
8248
|
+
/**
|
|
8249
|
+
* @description The language a page or email is written in when nothing names one the Environment offers: no `ui_locales`, no stored language for the person, and no match in the browser's languages. Must be one of `languages`. Unset, `en`.
|
|
8117
8250
|
* @example en
|
|
8118
8251
|
*/
|
|
8119
8252
|
default_language?: string;
|
|
@@ -9874,6 +10007,31 @@ interface components {
|
|
|
9874
10007
|
succeeded: number;
|
|
9875
10008
|
/** @description How many were refused. */
|
|
9876
10009
|
failed: number;
|
|
10010
|
+
/** @description Who was given which role, and where. */
|
|
10011
|
+
affected: {
|
|
10012
|
+
/**
|
|
10013
|
+
* Format: uuid
|
|
10014
|
+
* @description The identity holding the assignment; null when a machine client holds it.
|
|
10015
|
+
*/
|
|
10016
|
+
identity_id: string | null;
|
|
10017
|
+
/**
|
|
10018
|
+
* Format: uuid
|
|
10019
|
+
* @description The machine OAuth client holding the assignment; null when a person holds it.
|
|
10020
|
+
*/
|
|
10021
|
+
oauth_client_id?: string | null;
|
|
10022
|
+
/** @description That machine client's `client_id`: its token's `sub`, the id its grants route takes and an SDK cache names it by. Null when a person holds the assignment. */
|
|
10023
|
+
client_id?: string | null;
|
|
10024
|
+
/**
|
|
10025
|
+
* Format: uuid
|
|
10026
|
+
* @description The hierarchy node the role is held at.
|
|
10027
|
+
*/
|
|
10028
|
+
node_id: string;
|
|
10029
|
+
/**
|
|
10030
|
+
* Format: uuid
|
|
10031
|
+
* @description The role assigned.
|
|
10032
|
+
*/
|
|
10033
|
+
role_id: string;
|
|
10034
|
+
}[];
|
|
9877
10035
|
/**
|
|
9878
10036
|
* @description Set when directory sync made the change rather than somebody directly.
|
|
9879
10037
|
* @enum {string}
|
|
@@ -14465,6 +14623,8 @@ interface operations {
|
|
|
14465
14623
|
include?: "windows";
|
|
14466
14624
|
};
|
|
14467
14625
|
header?: {
|
|
14626
|
+
/** @description The `ETag` of a previous response for the same page, page size and `include`. Answers `304 Not Modified` while nothing that decides these grants has changed, so a client holding them revalidates without the grants being worked out again. */
|
|
14627
|
+
"If-None-Match"?: string;
|
|
14468
14628
|
/** @description The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`). */
|
|
14469
14629
|
"X-Canopy-Environment"?: string;
|
|
14470
14630
|
};
|
|
@@ -14491,6 +14651,13 @@ interface operations {
|
|
|
14491
14651
|
};
|
|
14492
14652
|
};
|
|
14493
14653
|
};
|
|
14654
|
+
/** @description The grants are unchanged since the supplied `ETag`. No body; keep using the held copy. */
|
|
14655
|
+
304: {
|
|
14656
|
+
headers: {
|
|
14657
|
+
[name: string]: unknown;
|
|
14658
|
+
};
|
|
14659
|
+
content?: never;
|
|
14660
|
+
};
|
|
14494
14661
|
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
|
|
14495
14662
|
400: {
|
|
14496
14663
|
headers: {
|
|
@@ -32553,7 +32720,7 @@ interface operations {
|
|
|
32553
32720
|
};
|
|
32554
32721
|
};
|
|
32555
32722
|
};
|
|
32556
|
-
/** @description A value is malformed: the logo, favicon,
|
|
32723
|
+
/** @description A value is malformed: the logo, favicon, background and panel images must each be an address an image upload of their kind answered (`request.validation_failed`, or `branding.image_not_uploaded` for an upload's address Canopy does not store), the terms and privacy links https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, the product name at most 60 characters, the color scheme, layout, background style, corner radius, card style and card shadow one of their listed values, the panel heading at most 80 characters and its text at most 240, `text_overrides` texts from the text keys list, each plain text within its length that keeps its placeholders, the header, notice and footer content at most 2,000 characters each, a heading or body font a curated font's id or an https URL, and `custom_css` CSS of at most 20,000 characters that parses, loads no file (`@import`, `@font-face`, `url()`), selects on no field's `value` and names no `--_hp-*` property or `</`, `page_template` a document of at most 100,000 characters holding `{{canopy:head}}` once inside `<head>` and `{{canopy:form}}` once inside `<body>` with no `<base>`, `<meta http-equiv>`, frame, `<object>` or `<embed>`, and `page_template_sources` at most 20 https addresses with no path; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`) */
|
|
32557
32724
|
400: {
|
|
32558
32725
|
headers: {
|
|
32559
32726
|
[name: string]: unknown;
|
|
@@ -32564,7 +32731,7 @@ interface operations {
|
|
|
32564
32731
|
* "error": {
|
|
32565
32732
|
* "statusCode": 400,
|
|
32566
32733
|
* "code": "request.invalid",
|
|
32567
|
-
* "message": "A value is malformed: the logo, favicon,
|
|
32734
|
+
* "message": "A value is malformed: the logo, favicon, background and panel images must each be an address an image upload of their kind answered (`request.validation_failed`, or `branding.image_not_uploaded` for an upload's address Canopy does not store), the terms and privacy links https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, the product name at most 60 characters, the color scheme, layout, background style, corner radius, card style and card shadow one of their listed values, the panel heading at most 80 characters and its text at most 240, `text_overrides` texts from the text keys list, each plain text within its length that keeps its placeholders, the header, notice and footer content at most 2,000 characters each, a heading or body font a curated font's id or an https URL, and `custom_css` CSS of at most 20,000 characters that parses, loads no file (`@import`, `@font-face`, `url()`), selects on no field's `value` and names no `--_hp-*` property or `</`, `page_template` a document of at most 100,000 characters holding `{{canopy:head}}` once inside `<head>` and `{{canopy:form}}` once inside `<body>` with no `<base>`, `<meta http-equiv>`, frame, `<object>` or `<embed>`, and `page_template_sources` at most 20 https addresses with no path; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`)",
|
|
32568
32735
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32569
32736
|
* "path": "/api/v1/branding",
|
|
32570
32737
|
* "method": "PATCH"
|
|
@@ -32639,6 +32806,119 @@ interface operations {
|
|
|
32639
32806
|
};
|
|
32640
32807
|
};
|
|
32641
32808
|
};
|
|
32809
|
+
ApiBrandingController_uploadImage: {
|
|
32810
|
+
parameters: {
|
|
32811
|
+
query?: never;
|
|
32812
|
+
header?: {
|
|
32813
|
+
/** @description The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`). */
|
|
32814
|
+
"X-Canopy-Environment"?: string;
|
|
32815
|
+
};
|
|
32816
|
+
path?: never;
|
|
32817
|
+
cookie?: never;
|
|
32818
|
+
};
|
|
32819
|
+
requestBody: {
|
|
32820
|
+
content: {
|
|
32821
|
+
"application/json": components["schemas"]["UploadBrandingImageDto"];
|
|
32822
|
+
};
|
|
32823
|
+
};
|
|
32824
|
+
responses: {
|
|
32825
|
+
/** @description The stored image, and the address to save in a branding field */
|
|
32826
|
+
200: {
|
|
32827
|
+
headers: {
|
|
32828
|
+
[name: string]: unknown;
|
|
32829
|
+
};
|
|
32830
|
+
content: {
|
|
32831
|
+
"application/json": {
|
|
32832
|
+
data: components["schemas"]["BrandingImageResponseDto"];
|
|
32833
|
+
};
|
|
32834
|
+
};
|
|
32835
|
+
};
|
|
32836
|
+
/** @description The file is not a PNG, JPEG, WebP or SVG (`branding.image_unreadable`), is outside its kind's limits (`branding.image_too_large`, `branding.image_too_small`), is an SVG that refers to something outside itself (`branding.image_svg_external`), the request sends neither or both of `image` and `url` (`branding.image_source`), the address is refused or cannot be fetched (`branding.image_url_refused`, `branding.image_url_unreachable`), or the body is malformed (`validation`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
|
|
32837
|
+
400: {
|
|
32838
|
+
headers: {
|
|
32839
|
+
[name: string]: unknown;
|
|
32840
|
+
};
|
|
32841
|
+
content: {
|
|
32842
|
+
/**
|
|
32843
|
+
* @example {
|
|
32844
|
+
* "error": {
|
|
32845
|
+
* "statusCode": 400,
|
|
32846
|
+
* "code": "request.invalid",
|
|
32847
|
+
* "message": "The file is not a PNG, JPEG, WebP or SVG (`branding.image_unreadable`), is outside its kind's limits (`branding.image_too_large`, `branding.image_too_small`), is an SVG that refers to something outside itself (`branding.image_svg_external`), the request sends neither or both of `image` and `url` (`branding.image_source`), the address is refused or cannot be fetched (`branding.image_url_refused`, `branding.image_url_unreachable`), or the body is malformed (`validation`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own",
|
|
32848
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32849
|
+
* "path": "/api/v1/branding/images",
|
|
32850
|
+
* "method": "POST"
|
|
32851
|
+
* }
|
|
32852
|
+
* }
|
|
32853
|
+
*/
|
|
32854
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
32855
|
+
};
|
|
32856
|
+
};
|
|
32857
|
+
/** @description Invalid or expired token */
|
|
32858
|
+
401: {
|
|
32859
|
+
headers: {
|
|
32860
|
+
[name: string]: unknown;
|
|
32861
|
+
};
|
|
32862
|
+
content: {
|
|
32863
|
+
/**
|
|
32864
|
+
* @example {
|
|
32865
|
+
* "error": {
|
|
32866
|
+
* "statusCode": 401,
|
|
32867
|
+
* "code": "auth.invalid_token",
|
|
32868
|
+
* "message": "Invalid or expired token",
|
|
32869
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32870
|
+
* "path": "/api/v1/branding",
|
|
32871
|
+
* "method": "GET"
|
|
32872
|
+
* }
|
|
32873
|
+
* }
|
|
32874
|
+
*/
|
|
32875
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
32876
|
+
};
|
|
32877
|
+
};
|
|
32878
|
+
/** @description The caller lacks `branding.manage` */
|
|
32879
|
+
403: {
|
|
32880
|
+
headers: {
|
|
32881
|
+
[name: string]: unknown;
|
|
32882
|
+
};
|
|
32883
|
+
content: {
|
|
32884
|
+
/**
|
|
32885
|
+
* @example {
|
|
32886
|
+
* "error": {
|
|
32887
|
+
* "statusCode": 403,
|
|
32888
|
+
* "code": "auth.forbidden",
|
|
32889
|
+
* "message": "The caller lacks `branding.manage`",
|
|
32890
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32891
|
+
* "path": "/api/v1/branding/images",
|
|
32892
|
+
* "method": "POST"
|
|
32893
|
+
* }
|
|
32894
|
+
* }
|
|
32895
|
+
*/
|
|
32896
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
32897
|
+
};
|
|
32898
|
+
};
|
|
32899
|
+
/** @description More than 30 image uploads in a minute from this caller; wait and retry */
|
|
32900
|
+
429: {
|
|
32901
|
+
headers: {
|
|
32902
|
+
[name: string]: unknown;
|
|
32903
|
+
};
|
|
32904
|
+
content: {
|
|
32905
|
+
/**
|
|
32906
|
+
* @example {
|
|
32907
|
+
* "error": {
|
|
32908
|
+
* "statusCode": 429,
|
|
32909
|
+
* "code": "request.rate_limited",
|
|
32910
|
+
* "message": "More than 30 image uploads in a minute from this caller; wait and retry",
|
|
32911
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32912
|
+
* "path": "/api/v1/branding/images",
|
|
32913
|
+
* "method": "POST"
|
|
32914
|
+
* }
|
|
32915
|
+
* }
|
|
32916
|
+
*/
|
|
32917
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
32918
|
+
};
|
|
32919
|
+
};
|
|
32920
|
+
};
|
|
32921
|
+
};
|
|
32642
32922
|
ApiBrandingController_getPreviewPages: {
|
|
32643
32923
|
parameters: {
|
|
32644
32924
|
query?: never;
|
|
@@ -32930,7 +33210,7 @@ interface operations {
|
|
|
32930
33210
|
};
|
|
32931
33211
|
};
|
|
32932
33212
|
};
|
|
32933
|
-
/** @description The page or state does not exist (`branding.preview_page_unknown`),
|
|
33213
|
+
/** @description The page or state does not exist (`branding.preview_page_unknown`), a branding value is malformed (`validation`), or an image field holds anything but an uploaded image (`branding.image_not_uploaded`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
|
|
32934
33214
|
400: {
|
|
32935
33215
|
headers: {
|
|
32936
33216
|
[name: string]: unknown;
|
|
@@ -32941,7 +33221,7 @@ interface operations {
|
|
|
32941
33221
|
* "error": {
|
|
32942
33222
|
* "statusCode": 400,
|
|
32943
33223
|
* "code": "request.invalid",
|
|
32944
|
-
* "message": "The page or state does not exist (`branding.preview_page_unknown`),
|
|
33224
|
+
* "message": "The page or state does not exist (`branding.preview_page_unknown`), a branding value is malformed (`validation`), or an image field holds anything but an uploaded image (`branding.image_not_uploaded`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own",
|
|
32945
33225
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
32946
33226
|
* "path": "/api/v1/branding/preview",
|
|
32947
33227
|
* "method": "POST"
|
|
@@ -32995,6 +33275,98 @@ interface operations {
|
|
|
32995
33275
|
};
|
|
32996
33276
|
};
|
|
32997
33277
|
};
|
|
33278
|
+
ApiBrandingController_previewLink: {
|
|
33279
|
+
parameters: {
|
|
33280
|
+
query?: never;
|
|
33281
|
+
header?: {
|
|
33282
|
+
/** @description The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`). */
|
|
33283
|
+
"X-Canopy-Environment"?: string;
|
|
33284
|
+
};
|
|
33285
|
+
path?: never;
|
|
33286
|
+
cookie?: never;
|
|
33287
|
+
};
|
|
33288
|
+
requestBody: {
|
|
33289
|
+
content: {
|
|
33290
|
+
"application/json": components["schemas"]["BrandingPreviewRequestDto"];
|
|
33291
|
+
};
|
|
33292
|
+
};
|
|
33293
|
+
responses: {
|
|
33294
|
+
/** @description A short-lived link to the page, and its title */
|
|
33295
|
+
200: {
|
|
33296
|
+
headers: {
|
|
33297
|
+
[name: string]: unknown;
|
|
33298
|
+
};
|
|
33299
|
+
content: {
|
|
33300
|
+
"application/json": {
|
|
33301
|
+
data: components["schemas"]["BrandingPreviewLinkResponseDto"];
|
|
33302
|
+
};
|
|
33303
|
+
};
|
|
33304
|
+
};
|
|
33305
|
+
/** @description The page or state is not a hosted page's (`branding.preview_link_page_unknown`), a branding value is malformed (`validation`), or an image field holds anything but an uploaded image (`branding.image_not_uploaded`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
|
|
33306
|
+
400: {
|
|
33307
|
+
headers: {
|
|
33308
|
+
[name: string]: unknown;
|
|
33309
|
+
};
|
|
33310
|
+
content: {
|
|
33311
|
+
/**
|
|
33312
|
+
* @example {
|
|
33313
|
+
* "error": {
|
|
33314
|
+
* "statusCode": 400,
|
|
33315
|
+
* "code": "request.invalid",
|
|
33316
|
+
* "message": "The page or state is not a hosted page's (`branding.preview_link_page_unknown`), a branding value is malformed (`validation`), or an image field holds anything but an uploaded image (`branding.image_not_uploaded`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own",
|
|
33317
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
33318
|
+
* "path": "/api/v1/branding/preview-link",
|
|
33319
|
+
* "method": "POST"
|
|
33320
|
+
* }
|
|
33321
|
+
* }
|
|
33322
|
+
*/
|
|
33323
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
33324
|
+
};
|
|
33325
|
+
};
|
|
33326
|
+
/** @description Invalid or expired token */
|
|
33327
|
+
401: {
|
|
33328
|
+
headers: {
|
|
33329
|
+
[name: string]: unknown;
|
|
33330
|
+
};
|
|
33331
|
+
content: {
|
|
33332
|
+
/**
|
|
33333
|
+
* @example {
|
|
33334
|
+
* "error": {
|
|
33335
|
+
* "statusCode": 401,
|
|
33336
|
+
* "code": "auth.invalid_token",
|
|
33337
|
+
* "message": "Invalid or expired token",
|
|
33338
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
33339
|
+
* "path": "/api/v1/branding",
|
|
33340
|
+
* "method": "GET"
|
|
33341
|
+
* }
|
|
33342
|
+
* }
|
|
33343
|
+
*/
|
|
33344
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
33345
|
+
};
|
|
33346
|
+
};
|
|
33347
|
+
/** @description The caller lacks `branding.view`, or the Account's plan does not include hosted page customization (`plan_feature_unavailable`) */
|
|
33348
|
+
403: {
|
|
33349
|
+
headers: {
|
|
33350
|
+
[name: string]: unknown;
|
|
33351
|
+
};
|
|
33352
|
+
content: {
|
|
33353
|
+
/**
|
|
33354
|
+
* @example {
|
|
33355
|
+
* "error": {
|
|
33356
|
+
* "statusCode": 403,
|
|
33357
|
+
* "code": "auth.forbidden",
|
|
33358
|
+
* "message": "The caller lacks `branding.view`, or the Account's plan does not include hosted page customization (`plan_feature_unavailable`)",
|
|
33359
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
33360
|
+
* "path": "/api/v1/branding/preview-link",
|
|
33361
|
+
* "method": "POST"
|
|
33362
|
+
* }
|
|
33363
|
+
* }
|
|
33364
|
+
*/
|
|
33365
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
33366
|
+
};
|
|
33367
|
+
};
|
|
33368
|
+
};
|
|
33369
|
+
};
|
|
32998
33370
|
ApiTokenClaimsController_getTokenClaims: {
|
|
32999
33371
|
parameters: {
|
|
33000
33372
|
query?: never;
|
|
@@ -34656,7 +35028,7 @@ interface operations {
|
|
|
34656
35028
|
};
|
|
34657
35029
|
};
|
|
34658
35030
|
};
|
|
34659
|
-
/** @description The request failed validation, or the payload cannot be applied: an unsupported `format_version`, an organizations setting that differs from the target Environment's, nested nodes in an Environment with organizations, not exactly one root node, a role or role template naming a permission key the payload lacks, orphaned or cyclic `parent_ref` chains, or duplicate keys. Its role templates must also be importable: a template named like one of the payload's roles (`role_template.name_taken`), more than one default admin or default member (`environment.import_duplicate_role_template_default`), a default admin without `canopy:organization.manage` (`role_template.admin_requires_organization_manage`), or no default admin while the target creates organizations at sign-up (`role_template.default_admin_required`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`) */
|
|
35031
|
+
/** @description The request failed validation, or the payload cannot be applied: an unsupported `format_version`, an organizations setting that differs from the target Environment's, nested nodes in an Environment with organizations, not exactly one root node, a role or role template naming a permission key the payload lacks, orphaned or cyclic `parent_ref` chains, or duplicate keys. Its role templates must also be importable: a template named like one of the payload's roles (`role_template.name_taken`), more than one default admin or default member (`environment.import_duplicate_role_template_default`), a default admin without `canopy:organization.manage` (`role_template.admin_requires_organization_manage`), or no default admin while the target creates organizations at sign-up (`role_template.default_admin_required`). Its languages are checked as a save on the auth settings is: a default with no catalogue (`environment.default_language_invalid`), a list naming a language twice or one with no catalogue (`environment.languages_invalid`), or a default the list leaves out (`environment.default_language_not_offered`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`) */
|
|
34660
35032
|
400: {
|
|
34661
35033
|
headers: {
|
|
34662
35034
|
[name: string]: unknown;
|
|
@@ -34667,7 +35039,7 @@ interface operations {
|
|
|
34667
35039
|
* "error": {
|
|
34668
35040
|
* "statusCode": 400,
|
|
34669
35041
|
* "code": "request.invalid",
|
|
34670
|
-
* "message": "The request failed validation, or the payload cannot be applied: an unsupported `format_version`, an organizations setting that differs from the target Environment's, nested nodes in an Environment with organizations, not exactly one root node, a role or role template naming a permission key the payload lacks, orphaned or cyclic `parent_ref` chains, or duplicate keys. Its role templates must also be importable: a template named like one of the payload's roles (`role_template.name_taken`), more than one default admin or default member (`environment.import_duplicate_role_template_default`), a default admin without `canopy:organization.manage` (`role_template.admin_requires_organization_manage`), or no default admin while the target creates organizations at sign-up (`role_template.default_admin_required`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`)",
|
|
35042
|
+
* "message": "The request failed validation, or the payload cannot be applied: an unsupported `format_version`, an organizations setting that differs from the target Environment's, nested nodes in an Environment with organizations, not exactly one root node, a role or role template naming a permission key the payload lacks, orphaned or cyclic `parent_ref` chains, or duplicate keys. Its role templates must also be importable: a template named like one of the payload's roles (`role_template.name_taken`), more than one default admin or default member (`environment.import_duplicate_role_template_default`), a default admin without `canopy:organization.manage` (`role_template.admin_requires_organization_manage`), or no default admin while the target creates organizations at sign-up (`role_template.default_admin_required`). Its languages are checked as a save on the auth settings is: a default with no catalogue (`environment.default_language_invalid`), a list naming a language twice or one with no catalogue (`environment.languages_invalid`), or a default the list leaves out (`environment.default_language_not_offered`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or its `If-Match` header names no version (`if_match.invalid`)",
|
|
34671
35043
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
34672
35044
|
* "path": "/api/v1/environments/{id}/import",
|
|
34673
35045
|
* "method": "POST"
|
|
@@ -34922,7 +35294,7 @@ interface operations {
|
|
|
34922
35294
|
};
|
|
34923
35295
|
};
|
|
34924
35296
|
};
|
|
34925
|
-
/** @description A setting is out of range or malformed, the passkey relying party is incomplete — `webauthn_rp_id` and `webauthn_origins` must be set together, and every origin must be on the id or a subdomain of it — `auth_links_base_url` is not a bare https origin, an entry in `allowed_web_origins` is not a bare http or https origin, or `organizations_create_on_signup` is on while no organization role template is the default admin (`role_template.default_admin_missing`); the role a sign-up's creator receives, and each identity provider arrival role, must be one every organization shares, not one organization's own; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or `default_language` names a language outside `available_languages` (`environment.default_language_invalid`); or its `If-Match` header names no version (`if_match.invalid`) */
|
|
35297
|
+
/** @description A setting is out of range or malformed, the passkey relying party is incomplete — `webauthn_rp_id` and `webauthn_origins` must be set together, and every origin must be on the id or a subdomain of it — `auth_links_base_url` is not a bare https origin, an entry in `allowed_web_origins` is not a bare http or https origin, or `organizations_create_on_signup` is on while no organization role template is the default admin (`role_template.default_admin_missing`); the role a sign-up's creator receives, and each identity provider arrival role, must be one every organization shares, not one organization's own; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or `default_language` names a language outside `available_languages` (`environment.default_language_invalid`), `languages` is empty, names a language twice or names one outside `available_languages` (`environment.languages_invalid`), or `default_language` is not one of `languages` (`environment.default_language_not_offered`); or its `If-Match` header names no version (`if_match.invalid`) */
|
|
34926
35298
|
400: {
|
|
34927
35299
|
headers: {
|
|
34928
35300
|
[name: string]: unknown;
|
|
@@ -34933,7 +35305,7 @@ interface operations {
|
|
|
34933
35305
|
* "error": {
|
|
34934
35306
|
* "statusCode": 400,
|
|
34935
35307
|
* "code": "request.invalid",
|
|
34936
|
-
* "message": "A setting is out of range or malformed, the passkey relying party is incomplete — `webauthn_rp_id` and `webauthn_origins` must be set together, and every origin must be on the id or a subdomain of it — `auth_links_base_url` is not a bare https origin, an entry in `allowed_web_origins` is not a bare http or https origin, or `organizations_create_on_signup` is on while no organization role template is the default admin (`role_template.default_admin_missing`); the role a sign-up's creator receives, and each identity provider arrival role, must be one every organization shares, not one organization's own; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or `default_language` names a language outside `available_languages` (`environment.default_language_invalid`); or its `If-Match` header names no version (`if_match.invalid`)",
|
|
35308
|
+
* "message": "A setting is out of range or malformed, the passkey relying party is incomplete — `webauthn_rp_id` and `webauthn_origins` must be set together, and every origin must be on the id or a subdomain of it — `auth_links_base_url` is not a bare https origin, an entry in `allowed_web_origins` is not a bare http or https origin, or `organizations_create_on_signup` is on while no organization role template is the default admin (`role_template.default_admin_missing`); the role a sign-up's creator receives, and each identity provider arrival role, must be one every organization shares, not one organization's own; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own; or `default_language` names a language outside `available_languages` (`environment.default_language_invalid`), `languages` is empty, names a language twice or names one outside `available_languages` (`environment.languages_invalid`), or `default_language` is not one of `languages` (`environment.default_language_not_offered`); or its `If-Match` header names no version (`if_match.invalid`)",
|
|
34937
35309
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
34938
35310
|
* "path": "/api/v1/auth-settings",
|
|
34939
35311
|
* "method": "PATCH"
|
|
@@ -44960,6 +45332,8 @@ interface operations {
|
|
|
44960
45332
|
include?: "windows";
|
|
44961
45333
|
};
|
|
44962
45334
|
header?: {
|
|
45335
|
+
/** @description The `ETag` of a previous response for the same page, page size and `include`. Answers `304 Not Modified` while nothing that decides these grants has changed, so a client holding them revalidates without the grants being worked out again. */
|
|
45336
|
+
"If-None-Match"?: string;
|
|
44963
45337
|
/** @description The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`). */
|
|
44964
45338
|
"X-Canopy-Environment"?: string;
|
|
44965
45339
|
};
|
|
@@ -44986,6 +45360,13 @@ interface operations {
|
|
|
44986
45360
|
};
|
|
44987
45361
|
};
|
|
44988
45362
|
};
|
|
45363
|
+
/** @description The grants are unchanged since the supplied `ETag`. No body; keep using the held copy. */
|
|
45364
|
+
304: {
|
|
45365
|
+
headers: {
|
|
45366
|
+
[name: string]: unknown;
|
|
45367
|
+
};
|
|
45368
|
+
content?: never;
|
|
45369
|
+
};
|
|
44989
45370
|
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; the client is a web client (`oauth.client_not_machine`); the role is a system role (`rbac.system_role_not_assignable`) or inactive; the role belongs to another organization (`rbac.role_outside_organization`), or a role carrying `canopy:roles.manage` is placed beneath the organization node (`rbac.roles_manage_below_organization`); the window runs backwards (`auth.effective_date_invalid`); or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
|
|
44990
45371
|
400: {
|
|
44991
45372
|
headers: {
|
|
@@ -48377,10 +48758,15 @@ interface AccessibleNodes {
|
|
|
48377
48758
|
envWide: boolean;
|
|
48378
48759
|
}
|
|
48379
48760
|
interface LocalAuthorizerStats {
|
|
48380
|
-
/** Reads of an identity's grant roots, one per refresh however many pages it took. */
|
|
48761
|
+
/** Reads of an identity's grant roots, one per refresh however many pages it took, including revalidations. */
|
|
48381
48762
|
grantFetches: number;
|
|
48382
|
-
/**
|
|
48763
|
+
/**
|
|
48764
|
+
* Page requests those reads made: one for a revalidation the server answers
|
|
48765
|
+
* `304`, otherwise one per page of 100 grants.
|
|
48766
|
+
*/
|
|
48383
48767
|
grantPages: number;
|
|
48768
|
+
/** Revalidations the server answered `304`, so no grants were transferred. */
|
|
48769
|
+
grantNotModified: number;
|
|
48384
48770
|
/** Reads of the hierarchy, one per refresh, including revalidations. */
|
|
48385
48771
|
treeRequests: number;
|
|
48386
48772
|
/**
|
|
@@ -48634,8 +49020,27 @@ declare class LocalAuthorizer {
|
|
|
48634
49020
|
*
|
|
48635
49021
|
* Every page carries the subject's deny roots whole, beside its rows; they
|
|
48636
49022
|
* are gathered from each page, so a read is one snapshot of both.
|
|
49023
|
+
*
|
|
49024
|
+
* Revalidate rather than re-read. The first page is asked for with the
|
|
49025
|
+
* validator the held grants came with, and a `304` means nothing that
|
|
49026
|
+
* decides this subject's access has changed: the grants stay in memory and
|
|
49027
|
+
* only their expiry moves. Canopy answers it after reading the subject's
|
|
49028
|
+
* access versions alone, so the common refresh costs one small read on both
|
|
49029
|
+
* sides. Only the first page is conditional; its validator covers every
|
|
49030
|
+
* page.
|
|
49031
|
+
*
|
|
49032
|
+
* A read over several pages is not confirmed the way the hierarchy's is.
|
|
49033
|
+
* The validator kept is the first page's, taken before any later page was
|
|
49034
|
+
* read, so a change made during the walk moves the subject's version past
|
|
49035
|
+
* it, and the next refresh reads every page again.
|
|
48637
49036
|
*/
|
|
48638
49037
|
private fetchGrantRoots;
|
|
49038
|
+
/**
|
|
49039
|
+
* Hold a subject's grants until the TTL, or until the nearest window edge
|
|
49040
|
+
* still ahead when that comes sooner, so a grant takes effect or ends on
|
|
49041
|
+
* time.
|
|
49042
|
+
*/
|
|
49043
|
+
private keepGrants;
|
|
48639
49044
|
private treeEntry;
|
|
48640
49045
|
/**
|
|
48641
49046
|
* Revalidate rather than re-read. The hierarchy is the expensive half and
|